Nesse vídeo você vai conhecer um pouco da minha casa e das automações que uso no dia a dia. Para iniciarmos, vou apresentar a primeira parte das automações que tenho em meu escritório.
Não se esqueça de deixar o seu LIKE lá no vídeo! Obrigado! 😁
1. Produtos Utilizados
- Expositor – Sonoff basic zigbee – https://bit.ly/3fVuDmG
- Bom Ar – Sonoff basic wifi – http://s.click.aliexpress.com/e/_d6H0fXI
- Mesa 1 – Régua de tomada zigbee – https://s.click.aliexpress.com/e/_9jf08y
- Notebook – Plugue de tomada zigbee – http://bit.ly/3i25XKx
- Porta – Sensor de porta e janela – https://bit.ly/3t13Cnz
- Sensor de presença – https://bit.ly/3wdcIiv
- Teto – Lâmpada Zigbee Gledopto – https://s.click.aliexpress.com/e/_9J93fW
- Teto – Lâmpada Philips Hue + Ponte – https://amzn.to/34aBOmg
- Mesa e Barra Lateral – Fita Led WS2812 (60 leds por metro, IP30 ou IP65, fica a seu critéio): https://s.click.aliexpress.com/e/_AgdxWV
- Mesa e Barra Lateral – NodeMCU – https://s.click.aliexpress.com/e/_AAgyip
- Persiana – Motor para persiana de rolo zigbee – https://s.click.aliexpress.com/e/_Ag05XY
- Mesa 1 – Sensor de temperatura com display – https://s.click.aliexpress.com/e/_AZFGWp
- Interruptor zigbee com botão físico – https://s.click.aliexpress.com/e/_d8qoVzC
- Fechadura Bluetooth – https://s.click.aliexpress.com/e/_AONrXL
Outros
- Echo 4 com hub zigbee – https://amzn.to/3wrBkEfhttps://amzn.to/3uyZLz3
- Monitor LG 34 – https://amzn.to/3bO2XiQ
- Notebook Lenovo i7 – https://amzn.to/34gX2yx
2. Vídeos Recomendados
- Zigbee no Home Assistant: https://youtu.be/KG4RCz_P1wI
- Node-Red: https://youtu.be/7TugenJP9K0
- Barra Lateral e Mesa: https://youtu.be/Nal6I9KmUEw
- Ambilight: https://youtu.be/BS5LwsCMpqk
3. Integrações Utilizadas
- Adaptive Lighting: https://github.com/basnijholt/adaptive-lighting
- HASS Workstation Service: https://github.com/sleevezipper/hass-workstation-service
- IOT Link: https://iotlink.gitlab.io/
4. Nós para importação
- Rotina de Bom Dia
– Input Boolean:
bom_dia: name: bomdia initial: off
– Nó Node-RED:
[{"id":"7823e64a.accff8","type":"comment","z":"4fd2b057.92fd8","name":"Cena Bom dia!","info":"","x":120,"y":1600,"wires":[]},{"id":"a26051e.3f670b","type":"server-state-changed","z":"4fd2b057.92fd8","name":"Porta Abriu?","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.porta_do_escritorio","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":1660,"wires":[["f15d74a5.45d978"],[]]},{"id":"3a1edb2b.6fab04","type":"api-call-service","z":"4fd2b057.92fd8","name":"Volume","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.googlenestpointb041","data":"{\"volume_level\":0.5}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":160,"y":1740,"wires":[["7cc00a44.bf6074"]]},{"id":"64c0ee5b.f8902","type":"api-call-service","z":"4fd2b057.92fd8","name":"TTS","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"tts","service":"cloud_say","entityId":"media_player.googlenestpointb041","data":"{\"message\":\"Bom dia! A temperatura do escritório está em {{payload}} Graus!\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":550,"y":1740,"wires":[[]],"icon":"node-red-contrib-cast/home.png"},{"id":"7cc00a44.bf6074","type":"api-current-state","z":"4fd2b057.92fd8","name":"Temperatura Interna","server":"27f1aa3c.860de6","version":2,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.escritorio_sensor_display_temperatura","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":360,"y":1740,"wires":[["64c0ee5b.f8902"]]},{"id":"d60010ed.0eb64","type":"time-range-switch","z":"4fd2b057.92fd8","name":"","lat":"-19.918768","lon":"-44.124534","startTime":"06:00","endTime":"11:00","startOffset":0,"endOffset":0,"x":510,"y":1660,"wires":[["3a1edb2b.6fab04","9f4b1e5a.e804d"],[]]},{"id":"9f4b1e5a.e804d","type":"delay","z":"4fd2b057.92fd8","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":700,"y":1660,"wires":[["15a56766.44d979"]]},{"id":"15a56766.44d979","type":"api-call-service","z":"4fd2b057.92fd8","name":"Liga Aromatizante","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.aromatizador","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":1660,"wires":[["4af0e16d.0b0e9"]]},{"id":"af763203.70647","type":"api-call-service","z":"4fd2b057.92fd8","name":"Liga Input Bom dia","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.bom_dia","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":550,"y":1600,"wires":[[]]},{"id":"f15d74a5.45d978","type":"api-current-state","z":"4fd2b057.92fd8","name":"Executada?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.bom_dia","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":330,"y":1660,"wires":[[],["d60010ed.0eb64","af763203.70647"]]},{"id":"4af0e16d.0b0e9","type":"api-call-service","z":"4fd2b057.92fd8","name":"Liga Expositor","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.expositor","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1100,"y":1660,"wires":[["a69bf52f.d204c8"]]},{"id":"a69bf52f.d204c8","type":"api-call-service","z":"4fd2b057.92fd8","name":"Abre persiana 40%","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.persiana_escritorio","data":"{\"position\":40}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1310,"y":1660,"wires":[["edfa108.5e845f"]]},{"id":"2a377f3.c13298","type":"inject","z":"4fd2b057.92fd8","name":"01:00","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 01 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":1820,"wires":[["4623959.e9e3d6c"]]},{"id":"4623959.e9e3d6c","type":"api-call-service","z":"4fd2b057.92fd8","name":"Desliga Input Bom dia","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.bom_dia","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":320,"y":1820,"wires":[[]]},{"id":"edfa108.5e845f","type":"api-call-service","z":"4fd2b057.92fd8","name":"Liga Carregador e Hub ","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.plugue_note_lenovo,switch.tomada_hub","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1540,"y":1660,"wires":[[]]},{"id":"27f1aa3c.860de6","type":"server","name":"HA","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
- Iluminação: Todos os produtos de iluminação, botão 1 do interruptor, sensor de movimento e atividade no Notebook. Observação: Crie o sensor de atividade no HASS Workstation.
– Input Boolean:
desabilita_sensor_escritorio: name: Desabilitar Sensor Escritório initial: off confirma_luz_escritorio: name: Confirma Luz Escritorio initial: off
– Nós Node-RED:
[{"id":"addc476d.42c328","type":"comment","z":"35cb9760.bf0558","name":"Rotinas Botão 1 do Interruptor","info":"","x":140,"y":40,"wires":[]},{"id":"8b0f8c59.7e07f","type":"server-state-changed","z":"35cb9760.bf0558","name":"Interruptor Escritorio 1","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.interruptor_escritorio","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":320,"wires":[["5c0ec444.97a83c"],["72b277ad.45b698"]]},{"id":"77c7960e.9da6e8","type":"api-call-service","z":"35cb9760.bf0558","name":"Liga Luminária","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.luminaria_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1200,"y":80,"wires":[["a995f173.08eeb"]]},{"id":"1044e1da.08c6fe","type":"api-current-state","z":"35cb9760.bf0558","name":"Luminaria Ligada?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.luminaria_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":970,"y":80,"wires":[[],["77c7960e.9da6e8"]]},{"id":"7c246e37.d22fd","type":"api-call-service","z":"35cb9760.bf0558","name":"Liga Expositor","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.expositor","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1420,"y":300,"wires":[["48c6d40b.10eadc"]]},{"id":"a6da6b95.ceca38","type":"api-current-state","z":"35cb9760.bf0558","name":"Expositor Ligado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.expositor","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":1210,"y":300,"wires":[[],["7c246e37.d22fd"]]},{"id":"b614a0da.1f7bb","type":"api-call-service","z":"35cb9760.bf0558","name":"Desliga Luzes","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.todas_luzes_escritorio","data":"{\"transition\":\"0\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1360,"y":380,"wires":[["fba9450e.4d02f8"]]},{"id":"6a6fccf5.d7b014","type":"time-range-switch","z":"35cb9760.bf0558","name":"","lat":"-19.918768","lon":"-44.124534","startTime":"06:00","endTime":"18:59","startOffset":0,"endOffset":0,"x":690,"y":80,"wires":[["1044e1da.08c6fe"],[]]},{"id":"8873bea8.89058","type":"time-range-switch","z":"35cb9760.bf0558","name":"","lat":"-19.918768","lon":"-44.124534","startTime":"19:00","endTime":"23:29","startOffset":0,"endOffset":0,"x":690,"y":140,"wires":[["1044e1da.08c6fe"],[]]},{"id":"31b15ba8.290044","type":"time-range-switch","z":"35cb9760.bf0558","name":"","lat":"-19.918768","lon":"-44.124534","startTime":"23:30","endTime":"05:59","startOffset":0,"endOffset":0,"x":690,"y":200,"wires":[["f43a7634.80b828"],[]]},{"id":"87230e7e.3c4c2","type":"time-range-switch","z":"35cb9760.bf0558","name":"","lat":"-19.918768","lon":"-44.124534","startTime":"06:00","endTime":"23:29","startOffset":0,"endOffset":0,"x":690,"y":320,"wires":[["466483a4.0a80dc"],["4e5c1933.67d898"]]},{"id":"e28a92e3.8bb54","type":"api-call-service","z":"35cb9760.bf0558","name":"Para Medias","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"media_player","service":"media_stop","entityId":"media_player.echo_4, media_player.googlenestpointb041, media_player.nest_hub_max","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1350,"y":460,"wires":[["e7b59592.b6cc88"]]},{"id":"466483a4.0a80dc","type":"trigger","z":"35cb9760.bf0558","name":"Aguarda 5 mins","op1":"","op2":"off","op1type":"nul","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"min","reset":"on","bytopic":"all","topic":"topic","outputs":1,"x":900,"y":320,"wires":[["bfa5fcf.b5a42"]]},{"id":"72b277ad.45b698","type":"time-range-switch","z":"35cb9760.bf0558","name":"","lat":"-19.918768","lon":"-44.124534","startTime":"06:00","endTime":"22:00","startOffset":0,"endOffset":0,"x":690,"y":480,"wires":[["bfa5fcf.b5a42"],["bfa5fcf.b5a42"]]},{"id":"67eae8ff.2cec58","type":"api-call-service","z":"35cb9760.bf0558","name":"Fecha persiana","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"cover","service":"close_cover","entityId":"cover.persiana_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1160,"y":460,"wires":[["e28a92e3.8bb54"]],"icon":"font-awesome/fa-lightbulb-o"},{"id":"bca8df62.e4eaa","type":"api-current-state","z":"35cb9760.bf0558","name":"PIR Desabilitado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.desabilita_sensor_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":310,"y":100,"wires":[[],["6a6fccf5.d7b014","8873bea8.89058","31b15ba8.290044"]]},{"id":"52a8a714.835158","type":"api-current-state","z":"35cb9760.bf0558","name":"PIR Desabilitado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.desabilita_sensor_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":310,"y":220,"wires":[[],["87230e7e.3c4c2"]]},{"id":"f43a7634.80b828","type":"api-current-state","z":"35cb9760.bf0558","name":"Confirmacao Ligada?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.confirma_luz_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":960,"y":200,"wires":[["77c7960e.9da6e8","95516578.2c84f8"],["37890734.1c6ed8"]]},{"id":"b9d05c3e.cbec7","type":"api-call-service","z":"35cb9760.bf0558","name":"Desliga Interruptor Escritorio 1","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.interruptor_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1410,"y":240,"wires":[["3b71ceab.d84142"]]},{"id":"48c6d40b.10eadc","type":"api-call-service","z":"35cb9760.bf0558","name":"Liga Confirmacao","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.confirma_luz_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1630,"y":300,"wires":[[]]},{"id":"e9c8800.065218","type":"server-state-changed","z":"35cb9760.bf0558","name":"PIR Escritório","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.escritorio_pir","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":130,"y":160,"wires":[["bca8df62.e4eaa","fa8faa95.078978"],["52a8a714.835158"]]},{"id":"eaadb95a.04e548","type":"api-current-state","z":"35cb9760.bf0558","name":"Persiana Aberta?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"open","halt_if_type":"str","halt_if_compare":"is","entity_id":"cover.persiana_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":1550,"y":80,"wires":[["9a31b8bd.0bc098"],[]]},{"id":"c540e443.1e1098","type":"api-call-service","z":"35cb9760.bf0558","name":"Luminária 40%","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.luminaria_escritorio","data":"{\"brightness_pct\":40}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1460,"y":160,"wires":[["d518dc2c.67f06"]]},{"id":"3899402f.af7ca","type":"function","z":"35cb9760.bf0558","name":"Converte em Segs","func":"msg.payload = (Date.now() - Date.parse(msg.payload)) / 1000\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":730,"y":560,"wires":[["7a5f730f.92f38c"]]},{"id":"7a5f730f.92f38c","type":"switch","z":"35cb9760.bf0558","name":"Checa tempo inativo","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"180","vt":"num"},{"t":"lt","v":"180","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":200,"y":660,"wires":[["82e699ca.366768"],["431eec4.73ef714"]]},{"id":"a995f173.08eeb","type":"api-current-state","z":"35cb9760.bf0558","name":"Dia?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"above_horizon","halt_if_type":"str","halt_if_compare":"is","entity_id":"sun.sun","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload_sun","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":1370,"y":80,"wires":[["eaadb95a.04e548"],[]]},{"id":"d518dc2c.67f06","type":"api-call-service","z":"35cb9760.bf0558","name":"Desliga Confirmacao","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.confirma_luz_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1680,"y":160,"wires":[[]]},{"id":"fba9450e.4d02f8","type":"api-call-service","z":"35cb9760.bf0558","name":"Desliga Confirmacao","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.confirma_luz_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1580,"y":380,"wires":[[]]},{"id":"95516578.2c84f8","type":"api-call-service","z":"35cb9760.bf0558","name":"Desliga Expositor","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.expositor","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1210,"y":160,"wires":[[]]},{"id":"3b71ceab.d84142","type":"delay","z":"35cb9760.bf0558","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1640,"y":240,"wires":[["a6da6b95.ceca38"]]},{"id":"37890734.1c6ed8","type":"delay","z":"35cb9760.bf0558","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1180,"y":240,"wires":[["b9d05c3e.cbec7"]]},{"id":"3eec890f.d05ec6","type":"link in","z":"35cb9760.bf0558","name":"Timer PIR","links":["fa8faa95.078978","cbcb3d08.ee185","2f8050.78407fb","36373224.b00fce"],"x":715,"y":380,"wires":[["466483a4.0a80dc","4e5c1933.67d898"]]},{"id":"fa8faa95.078978","type":"link out","z":"35cb9760.bf0558","name":"Timer PIR","links":["3eec890f.d05ec6"],"x":275,"y":160,"wires":[]},{"id":"9a31b8bd.0bc098","type":"delay","z":"35cb9760.bf0558","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1740,"y":80,"wires":[["c540e443.1e1098"]]},{"id":"5c0ec444.97a83c","type":"link out","z":"35cb9760.bf0558","name":"Horarios","links":["b985a3e0.4a326","f2bfbb7f.44a0d8","5d405530.44860c"],"x":295,"y":280,"wires":[]},{"id":"5d405530.44860c","type":"link in","z":"35cb9760.bf0558","name":"Horario 1","links":["5c0ec444.97a83c"],"x":515,"y":60,"wires":[["6a6fccf5.d7b014"]]},{"id":"b985a3e0.4a326","type":"link in","z":"35cb9760.bf0558","name":"Horario 2","links":["5c0ec444.97a83c"],"x":455,"y":160,"wires":[["8873bea8.89058"]]},{"id":"f2bfbb7f.44a0d8","type":"link in","z":"35cb9760.bf0558","name":"Horario 3","links":["5c0ec444.97a83c"],"x":515,"y":200,"wires":[["31b15ba8.290044"]]},{"id":"4e5c1933.67d898","type":"trigger","z":"35cb9760.bf0558","name":"Aguarda 3 mins","op1":"","op2":"off","op1type":"nul","op2type":"str","duration":"3","extend":false,"overrideDelay":false,"units":"min","reset":"on","bytopic":"all","topic":"topic","outputs":1,"x":900,"y":380,"wires":[["67eae8ff.2cec58","bfa5fcf.b5a42"]]},{"id":"e7b59592.b6cc88","type":"api-call-service","z":"35cb9760.bf0558","name":"Desliga Ar","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"climate","service":"turn_off","entityId":"climate.ar_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1530,"y":460,"wires":[["96cf7cab.25c58"]]},{"id":"431eec4.73ef714","type":"change","z":"35cb9760.bf0558","name":"Se ativo","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":700,"wires":[["36373224.b00fce"]]},{"id":"36373224.b00fce","type":"link out","z":"35cb9760.bf0558","name":"Ativo","links":["3eec890f.d05ec6"],"x":515,"y":700,"wires":[]},{"id":"96cf7cab.25c58","type":"api-call-service","z":"35cb9760.bf0558","name":"Desliga Monitores","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.monitor_dell, switch.monitor_lg","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1730,"y":460,"wires":[[]]},{"id":"d5256732.722058","type":"inject","z":"35cb9760.bf0558","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"20","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":560,"wires":[["62ccebb9.74b284"]]},{"id":"6f82ff50.e8466","type":"api-current-state","z":"35cb9760.bf0558","name":"Atividade PC","server":"27f1aa3c.860de6","version":2,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.atividade_y540","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":530,"y":560,"wires":[["3899402f.af7ca"]]},{"id":"62ccebb9.74b284","type":"api-current-state","z":"35cb9760.bf0558","name":"Note Ligado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.note_lenovo","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":350,"y":560,"wires":[["6f82ff50.e8466"],[]]},{"id":"133e86f8.4f6b79","type":"link out","z":"35cb9760.bf0558","name":"Inativo","links":["3bc31412.514f4c"],"x":735,"y":640,"wires":[]},{"id":"82e699ca.366768","type":"change","z":"35cb9760.bf0558","name":"Se inativo","rules":[{"t":"set","p":"payload","pt":"msg","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":640,"wires":[["c7c2f561.393f68"]]},{"id":"3bc31412.514f4c","type":"link in","z":"35cb9760.bf0558","name":"Ativar Timer se PC Inativo","links":["133e86f8.4f6b79"],"x":715,"y":280,"wires":[["466483a4.0a80dc"]]},{"id":"bfa5fcf.b5a42","type":"api-current-state","z":"35cb9760.bf0558","name":"Luzes Ligadas?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.todas_luzes_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":1160,"y":380,"wires":[["b614a0da.1f7bb"],[]]},{"id":"c7c2f561.393f68","type":"api-current-state","z":"35cb9760.bf0558","name":"PIR Desabilitado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.desabilita_sensor_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":590,"y":640,"wires":[[],["133e86f8.4f6b79"]]},{"id":"29223c4c.98d794","type":"comment","z":"35cb9760.bf0558","name":"Paralelo Virtual","info":"","x":140,"y":840,"wires":[]},{"id":"c7b4979f.c7e4c8","type":"server-state-changed","z":"35cb9760.bf0558","name":"Luminaria Escritorio","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.luminaria_escritorio","entityidfiltertype":"substring","outputinitially":true,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":900,"wires":[["522782b6.5ab18c"],["f23200b4.ceee6"]]},{"id":"522782b6.5ab18c","type":"api-current-state","z":"35cb9760.bf0558","name":"Interruptor Ligado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.interruptor_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":390,"y":860,"wires":[[],["d693990.a4be968"]]},{"id":"f23200b4.ceee6","type":"api-current-state","z":"35cb9760.bf0558","name":"Interruptor Ligado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.interruptor_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":390,"y":940,"wires":[["f284ac70.c0496"],[]]},{"id":"f284ac70.c0496","type":"api-call-service","z":"35cb9760.bf0558","name":"Desliga interruptor Escritorio","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.interruptor_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":640,"y":940,"wires":[[]]},{"id":"d693990.a4be968","type":"api-call-service","z":"35cb9760.bf0558","name":"Liga interruptor Escritorio","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.interruptor_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":860,"wires":[[]]},{"id":"1b06f1fe.1c9bfe","type":"server-state-changed","z":"35cb9760.bf0558","name":"Confirmacao","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.confirma_luz_escritorio","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":970,"y":900,"wires":[["3f5a7390.4cbb2c"],[]]},{"id":"3f5a7390.4cbb2c","type":"delay","z":"35cb9760.bf0558","name":"","pauseType":"delay","timeout":"30","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1140,"y":900,"wires":[["86ce5145.9eb3d"]]},{"id":"86ce5145.9eb3d","type":"api-call-service","z":"35cb9760.bf0558","name":"Desliga Confirmacao","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.confirma_luz_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1340,"y":900,"wires":[[]],"icon":"font-awesome/fa-lightbulb-o"},{"id":"27f1aa3c.860de6","type":"server","name":"HA","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
- Desabilita Sensor de Movimento Manualmente: Utiliza o input boolean mostrado no passo anterior
[{"id":"437ae735.1e2518","type":"server-state-changed","z":"a893ffe8.798f4","name":"Desabilitar PIR?","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.desabilita_sensor_escritorio","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":1020,"wires":[["317fb4d5.e3a50c","8bb196e6.f48318","8e7757e9.2265c8"],["6cfc08ba.6d7838","2b6ca5a.47df75a","8bb196e6.f48318"]]},{"id":"ba48de2b.f970e","type":"api-call-service","z":"a893ffe8.798f4","name":"Habilita Sensor","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.desabilita_sensor_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":820,"y":1020,"wires":[[]],"icon":"font-awesome/fa-lightbulb-o"},{"id":"b0dc3894.2c1e38","type":"api-call-service","z":"a893ffe8.798f4","name":"Volume Alexa","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.googlenestpointb041","data":"{\"volume_level\":0.6}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":1100,"wires":[["c1634fda.77b0e"]]},{"id":"47fe329b.8da44c","type":"api-call-service","z":"a893ffe8.798f4","name":"Volume Alexa","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.googlenestpointb041","data":"{\"volume_level\":0.6}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":940,"wires":[["a30b30ad.0d461"]]},{"id":"1c0b39d7.368576","type":"api-current-state","z":"a893ffe8.798f4","name":"Input Ligado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.desabilita_sensor_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":620,"y":1020,"wires":[["ba48de2b.f970e"],[]]},{"id":"317fb4d5.e3a50c","type":"api-call-service","z":"a893ffe8.798f4","name":"Aviso Mesa","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.mesaescritorio","data":"{ \"color_name\": \"green\", \"effect\": \"Android\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":410,"y":880,"wires":[["cc5ff85d.dd4ca8"]]},{"id":"df0da41.fa93058","type":"api-call-service","z":"a893ffe8.798f4","name":"Mesa Off","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.mesaescritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1080,"y":880,"wires":[[]]},{"id":"23e34c3f.b49684","type":"delay","z":"a893ffe8.798f4","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":920,"y":880,"wires":[["df0da41.fa93058"]]},{"id":"2b6ca5a.47df75a","type":"api-call-service","z":"a893ffe8.798f4","name":"Aviso Mesa","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.mesaescritorio","data":"{ \"color_name\": \"red\", \"effect\": \"Android\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":410,"y":1160,"wires":[["6443b1bd.cd177"]]},{"id":"b86d8b32.b7ce68","type":"api-call-service","z":"a893ffe8.798f4","name":"Mesa Off","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.mesaescritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1080,"y":1160,"wires":[[]]},{"id":"6443b1bd.cd177","type":"delay","z":"a893ffe8.798f4","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":580,"y":1160,"wires":[["34302d4d.c9e0d2"]]},{"id":"8e7757e9.2265c8","type":"api-current-state","z":"a893ffe8.798f4","name":"Dia?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"above_horizon","halt_if_type":"str","halt_if_compare":"is","entity_id":"sun.sun","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload_sun","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":390,"y":940,"wires":[["47fe329b.8da44c"],[]]},{"id":"6cfc08ba.6d7838","type":"api-current-state","z":"a893ffe8.798f4","name":"Dia?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"above_horizon","halt_if_type":"str","halt_if_compare":"is","entity_id":"sun.sun","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload_sun","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":390,"y":1100,"wires":[["b0dc3894.2c1e38"],[]]},{"id":"cc5ff85d.dd4ca8","type":"delay","z":"a893ffe8.798f4","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":580,"y":880,"wires":[["8a009255.bc651"]]},{"id":"8a009255.bc651","type":"api-call-service","z":"a893ffe8.798f4","name":"Aviso Mesa","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.mesaescritorio","data":"{ \"color_name\": \"green\", \"effect\": \"Solid\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":750,"y":880,"wires":[["23e34c3f.b49684"]]},{"id":"184ffebd.091f71","type":"delay","z":"a893ffe8.798f4","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":920,"y":1160,"wires":[["b86d8b32.b7ce68"]]},{"id":"34302d4d.c9e0d2","type":"api-call-service","z":"a893ffe8.798f4","name":"Aviso Mesa","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.mesaescritorio","data":"{ \"color_name\": \"red\", \"effect\": \"Solid\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":750,"y":1160,"wires":[["184ffebd.091f71"]]},{"id":"c1634fda.77b0e","type":"api-call-service","z":"a893ffe8.798f4","name":"TTS","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"tts","service":"cloud_say","entityId":"media_player.googlenestpointb041","data":"{\"message\":\"Sensor de movimento ativado.\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":730,"y":1100,"wires":[[]],"icon":"node-red-contrib-cast/home.png"},{"id":"a30b30ad.0d461","type":"api-call-service","z":"a893ffe8.798f4","name":"TTS","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"tts","service":"cloud_say","entityId":"media_player.googlenestpointb041","data":"{\"message\":\"Sensor de Movimento desativado.\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":730,"y":940,"wires":[[]],"icon":"node-red-contrib-cast/home.png"},{"id":"8bb196e6.f48318","type":"trigger","z":"a893ffe8.798f4","name":"Aguarda 1 hora","op1":"","op2":"on","op1type":"nul","op2type":"str","duration":"1","extend":true,"overrideDelay":false,"units":"hr","reset":"off","bytopic":"all","topic":"topic","outputs":1,"x":420,"y":1020,"wires":[["1c0b39d7.368576"]]},{"id":"c4410d4c.5879","type":"comment","z":"a893ffe8.798f4","name":"Desabilita Sensor PIR","info":"","x":140,"y":880,"wires":[]},{"id":"27f1aa3c.860de6","type":"server","name":"HA","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
- Persiana: Interruptor Botão 2 e Motor da Persiana
– Input Boolean:
confirma_persiana: name: Confirma persiana initial: off
– Nó Node-RED:
[{"id":"fd49e587.2f2de8","type":"server-state-changed","z":"35cb9760.bf0558","name":"Interruptor Botao 2","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.interruptor_escritorio_cortina","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":1220,"wires":[["d4b1bb36.b37958"],["7085a761.3dc618"]]},{"id":"b24fc481.b58808","type":"api-call-service","z":"35cb9760.bf0558","name":"Abre persiana 40%","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.persiana_escritorio","data":"{\"position\":40}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":950,"y":1100,"wires":[[]]},{"id":"6863844f.62a23c","type":"server-state-changed","z":"35cb9760.bf0558","name":"Persiana","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"cover.persiana_escritorio","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"open","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":1420,"wires":[["3a7b8272.0a360e"],["faa960a4.6339a"]]},{"id":"8dc804b0.3a8ac8","type":"api-call-service","z":"35cb9760.bf0558","name":"Liga Interruptor Escritorio 2","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.interruptor_escritorio_cortina","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":1380,"wires":[[]]},{"id":"90259ceb.8cb85","type":"api-call-service","z":"35cb9760.bf0558","name":"Desliga Interruptor Escritorio 2","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.interruptor_escritorio_cortina","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":570,"y":1460,"wires":[[]]},{"id":"92fc471e.90a6c8","type":"api-current-state","z":"35cb9760.bf0558","name":"Cortina aberta?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"closed","halt_if_type":"num","halt_if_compare":"is","entity_id":"cover.persiana_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":740,"y":1100,"wires":[[],["b24fc481.b58808"]]},{"id":"3a7b8272.0a360e","type":"api-current-state","z":"35cb9760.bf0558","name":"Interruptor Ligado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.interruptor_escritorio_cortina","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":310,"y":1380,"wires":[[],["8dc804b0.3a8ac8"]]},{"id":"faa960a4.6339a","type":"api-current-state","z":"35cb9760.bf0558","name":"Interruptor Ligado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.interruptor_escritorio_cortina","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":310,"y":1460,"wires":[["90259ceb.8cb85"],[]]},{"id":"7085a761.3dc618","type":"api-current-state","z":"35cb9760.bf0558","name":"Cortina aberta?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"closed","halt_if_type":"num","halt_if_compare":"is","entity_id":"cover.persiana_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":360,"y":1280,"wires":[[],["7b0311e2.e4234"]]},{"id":"7b0311e2.e4234","type":"api-call-service","z":"35cb9760.bf0558","name":"Fecha persiana","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"cover","service":"close_cover","entityId":"cover.persiana_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":1280,"wires":[[]]},{"id":"d4b1bb36.b37958","type":"api-current-state","z":"35cb9760.bf0558","name":"Dia?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"above_horizon","halt_if_type":"str","halt_if_compare":"is","entity_id":"sun.sun","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload_sun","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":330,"y":1140,"wires":[["841970d1.8114b"],["1a8e68f7.cd13f7"]]},{"id":"7b3d2b6e.c771f4","type":"link in","z":"35cb9760.bf0558","name":"Botão 3 Opple","links":["e6aed32.79e833","f026a79d.12f948"],"x":175,"y":1140,"wires":[["d4b1bb36.b37958"]]},{"id":"25cb6504.26025a","type":"api-call-service","z":"35cb9760.bf0558","name":"Desliga Interruptor Escritorio 2","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.interruptor_escritorio_cortina","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":790,"y":1180,"wires":[["1331f594.0851fa"]]},{"id":"3afc65ab.f162ba","type":"api-call-service","z":"35cb9760.bf0558","name":"Volume","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.googlenestpointb041","data":"{\"volume_level\":0.7}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1240,"y":1180,"wires":[["a6543079.7d0a6"]]},{"id":"a6543079.7d0a6","type":"api-call-service","z":"35cb9760.bf0558","name":"TTS","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"tts","service":"cloud_say","entityId":"media_player.googlenestpointb041","data":"{\"message\":\"Já é noite! Se deseja mesmo abrir a persiana, aperte o botão novamente!\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1390,"y":1180,"wires":[[]],"icon":"node-red-contrib-cast/home.png"},{"id":"1a8e68f7.cd13f7","type":"api-current-state","z":"35cb9760.bf0558","name":"Confirmacao Ligada?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.confirma_persiana","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":520,"y":1180,"wires":[["841970d1.8114b"],["25cb6504.26025a"]]},{"id":"1331f594.0851fa","type":"api-call-service","z":"35cb9760.bf0558","name":"Liga Confirmacao","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.confirma_persiana","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1050,"y":1180,"wires":[["3afc65ab.f162ba"]]},{"id":"841970d1.8114b","type":"api-call-service","z":"35cb9760.bf0558","name":"Desliga Confirmacao","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.confirma_persiana","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":520,"y":1100,"wires":[["92fc471e.90a6c8"]]},{"id":"92d18717.06c058","type":"server-state-changed","z":"35cb9760.bf0558","name":"Confirmacao","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.confirma_persiana","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":130,"y":1560,"wires":[["6a196639.09dd98"],[]]},{"id":"6a196639.09dd98","type":"delay","z":"35cb9760.bf0558","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":300,"y":1560,"wires":[["8d2516ec.4df258"]]},{"id":"8d2516ec.4df258","type":"api-call-service","z":"35cb9760.bf0558","name":"Desliga Confirmacao","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.confirma_persiana","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":500,"y":1560,"wires":[[]],"icon":"font-awesome/fa-lightbulb-o"},{"id":"cdc6fca8.d120b","type":"comment","z":"35cb9760.bf0558","name":"Rotinas Botão 2 do Interruptor","info":"","x":140,"y":1060,"wires":[]},{"id":"a44d9587.76cbb8","type":"comment","z":"35cb9760.bf0558","name":"Paralelo Virtual","info":"","x":140,"y":1340,"wires":[]},{"id":"27f1aa3c.860de6","type":"server","name":"HA","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
- Ar Condicionado: Interruptor Botão 3, Ar Portátil LG e Sensor de Temperatura
[{"id":"20d1194d.4ae156","type":"server-state-changed","z":"35cb9760.bf0558","name":"Interruptor Botão 3","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.interruptor_escritorio_3","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":1780,"wires":[["1b29c8ed.5fe7d7"],["71be3268.114e6c"]]},{"id":"c9bfbe58.af93d","type":"api-call-service","z":"35cb9760.bf0558","name":"Liga Ar","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"climate","service":"turn_on","entityId":"climate.ar_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":540,"y":1740,"wires":[[]]},{"id":"9fb9b0ee.0f0d4","type":"server-state-changed","z":"35cb9760.bf0558","name":"Ar condicionado","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"climate.ar_escritorio","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":1980,"wires":[["c16af4a8.6722e8"],["8e57302c.0926a","f9555e8.820dba"]]},{"id":"eda17d77.61104","type":"api-call-service","z":"35cb9760.bf0558","name":"Liga interruptor Escritorio","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.interruptor_escritorio_3","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":590,"y":2060,"wires":[[]]},{"id":"80b50be5.db4988","type":"api-call-service","z":"35cb9760.bf0558","name":"Desliga interruptor Escritorio","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.interruptor_escritorio_3","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":600,"y":1900,"wires":[[]]},{"id":"1b29c8ed.5fe7d7","type":"api-current-state","z":"35cb9760.bf0558","name":"Ar Desligado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"climate.ar_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":360,"y":1740,"wires":[["c9bfbe58.af93d"],[]]},{"id":"8e57302c.0926a","type":"api-current-state","z":"35cb9760.bf0558","name":"Interruptor Ligado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.interruptor_escritorio_3","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":350,"y":2060,"wires":[[],["eda17d77.61104"]]},{"id":"c16af4a8.6722e8","type":"api-current-state","z":"35cb9760.bf0558","name":"Interruptor Ligado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.interruptor_escritorio_3","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":350,"y":1900,"wires":[["80b50be5.db4988"],[]]},{"id":"3d370ee4.d8a482","type":"api-call-service","z":"35cb9760.bf0558","name":"Volume","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.googlenestpointb041","data":"{\"volume_level\":0.7}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":460,"y":1980,"wires":[["d22a45dd.2b2898"]]},{"id":"f9555e8.820dba","type":"api-current-state","z":"35cb9760.bf0558","name":"Dia?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"above_horizon","halt_if_type":"str","halt_if_compare":"is","entity_id":"sun.sun","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload_sun","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":310,"y":1980,"wires":[["3d370ee4.d8a482"],[]]},{"id":"4deac0ff.431a9","type":"api-call-service","z":"35cb9760.bf0558","name":"Desliga Ar","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"climate","service":"turn_off","entityId":"climate.ar_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":550,"y":1820,"wires":[[]]},{"id":"71be3268.114e6c","type":"api-current-state","z":"35cb9760.bf0558","name":"Ar Desligado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"climate.ar_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":360,"y":1820,"wires":[[],["4deac0ff.431a9"]]},{"id":"d22a45dd.2b2898","type":"api-current-state","z":"35cb9760.bf0558","name":"Temperatura","server":"27f1aa3c.860de6","version":2,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.escritorio_sensor_display_temperatura","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":630,"y":1980,"wires":[["f0bf50a6.662e7"]]},{"id":"f0bf50a6.662e7","type":"api-call-service","z":"35cb9760.bf0558","name":"TTS","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"tts","service":"cloud_say","entityId":"media_player.googlenestpointb041","data":"{\"message\":\"Ar Condicionado Ligado! Temperatura em {{payload}} Graus!\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":790,"y":1980,"wires":[[]],"icon":"node-red-contrib-cast/home.png"},{"id":"33a612e8.b2056e","type":"comment","z":"35cb9760.bf0558","name":"Rotinas Botão 3 do Interruptor","info":"","x":140,"y":1680,"wires":[]},{"id":"eb12d003.0184","type":"comment","z":"35cb9760.bf0558","name":"Paralelo Virtual","info":"","x":140,"y":1920,"wires":[]},{"id":"aa93b85b.d6a0f8","type":"server-state-changed","z":"35cb9760.bf0558","name":"Temp Escritório >= 27","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.escritorio_sensor_display_temperatura","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"27.5","halt_if_type":"num","halt_if_compare":"gte","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":2220,"wires":[["205cd78a.48b478"],[]]},{"id":"fb54e450.6d4028","type":"api-current-state","z":"35cb9760.bf0558","name":"Ar Ligado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"cool","halt_if_type":"str","halt_if_compare":"is","entity_id":"climate.ar_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":550,"y":2220,"wires":[[],["1e5ba60f.770a7a"]]},{"id":"2cd00021.1c9e2","type":"api-call-service","z":"35cb9760.bf0558","name":"Desliga Ar","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"climate","service":"turn_off","entityId":"climate.ar_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":710,"y":2300,"wires":[["26f024c8.0af4ec"]]},{"id":"35c119be.2c80e6","type":"api-current-state","z":"35cb9760.bf0558","name":"Ar Ligado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"cool","halt_if_type":"str","halt_if_compare":"is","entity_id":"climate.ar_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":510,"y":2300,"wires":[["2cd00021.1c9e2"],[]]},{"id":"1e5ba60f.770a7a","type":"api-call-service","z":"35cb9760.bf0558","name":"Liga Ar","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"climate","service":"turn_on","entityId":"climate.ar_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":720,"y":2220,"wires":[["b67464e8.8d1a68"]]},{"id":"5b3352e1.f8bddc","type":"server-state-changed","z":"35cb9760.bf0558","name":"Temp Escritório <= 24","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.escritorio_sensor_display_temperatura","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"24.5","halt_if_type":"num","halt_if_compare":"lte","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":2320,"wires":[["8c807075.c7744"],[]]},{"id":"26f024c8.0af4ec","type":"api-call-service","z":"35cb9760.bf0558","name":"Volume","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.googlenestpointb041","data":"{\"volume_level\":0.7}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":2300,"wires":[["fe8c26df.01d508"]]},{"id":"90d9f5da.a4a028","type":"api-call-service","z":"35cb9760.bf0558","name":"TTS","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"tts","service":"cloud_say","entityId":"media_player.googlenestpointb041","data":"{\"message\":\"Ar condicionado desligado! Temperatura em {{payload}} Graus!\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1170,"y":2300,"wires":[[]],"icon":"node-red-contrib-cast/home.png"},{"id":"8c807075.c7744","type":"api-current-state","z":"35cb9760.bf0558","name":"Dia?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"above_horizon","halt_if_type":"str","halt_if_compare":"is","entity_id":"sun.sun","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload_sun","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":350,"y":2320,"wires":[["35c119be.2c80e6"],["7d50eac2.9571d4"]]},{"id":"7d50eac2.9571d4","type":"api-current-state","z":"35cb9760.bf0558","name":"Ar Ligado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"cool","halt_if_type":"str","halt_if_compare":"is","entity_id":"climate.ar_escritorio","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":510,"y":2360,"wires":[["2cd00021.1c9e2"],[]]},{"id":"fe8c26df.01d508","type":"api-current-state","z":"35cb9760.bf0558","name":"temp","server":"27f1aa3c.860de6","version":2,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.escritorio_sensor_display_temperatura","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":1030,"y":2300,"wires":[["90d9f5da.a4a028"]]},{"id":"205cd78a.48b478","type":"api-current-state","z":"35cb9760.bf0558","name":"Note Ligado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.note_lenovo","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":370,"y":2220,"wires":[["fb54e450.6d4028"],[]]},{"id":"e209151d.3f10a8","type":"comment","z":"35cb9760.bf0558","name":"Temperatura e Ar Condicionado","info":"","x":190,"y":2160,"wires":[]},{"id":"b67464e8.8d1a68","type":"api-call-service","z":"35cb9760.bf0558","name":"Notify Iphone","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"notify","service":"mobile_app_iphone_de_patrick","entityId":"","data":"{\"message\":\"Ar Condicionado do escritório ligado!\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":2220,"wires":[[]]},{"id":"27f1aa3c.860de6","type":"server","name":"HA","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
- Impressora e Expositor Auto-Off
[{"id":"dea1f4ad.3bcff8","type":"server-state-changed","z":"ea498cc5.e89ee","name":"Impressora","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.regua_mesa_1_impressora","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":80,"y":60,"wires":[["bc860e3c.9014c"],[]]},{"id":"bc860e3c.9014c","type":"delay","z":"ea498cc5.e89ee","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":240,"y":60,"wires":[["2eddd49a.c5608c"]]},{"id":"2eddd49a.c5608c","type":"api-call-service","z":"ea498cc5.e89ee","name":"Desliga Impressora","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.regua_mesa_1_impressora","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":450,"y":60,"wires":[["ce4ad010.62a6b"]],"icon":"font-awesome/fa-lightbulb-o"},{"id":"d2b2fe14.3aa17","type":"server-state-changed","z":"ea498cc5.e89ee","name":"Expositor","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.expositor","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":80,"y":140,"wires":[["6f03fa67.128294"],[]]},{"id":"45ac5111.d2d9f","type":"api-call-service","z":"ea498cc5.e89ee","name":"Desliga Expositor","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.expositor","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":450,"y":140,"wires":[[]],"icon":"font-awesome/fa-lightbulb-o"},{"id":"ce4ad010.62a6b","type":"api-call-service","z":"ea498cc5.e89ee","name":"Notify Windows","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"mqtt","service":"publish","entityId":"","data":"{\"topic\":\"iotlink/patte/patte-01/commands/notify\",\"payload\":\"{\\\"title\\\":\\\"NOTIFICAÇÃO DA CASA\\\", \\\"message\\\":\\\"Impressora Desligada!\\\"}\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":660,"y":60,"wires":[[]]},{"id":"6f03fa67.128294","type":"delay","z":"ea498cc5.e89ee","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":240,"y":140,"wires":[["45ac5111.d2d9f"]]},{"id":"27f1aa3c.860de6","type":"server","name":"HA","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
- Ligando e Desligando o Notebook: Liga/Desliga os dispositivos conforme estado do notebook
– Binary Sensor:
- platform: ping host: 192.168.0.50 scan_interval: 60 count: 5 name: Note Lenovo
– Nó Node-RED:
[{"id":"9d347282.97179","type":"api-call-service","z":"a893ffe8.798f4","name":"Liga Tomadas e Leds","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.plugue_note_lenovo, switch.regua_mesa_1_usb, switch.regua_mesa_1_echo_4","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":340,"y":1320,"wires":[[]],"icon":"font-awesome/fa-lightbulb-o"},{"id":"b90cd281.3dcd7","type":"api-call-service","z":"a893ffe8.798f4","name":"Desliga Tomada, Monitor, Leds","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.plugue_note_lenovo, switch.monitor_lg, switch.regua_mesa_1_echo_4, switch.regua_mesa_1_usb, switch.monitor_dell","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":590,"y":1440,"wires":[["30a82edb.15de62"]],"icon":"font-awesome/fa-lightbulb-o"},{"id":"d48295e5.d77398","type":"server-state-changed","z":"a893ffe8.798f4","name":"Notebook Lenovo","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.note_lenovo","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":1380,"wires":[["c449791f.5c8328","9d347282.97179","2531c01b.4cd87"],["2531c01b.4cd87"]]},{"id":"c449791f.5c8328","type":"api-current-state","z":"a893ffe8.798f4","name":"Monitor Ligado?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.monitor_lg","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":320,"y":1380,"wires":[[],["be667d5d.9ccd6"]]},{"id":"be667d5d.9ccd6","type":"api-call-service","z":"a893ffe8.798f4","name":"Liga Monitor","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.monitor_lg","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":530,"y":1380,"wires":[[]],"icon":"font-awesome/fa-lightbulb-o"},{"id":"4dd71060.30e55","type":"comment","z":"a893ffe8.798f4","name":"Ping Note Y540","info":"","x":120,"y":1300,"wires":[]},{"id":"b526e0b8.40479","type":"api-call-service","z":"a893ffe8.798f4","name":"Desliga Ar","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"climate","service":"turn_off","entityId":"climate.ar_escritorio","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1070,"y":1440,"wires":[[]],"icon":"font-awesome/fa-lightbulb-o"},{"id":"30a82edb.15de62","type":"api-call-service","z":"a893ffe8.798f4","name":"Desliga Luzes Mesa 1","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.luzes_da_mesa_1","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":860,"y":1440,"wires":[["b526e0b8.40479"]],"icon":"font-awesome/fa-lightbulb-o"},{"id":"2531c01b.4cd87","type":"trigger","z":"a893ffe8.798f4","name":"Aguarda 5 minutos","op1":"","op2":"off","op1type":"nul","op2type":"str","duration":"5","extend":true,"overrideDelay":false,"units":"min","reset":"on","bytopic":"all","topic":"topic","outputs":1,"x":330,"y":1440,"wires":[["b90cd281.3dcd7"]]},{"id":"27f1aa3c.860de6","type":"server","name":"HA","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
- Modo Gamer: Temperatura GPU e Barra Lateral. Observação: Crie o sensor da temperatura da GPU no HASS Workstation.
– Nó Node-RED:
[{"id":"67795f0c.384d6","type":"api-current-state","z":"a893ffe8.798f4","name":"Temperatura GPU","server":"27f1aa3c.860de6","version":2,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.y540_gpu","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":690,"y":2800,"wires":[["9b5f7db2.eae4d"]]},{"id":"88cf001a.52f88","type":"server-state-changed","z":"a893ffe8.798f4","name":"Janela PC Atual","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.janela_atual","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":2740,"wires":[["1b983d0a.941a33"]]},{"id":"1b983d0a.941a33","type":"change","z":"a893ffe8.798f4","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"?","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"!","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"®","fromt":"str","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":2740,"wires":[["79d3d2ff.219b2c"]]},{"id":"79d3d2ff.219b2c","type":"switch","z":"a893ffe8.798f4","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Call of Duty: Modern Warfare","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":510,"y":2740,"wires":[["a17325f6.017de8"]]},{"id":"1b31d296.2bfb5d","type":"comment","z":"a893ffe8.798f4","name":"Barra Lateral = % GPU","info":"","x":140,"y":2700,"wires":[]},{"id":"d3b58fd2.8aa6e","type":"comment","z":"a893ffe8.798f4","name":"Modo Jogo","info":"","x":100,"y":2660,"wires":[]},{"id":"9b5f7db2.eae4d","type":"api-call-service","z":"a893ffe8.798f4","name":"% Barra","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"wled","service":"effect","entityId":"light.barra_lateral","data":"{\"effect\":\"Percent\",\"intensity\":\"{{payload}}\",\"palette\":\"Analogous\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":2800,"wires":[["66a9fb70.30c354"]]},{"id":"577c3609.acc008","type":"api-current-state","z":"a893ffe8.798f4","name":"Ligada?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.barra_lateral","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":700,"y":2880,"wires":[[],["8ebe7885.abebf8"]]},{"id":"8ebe7885.abebf8","type":"api-call-service","z":"a893ffe8.798f4","name":"Liga Barra","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.barra_lateral","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":870,"y":2880,"wires":[[]]},{"id":"66a9fb70.30c354","type":"delay","z":"a893ffe8.798f4","name":"","pauseType":"delay","timeout":"30","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1040,"y":2800,"wires":[["a17325f6.017de8"]]},{"id":"a17325f6.017de8","type":"api-current-state","z":"a893ffe8.798f4","name":"Janela PC Atual","server":"27f1aa3c.860de6","version":2,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.janela_atual","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":140,"y":2880,"wires":[["6a3edf55.a8226"]]},{"id":"6a3edf55.a8226","type":"change","z":"a893ffe8.798f4","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"?","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"!","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"®","fromt":"str","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":2880,"wires":[["9dbb1be6.8f1778"]]},{"id":"9dbb1be6.8f1778","type":"switch","z":"a893ffe8.798f4","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Call of Duty: Modern Warfare","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":530,"y":2880,"wires":[["577c3609.acc008","67795f0c.384d6"]]},{"id":"27f1aa3c.860de6","type":"server","name":"HA","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
- Modo Renderizando Vídeos: Temperatura GPU e Barra Lateral. Observação: Crie o sensor da temperatura da GPU no HASS Workstation.
– Nó Node-RED:
[{"id":"e3d9e0e9.b7b51","type":"api-call-service","z":"a893ffe8.798f4","name":"% Barra","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"wled","service":"effect","entityId":"light.barra_lateral","data":"{\"effect\":\"Percent\",\"intensity\":\"{{payload}}\",\"palette\":\"Analogous\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":640,"y":2980,"wires":[[]]},{"id":"89ad00b0.e90ee","type":"api-current-state","z":"a893ffe8.798f4","name":"Ligada?","server":"27f1aa3c.860de6","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.barra_lateral","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":640,"y":3040,"wires":[[],["c3bec32a.6372a"]]},{"id":"c3bec32a.6372a","type":"api-call-service","z":"a893ffe8.798f4","name":"Liga Barra","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.barra_lateral","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":810,"y":3040,"wires":[[]]},{"id":"2183e216.e7a4de","type":"server-state-changed","z":"a893ffe8.798f4","name":"Janela PC Atual","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.janela_atual","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":3100,"wires":[["f0fe74fd.bb05e8"]]},{"id":"29f24287.3634be","type":"switch","z":"a893ffe8.798f4","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"98","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":630,"y":3100,"wires":[["43a01133.c4ea7"]]},{"id":"43a01133.c4ea7","type":"delay","z":"a893ffe8.798f4","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":780,"y":3100,"wires":[["4e2df63b.c8e108"]]},{"id":"4e2df63b.c8e108","type":"api-call-service","z":"a893ffe8.798f4","name":"Notify Iphone","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"notify","service":"mobile_app_iphone_de_patrick","entityId":"","data":"{\"message\":\"Video Renderizado!\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":950,"y":3100,"wires":[[]]},{"id":"89595f41.abc1c","type":"change","z":"a893ffe8.798f4","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"Rendering: ","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"%","fromt":"str","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":3100,"wires":[["29f24287.3634be","e3d9e0e9.b7b51","89ad00b0.e90ee"]]},{"id":"a4ec5e62.25583","type":"comment","z":"a893ffe8.798f4","name":"Barra Lateral = % Render","info":"","x":150,"y":3060,"wires":[]},{"id":"86ee52a9.67319","type":"comment","z":"a893ffe8.798f4","name":"Renderização de Videos","info":"","x":150,"y":3020,"wires":[]},{"id":"f0fe74fd.bb05e8","type":"switch","z":"a893ffe8.798f4","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"Rendering","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":290,"y":3100,"wires":[["89595f41.abc1c"]]},{"id":"27f1aa3c.860de6","type":"server","name":"HA","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
- Cotação do Dólar
– Nó Node-RED:
[{"id":"ac8d5b47.35afa8","type":"http request","z":"ef0b7968.d94e08","name":"Dolar Google","method":"GET","ret":"txt","paytoqs":false,"url":"https://www.google.com/search?q=1+usd","tls":"","proxy":"","authType":"","x":270,"y":120,"wires":[["5a374cf4.5c1d54"]]},{"id":"f4c7725.109e59","type":"inject","z":"ef0b7968.d94e08","name":"18:30","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"30 18 * * 1,2,3,4,5","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":120,"wires":[["ac8d5b47.35afa8"]]},{"id":"5a374cf4.5c1d54","type":"function","z":"ef0b7968.d94e08","name":"","func":"function getMatches(string, regex, index) {\n index || (index = 1); // default to the first\n var matches = []\n var match;\n while (match = regex.exec(string)) {\n matches.push(match[index]);\n }\n return matches;\n}\n\nvar regex = /(\\d\\,\\d\\d) Real brasileiro/g\nvar result = getMatches(msg.payload, regex, 1)\nvar dolar = result[0]\nreturn { payload: dolar };","outputs":1,"noerr":0,"initialize":"","finalize":"","x":440,"y":120,"wires":[["29f7d6d3.7c2dea","4f7babb7.f52a24"]]},{"id":"29f7d6d3.7c2dea","type":"api-call-service","z":"ef0b7968.d94e08","name":"Notify Iphone","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"notify","service":"mobile_app_iphone_de_patrick","entityId":"","data":"{\"message\":\"O dólar hoje está em R$ {{payload}}\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":610,"y":120,"wires":[[]]},{"id":"4f7babb7.f52a24","type":"api-call-service","z":"ef0b7968.d94e08","name":"Notify Windows","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"mqtt","service":"publish","entityId":"","data":"{\"topic\":\"iotlink/patte/patte-01/commands/notify\",\"payload\":\"{\\\"title\\\":\\\"DÓLAR\\\", \\\"message\\\":\\\"O dólar hoje está em R$ {{payload}}\\\"}\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":620,"y":60,"wires":[[]]},{"id":"c27c5426.4ed2e8","type":"inject","z":"ef0b7968.d94e08","name":"09:30","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 10 * * 1,2,3,4,5","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":60,"wires":[["ac8d5b47.35afa8"]]},{"id":"27f1aa3c.860de6","type":"server","name":"HA","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
- Mostra o Home Assistant no Nest Hub ou Chromecast
– Input Boolean:
alexa_mostra_ha: name: Alexa HA initial: off
– Nó Node-RED:
[{"id":"a471a108.944f1","type":"api-call-service","z":"4fd2b057.92fd8","name":"Cast HA","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"cast","service":"show_lovelace_view","entityId":"media_player.nest_hub_max","data":"{\"dashboard_path\":\"lovelace\",\"entity_id\":\"media_player.nest_hub_max\",\"view_path\":\"cast\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":300,"y":360,"wires":[["e933ec9d.7b3cf"]]},{"id":"c37af5e5.989e08","type":"api-call-service","z":"4fd2b057.92fd8","name":"Cast HA","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"cast","service":"show_lovelace_view","entityId":"media_player.nest_hub_max","data":"{\"dashboard_path\":\"lovelace\",\"entity_id\":\"media_player.nest_hub_max\",\"view_path\":\"cast\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":620,"y":360,"wires":[["c006a54b.8a13f8"]]},{"id":"e933ec9d.7b3cf","type":"delay","z":"4fd2b057.92fd8","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":460,"y":360,"wires":[["c37af5e5.989e08"]]},{"id":"c006a54b.8a13f8","type":"api-call-service","z":"4fd2b057.92fd8","name":"Desliga Input","server":"27f1aa3c.860de6","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.alexa_mostra_ha","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":790,"y":360,"wires":[[]]},{"id":"f2d26196.01b6","type":"server-state-changed","z":"4fd2b057.92fd8","name":"Alexa Mostra HA","server":"27f1aa3c.860de6","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.alexa_mostra_ha","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":360,"wires":[["a471a108.944f1"],[]]},{"id":"27f1aa3c.860de6","type":"server","name":"HA","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]