Gå til innhold
  • Bli medlem
Støtt hjemmeautomasjon.no!

Anbefalte innlegg

Skrevet (endret)

Litt kort om min erfaring før jeg poster her.

Jeg er relativt fersk med Node-RED, men har holdt på med automasjon i flere år, blant annet WebCore for SmartThings og regelmotoren i HomeSeer.

I det siste har jeg flyttet mer og mer av min automasjon fra HomeSeer til Node-RED. Node-RED kjører jeg på min Home Assistant installasjon.

Jeg benytter automasjon for så mye jeg klarer, blant annet styring av lys etter bevegelse og tid på døgnet, varme etter tid på døgnet og status på huset (hjemme/borte), styring av dørlås og alarm etter presence.

 

Her er en "enkel" styring av lyset på do. Denne kan se omfattende ut for de som er nye med Node-RED, men det er for å dekke våre scenarioer og behov for styring av lyset helt automatisk på doen. Jeg skal prøve å forklare flow'en, men først hva slags enheter som er benyttet her.

 

Fysiske:

Lys = Philips HUE. Koblet til Home Assistant via HUE gatewayen og standard Philips HUE integrasjon i Home Assistant.

Motion = Bevegelsessensor fra Xiaomi Aqara. Koblet til Home Assistant via deconz installert i Home Assistant og USB-stick ConBee II som ZigBee-kontroller.

 

Virtuelle i Home Assistant:

Manuell = Virtuell node som gjør at vi kan skru av all automasjon. Noden lages ved hjelp av input_boolean i Home Assistant.

Nattlys = Virtuell node som skrus av/på etter tidspunkt på døgnet. Noden lages ved hjelp av input_boolean i Home Assistant.

 

Node-RED noder:

Events state node - noden som trigger hele flow'en basert på endring fra enhetene nevnt over.

Current state node - node som sjekker status på en enhet

Tid = Time Range node i Node-RED. 

Timer = Stop timer node i Node-RED. Denne brukes for å skru av lyset etter x-minutter etter at det ikke lenger er bevegelse på doen.

Stop to timer = Change node i Node-RED. Denne brukes til å endre payload'en til "stop". Grunnen til dette er at timeren nevnt over vil stoppe om den mottar en "stop"-melding. Dette gjør jeg for å resette timeren ved ny bevgelse i rommet og om manuell skrus på etter at timeren har startet.

Call service node = Den som kaller en enhet og sender dataen jeg ønsker.

 

 

Så forklaring til flow'en:

VED ENDRING TIL BEVELGESE:

Steg 1: Event - Ved bevegelse på do, så vil bevegelssensoren endres til "on" og noden "Motion change to = on" vil sende data ut på output 1.

Steg 2: Status - Er den virtuelle bryteren "Manuell" "on" eller "off"? Hvis "off" så fortsetter flow'en på output 1 og til steg 3. Hvis "on" så sender den på output 2, der jeg ikke har noe og flow'en stopper.

Steg 3a: Status - Samme som steg 2. Er den virtuelle brytere "on" eller off"? Hvis "off", send til output 1 og gå til steg 4. Hvis "on", output 2 og steg 5.

Steg 3b: Stop timer. Bevegelse er detektert på do og "send stop to timer" sender "stop" videre til steg 8.

Steg 4a: Nattlys fra steg 3a er bekreftet av og jeg bruker nå en "time range node" for å sjekke om tidsperioden er mellom 04.00-07.30, her kalt "Morgenlys". Er den innenfor denne tidsperion, output 1 og videre til steg 6. Utenfor tidsperioden, output 2 og videre til steg 7.

Steg 4b: Timerne har fått meldingen "stop" fra steg 3b og hvis de telte nedover vil de nå bli stoppet.

Steg 5: Nattlys fra steg 3a er av og jeg bruker navn en "call service node" til å dimme lyset på do opp til 20% over 4 sekunder. Flow'en er ferdig.

Steg 6: Samme som steg 5. Lyset får nå sin melding, men ikke samme verdier som steg 5 hvor det er nattlys. Morgenlyset gir deg 35% dimmet over en tidsperiode på 4 sekunder. Flow'en er ferdig.

Steg 7: Samme som steg 5, men nå er både nattlys og morgenlys utelukket og lyset dimmes til 75% over 3 sekunder. Flow'en er ferdig.

 

 

VED ENDRING TIL IKKE BEVEGELSE:

Steg 1: Event - Nå går det fra bevegelse til ikke bevegelse.

Nå hopper jeg over steg 2, 3a og 4, da disse er like som stegene over.

Steg 5: Avhengig av "nattlys", "morgenlys", "vanlig lys", så startes nå timerne. Ved "vanlig lys" så vil timeren 5 minutter og 10 minutter starte. Er det "nattlys" eller "morgenlys" så vil timeren 1 minutt og 2 minutter starte. Hvis timerne nå teller ned uten å få "stop" melding, så vil de sende data på output 1 og til steg 6.

Steg 6: Timerne har telt ferdig og lysene får nå sin melding. Etter 5 minutter i perioden "vanlig lys" så vil lyset dimmes ned til 5% og etter 10 minutter skrus av. Flow'en er ferdig.

 

VED ENDRING TIL MANUELL ON:

Steg 1: Event - Den virtuelle noden "manuell" endres til "on" og sender data på output 1.

Steg 2:  Samme som 3b over. Manuell er trigget og vi må stoppe timere om de teller.

Steg 3: Timere mottar meldingen "stop" og stopper hvis de teller ned. Flow'en er ferdig.

 

VED ENDRING TIL MANUELL OFF:

Denne er laget for å takle overgang fra "manuell" "on" til "manuell" off".

Steg 1: Event - Den virtuelle noden "manuell" endres til "off" og sender data på output 2.

Steg 2 alt 1Status - Er det bevegelse i rommet så vil "Motion = on" sende på output 1 og avgengig av status ved de påfølgende nodene, sette lys til ønsket verdi.

Steg 2 alt 2: Status - Er det ikke bevegelse i rommet så vil "Motion = on" sende på output 2 og avgengig av status ved de påfølgende nodene, starte ønske timer.

 

image.thumb.png.3c5d38714338c74de74db730e5b177a9.png

 

Mens jeg skrev denne posten, så ser jeg at eksempelet mitt, som jeg trodde var komplett og ryddig, mangler en node for å sjekke om lys allerede er på. Dette bruker jeg i andre rom. Sånn er det i hjemmeautomasjonen, det er alltid forbedringsmuligheter. Jeg poster denne meldingen sånn den er, forbedrer flow'en og poster ny versjon av den under 😃

 

Ønsker du å se nærmere på denne flow'en eller implementere den hos deg. Kopier koden under og velg "import" i Node-RED:

 

[{"id":"8df51809.834bf8","type":"tab","label":"Do","disabled":false,"info":""},{"id":"b7f54c85.d6ff","type":"time-range-switch","z":"8df51809.834bf8","name":"Tid = Morgenlys","lat":"","lon":"","startTime":"04:00","endTime":"07:30","startOffset":0,"endOffset":0,"x":1000,"y":40,"wires":[["867f9a4e.6b3de8"],["8cf81503.5305d8"]]},{"id":"263e8cc4.4e41b4","type":"change","z":"8df51809.834bf8","name":"Send stop to timer","rules":[{"t":"set","p":"payload","pt":"msg","to":"stop","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":200,"wires":[["4f6e7d61.187c84","42f99041.a5957","2c7f01c5.d1483e","77713445.407e8c"]]},{"id":"59a50991.835d68","type":"server-state-changed","z":"8df51809.834bf8","name":"Motion changed to = on","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.motionsensor_do","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,"x":320,"y":100,"wires":[["3712c8ee.ab6208"],["4a8517b.ff755e8"]]},{"id":"cef25b82.07e338","type":"server-state-changed","z":"8df51809.834bf8","name":"Manuell change to = on","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.manuell_do","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,"x":340,"y":180,"wires":[["263e8cc4.4e41b4"],["759ad7f.a917628"]]},{"id":"759ad7f.a917628","type":"api-current-state","z":"8df51809.834bf8","name":"Motion = on","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.motionsensor_do","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":570,"y":200,"wires":[["d2be6cb0.8aa88"],["2de39bf8.bdb664"]]},{"id":"3712c8ee.ab6208","type":"api-current-state","z":"8df51809.834bf8","name":"Manuell = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.manuell_do","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":550,"y":80,"wires":[["263e8cc4.4e41b4","d2be6cb0.8aa88"],[]]},{"id":"4a8517b.ff755e8","type":"api-current-state","z":"8df51809.834bf8","name":"Manuell = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.manuell_do","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":550,"y":129,"wires":[["2de39bf8.bdb664"],[]]},{"id":"d2be6cb0.8aa88","type":"api-current-state","z":"8df51809.834bf8","name":"Nattlys = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.scene_nattlys","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":810,"y":80,"wires":[["b7f54c85.d6ff"],["f7096aba.1c3eb8"]]},{"id":"2de39bf8.bdb664","type":"api-current-state","z":"8df51809.834bf8","name":"Nattlys = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.scene_nattlys","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":810,"y":120,"wires":[["a22383a7.08742"],["2c7f01c5.d1483e","77713445.407e8c"]]},{"id":"4f6e7d61.187c84","type":"stoptimer","z":"8df51809.834bf8","duration":"5","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":1240,"y":180,"wires":[["99bfd66f.91ce28"],[]]},{"id":"42f99041.a5957","type":"stoptimer","z":"8df51809.834bf8","duration":"10","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":1240,"y":240,"wires":[["43054cb1.e3ae64"],[]]},{"id":"8cf81503.5305d8","type":"api-call-service","z":"8df51809.834bf8","name":"Set lys Do 75%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_do","data":"{\"brightness_pct\":75,\"transition\":3}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1220,"y":60,"wires":[[]]},{"id":"2c7f01c5.d1483e","type":"stoptimer","z":"8df51809.834bf8","duration":"1","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":1240,"y":300,"wires":[["ed2f0ad9.e1a8f8"],[]]},{"id":"867f9a4e.6b3de8","type":"api-call-service","z":"8df51809.834bf8","name":"Set lys Do 35%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_do","data":"{\"brightness_pct\":35,\"transition\":4}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1220,"y":20,"wires":[[]]},{"id":"f7096aba.1c3eb8","type":"api-call-service","z":"8df51809.834bf8","name":"Set lys Do 20%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_do","data":"{\"brightness_pct\":20,\"transition\":4}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1220,"y":100,"wires":[[]]},{"id":"a22383a7.08742","type":"time-range-switch","z":"8df51809.834bf8","name":"Tid = Morgenlys","lat":"","lon":"","startTime":"04:00","endTime":"07:30","startOffset":0,"endOffset":0,"x":1020,"y":120,"wires":[["2c7f01c5.d1483e","77713445.407e8c"],["4f6e7d61.187c84","42f99041.a5957"]]},{"id":"77713445.407e8c","type":"stoptimer","z":"8df51809.834bf8","duration":"2","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":1240,"y":360,"wires":[["f6b91247.e0e51"],[]]},{"id":"f6b91247.e0e51","type":"api-call-service","z":"8df51809.834bf8","name":"Turn off lys Do","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.lys_do","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1440,"y":360,"wires":[[]]},{"id":"ed2f0ad9.e1a8f8","type":"api-call-service","z":"8df51809.834bf8","name":"Set lys Do 2%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_do","data":"{\"brightness_pct\":2,\"transition\":10}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1440,"y":300,"wires":[[]]},{"id":"43054cb1.e3ae64","type":"api-call-service","z":"8df51809.834bf8","name":"Turn off lys Do","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.lys_do","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1440,"y":240,"wires":[[]]},{"id":"99bfd66f.91ce28","type":"api-call-service","z":"8df51809.834bf8","name":"Set lys Do 5%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_do","data":"{\"brightness_pct\":5,\"transition\":10}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1440,"y":180,"wires":[[]]},{"id":"a5d88682.cbd918","type":"comment","z":"8df51809.834bf8","name":"Do","info":"","x":290,"y":40,"wires":[]},{"id":"ac20270b.4d8de8","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

 

Denne posten ser jeg at ble ganske lang, jeg tenker ikke at poster trenger være så omfattende og beskrivende som denne. Det viktigste tenker jeg er å få se andres eksempler og bli inspirert til å automatisere selv. Post dine eksempler uten forklaring om du ønsker! :) 

 

Endret av henlagt
  • Like 3
Skrevet

Oppdatert versjon 🙂

 

image.thumb.png.090814ad4318487a5515c3ba342bead3.png

 

[{"id":"8df51809.834bf8","type":"tab","label":"Do","disabled":false,"info":""},{"id":"b7f54c85.d6ff","type":"time-range-switch","z":"8df51809.834bf8","name":"Tid = Morgenlys","lat":"","lon":"","startTime":"04:00","endTime":"07:30","startOffset":0,"endOffset":0,"x":1000,"y":100,"wires":[["9f9a8fa8.2a143"],["f580ce3c.8e034"]]},{"id":"263e8cc4.4e41b4","type":"change","z":"8df51809.834bf8","name":"Send stop to timer","rules":[{"t":"set","p":"payload","pt":"msg","to":"stop","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":340,"wires":[["4f6e7d61.187c84","42f99041.a5957","2c7f01c5.d1483e","77713445.407e8c"]]},{"id":"59a50991.835d68","type":"server-state-changed","z":"8df51809.834bf8","name":"Motion changed to = on","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.motionsensor_do","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,"x":320,"y":160,"wires":[["3712c8ee.ab6208"],["4a8517b.ff755e8"]]},{"id":"cef25b82.07e338","type":"server-state-changed","z":"8df51809.834bf8","name":"Manuell change to = on","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.manuell_do","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,"x":220,"y":260,"wires":[["263e8cc4.4e41b4"],["759ad7f.a917628"]]},{"id":"759ad7f.a917628","type":"api-current-state","z":"8df51809.834bf8","name":"Motion = on","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.motionsensor_do","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":470,"y":300,"wires":[["d2be6cb0.8aa88"],["6d0ee25f.ae05bc"]]},{"id":"3712c8ee.ab6208","type":"api-current-state","z":"8df51809.834bf8","name":"Manuell = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.manuell_do","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":550,"y":140,"wires":[["263e8cc4.4e41b4","d2be6cb0.8aa88"],[]]},{"id":"4a8517b.ff755e8","type":"api-current-state","z":"8df51809.834bf8","name":"Manuell = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.manuell_do","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":550,"y":189,"wires":[["2de39bf8.bdb664"],[]]},{"id":"d2be6cb0.8aa88","type":"api-current-state","z":"8df51809.834bf8","name":"Nattlys = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.scene_nattlys","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":810,"y":140,"wires":[["b7f54c85.d6ff"],["49f45adb.35ff04"]]},{"id":"2de39bf8.bdb664","type":"api-current-state","z":"8df51809.834bf8","name":"Nattlys = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.scene_nattlys","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":810,"y":200,"wires":[["a22383a7.08742"],["2c7f01c5.d1483e","77713445.407e8c"]]},{"id":"4f6e7d61.187c84","type":"stoptimer","z":"8df51809.834bf8","duration":"5","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":1240,"y":300,"wires":[["99bfd66f.91ce28"],[]]},{"id":"42f99041.a5957","type":"stoptimer","z":"8df51809.834bf8","duration":"10","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":1240,"y":360,"wires":[["43054cb1.e3ae64"],[]]},{"id":"8cf81503.5305d8","type":"api-call-service","z":"8df51809.834bf8","name":"Set lys Do 75%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_do","data":"{\"brightness_pct\":75,\"transition\":3}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1520,"y":109,"wires":[[]]},{"id":"2c7f01c5.d1483e","type":"stoptimer","z":"8df51809.834bf8","duration":"1","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":1240,"y":420,"wires":[["ed2f0ad9.e1a8f8"],[]]},{"id":"867f9a4e.6b3de8","type":"api-call-service","z":"8df51809.834bf8","name":"Set lys Do 35%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_do","data":"{\"brightness_pct\":35,\"transition\":4}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1520,"y":40,"wires":[[]]},{"id":"f7096aba.1c3eb8","type":"api-call-service","z":"8df51809.834bf8","name":"Set lys Do 20%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_do","data":"{\"brightness_pct\":20,\"transition\":4}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1540,"y":180,"wires":[[]]},{"id":"a22383a7.08742","type":"time-range-switch","z":"8df51809.834bf8","name":"Tid = Morgenlys","lat":"","lon":"","startTime":"04:00","endTime":"07:30","startOffset":0,"endOffset":0,"x":1020,"y":200,"wires":[["2c7f01c5.d1483e","77713445.407e8c"],["4f6e7d61.187c84","42f99041.a5957"]]},{"id":"77713445.407e8c","type":"stoptimer","z":"8df51809.834bf8","duration":"2","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":1240,"y":480,"wires":[["f6b91247.e0e51"],[]]},{"id":"f6b91247.e0e51","type":"api-call-service","z":"8df51809.834bf8","name":"Turn off lys Do","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.lys_do","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1440,"y":480,"wires":[[]]},{"id":"ed2f0ad9.e1a8f8","type":"api-call-service","z":"8df51809.834bf8","name":"Set lys Do 2%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_do","data":"{\"brightness_pct\":2,\"transition\":10}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1440,"y":420,"wires":[[]]},{"id":"43054cb1.e3ae64","type":"api-call-service","z":"8df51809.834bf8","name":"Turn off lys Do","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.lys_do","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1440,"y":360,"wires":[[]]},{"id":"99bfd66f.91ce28","type":"api-call-service","z":"8df51809.834bf8","name":"Set lys Do 5%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_do","data":"{\"brightness_pct\":5,\"transition\":10}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1440,"y":300,"wires":[[]]},{"id":"a5d88682.cbd918","type":"comment","z":"8df51809.834bf8","name":"Do","info":"","x":290,"y":100,"wires":[]},{"id":"6d0ee25f.ae05bc","type":"api-current-state","z":"8df51809.834bf8","name":"Lys på?","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.lys_do","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":660,"y":300,"wires":[["2de39bf8.bdb664"],[]]},{"id":"9f9a8fa8.2a143","type":"api-current-state","z":"8df51809.834bf8","name":"Lys av?","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.lys_do","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1220,"y":60,"wires":[["867f9a4e.6b3de8"],["cb92530f.c8b22"]]},{"id":"cb92530f.c8b22","type":"switch","z":"8df51809.834bf8","name":"Ikke 35%","property":"data.attributes.brightness","propertyType":"msg","rules":[{"t":"neq","v":"35","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1360,"y":73,"wires":[["867f9a4e.6b3de8"]]},{"id":"f580ce3c.8e034","type":"api-current-state","z":"8df51809.834bf8","name":"Lys av?","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.lys_do","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1220,"y":109,"wires":[["8cf81503.5305d8"],["60821e56.a5464"]]},{"id":"60821e56.a5464","type":"switch","z":"8df51809.834bf8","name":"Ikke 75%","property":"data.attributes.brightness","propertyType":"msg","rules":[{"t":"neq","v":"75","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1360,"y":129,"wires":[["8cf81503.5305d8"]]},{"id":"49f45adb.35ff04","type":"api-current-state","z":"8df51809.834bf8","name":"Lys av?","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.lys_do","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1220,"y":168,"wires":[["f7096aba.1c3eb8"],["df9854c4.b5dcc8"]]},{"id":"df9854c4.b5dcc8","type":"switch","z":"8df51809.834bf8","name":"Ikke 20%","property":"data.attributes.brightness","propertyType":"msg","rules":[{"t":"neq","v":"20","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1380,"y":200,"wires":[["f7096aba.1c3eb8"]]},{"id":"ac20270b.4d8de8","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

 

  • Like 2
Skrevet

Hvis du tenker at mitt første eksempel var overveldende og ikke så lett å starte med.

 

Her har jeg et enkelt eksempel, som egentlig gjør det samme, men uten alle mine ulike varianter. Denne skrur på lyset ved bevegelse og av igjen etter 5 minutter. Ved ny bevegelse, så restarter timeren.

 

image.png.fafc6113c1413ee57b54e36bf3b80bb4.png

 

[{"id":"b45d30d7.035af","type":"server-state-changed","z":"8df51809.834bf8","name":"Motion changed to = on","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.motionsensor_do","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,"x":300,"y":700,"wires":[["e2328b38.5d6508"],[]]},{"id":"e2328b38.5d6508","type":"trigger","z":"8df51809.834bf8","name":"","op1":"5 minutter trigger","op2":"0","op1type":"str","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":510,"y":700,"wires":[["246e942f.91e84c"],["e1f24b3a.e02ac8"]]},{"id":"246e942f.91e84c","type":"api-call-service","z":"8df51809.834bf8","name":"Set lys Do 75%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_do","data":"{\"brightness_pct\":75,\"transition\":3}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":700,"y":680,"wires":[[]]},{"id":"e1f24b3a.e02ac8","type":"api-call-service","z":"8df51809.834bf8","name":"Turn off lys Do","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.lys_do","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":700,"y":720,"wires":[[]]},{"id":"ac20270b.4d8de8","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

 

  • Like 1
Skrevet

Her har jeg en flow, som ved hjelp av min iPhone styrer alarm og dørlåsen.

Jeg er litt usikker på det riktige navnet for denne funksjonen i iOS, men tror det er bedtime. Med bedtime kan jeg fortelle når jeg har planer om å legge meg og hvilket klokkeslett jeg skal opp. Med denne informasjonen kan jeg med kombinasjonen Apple sin app "Shortcuts" og mobil appen til Home Assitant trigge en event som plukkes opp i Node-RED.

 

Den øverste flow'en lytter på events i kategori "ios.action_fired". Så sjekker jeg om det er min telefon som har trigget det, og hvilken event min telefon trigget. De to jeg bruker her har jeg kalt sengetid og morgenrutine. Jeg har splittet opp flow'en her i to og i den første trigger jeg to virtuelle noder (input_boolean i HA). De igjen trigger flow'en under som så kjører automasjonen for alarm og dør. Grunnen til at jeg trigger disse virtuelle nodene er for å ha muligheten til å kjøre denne automasjon manuelt, eller på annen måte enn via min mobil. Da kan disse virtuelle nodene gjenbrukes og jeg slipper å skrive den delen av automasjonen på nytt.

 

image.thumb.png.61a974084eb4c46d4e130249eab77d80.png

 

Koden for de som måtte ønske (jeg har maskert noe info her siden det er automasjon av alarm og dørlås):

[{"id":"d9642849.b25d38","type":"server-state-changed","z":"9bb0c125.f0cf1","name":"Henning morgenrutine aktivert","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.****_wakeup_henning","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":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":260,"y":480,"wires":[["74c41e6c.ace89"],[]]},{"id":"74c41e6c.ace89","type":"api-current-state","z":"9bb0c125.f0cf1","name":"Henning hjemme?","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.virtual_henning","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":490,"y":480,"wires":[["5da8efe0.b3752","4eaaaad0.3df514"],[]]},{"id":"5da8efe0.b3752","type":"api-current-state","z":"9bb0c125.f0cf1","name":"Alarm = not disarmed","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"disarmed","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"alarm_control_panel.****","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":720,"y":440,"wires":[["6db0162b.253d98"],[]]},{"id":"4eaaaad0.3df514","type":"api-current-state","z":"9bb0c125.f0cf1","name":"Lock = locked","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"locked","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"lock.****","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":700,"y":500,"wires":[["3653f64b.6d21ea"],[]]},{"id":"3653f64b.6d21ea","type":"api-call-service","z":"9bb0c125.f0cf1","name":"Lås opp dør","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"lock","service":"unlock","entityId":"lock.****","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":870,"y":500,"wires":[[]]},{"id":"6db0162b.253d98","type":"api-call-service","z":"9bb0c125.f0cf1","name":"Disarm alarm","server":"ac20270b.4d8de8","version":1,"debugenabled":true,"service_domain":"alarm_control_panel","service":"alarm_disarm","entityId":"alarm_control_panel.*****","data":"{\"code\":\"****\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":910,"y":440,"wires":[[]]},{"id":"bfe9a1c8.54eee","type":"server-events","z":"9bb0c125.f0cf1","name":"","server":"ac20270b.4d8de8","event_type":"ios.action_fired","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"x":240,"y":340,"wires":[["c26f8820.aa3df8"]]},{"id":"c26f8820.aa3df8","type":"switch","z":"9bb0c125.f0cf1","name":"Henning sin iPhone?","property":"payload.event.sourceDeviceID","propertyType":"msg","rules":[{"t":"eq","v":"henning_lauritsens****","vt":"str"}],"checkall":"false","repair":false,"outputs":1,"x":480,"y":340,"wires":[["4edf9a67.643b54"]]},{"id":"4edf9a67.643b54","type":"switch","z":"9bb0c125.f0cf1","name":"Hvilken action?","property":"payload.event.actionName","propertyType":"msg","rules":[{"t":"eq","v":"morgenrutine","vt":"str"},{"t":"eq","v":"sengetid","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":680,"y":340,"wires":[["2603f666.572fca"],["3ba9a64e.99a9aa"]]},{"id":"5a62ffae.4af44","type":"api-call-service","z":"9bb0c125.f0cf1","name":"Set boolean Henning wakeup - on","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.****_wakeup_henning","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1160,"y":280,"wires":[[]]},{"id":"2603f666.572fca","type":"trigger","z":"9bb0c125.f0cf1","name":"timer 10 sec","op1":"ON","op2":"OFF","op1type":"str","op2type":"str","duration":"10","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":870,"y":300,"wires":[["5a62ffae.4af44"],["f9eac70b.1df728"]]},{"id":"f9eac70b.1df728","type":"api-call-service","z":"9bb0c125.f0cf1","name":"Set boolean Henning wakeup - off","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.****_wakeup_henning","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1160,"y":320,"wires":[[]]},{"id":"e4a9c676.9c87d8","type":"api-call-service","z":"9bb0c125.f0cf1","name":"Set boolean Henning leggetid - on","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.****_wakeup_henning","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1160,"y":360,"wires":[[]]},{"id":"3ba9a64e.99a9aa","type":"trigger","z":"9bb0c125.f0cf1","name":"timer 10 sec","op1":"ON","op2":"OFF","op1type":"str","op2type":"str","duration":"10","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":870,"y":380,"wires":[["e4a9c676.9c87d8"],["6b53a769.3bfe08"]]},{"id":"6b53a769.3bfe08","type":"api-call-service","z":"9bb0c125.f0cf1","name":"Set boolean Henning leggetid - off","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.****_wakeup_henning","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1160,"y":400,"wires":[[]]},{"id":"3a635327.66a01c","type":"api-current-state","z":"9bb0c125.f0cf1","name":"Henning hjemme?","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.virtual_henning","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":468,"y":594,"wires":[["88497e83.97f43","f762608a.98c5d"],[]]},{"id":"88497e83.97f43","type":"api-current-state","z":"9bb0c125.f0cf1","name":"Alarm = disarmed","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"disarmed","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"alarm_control_panel.*****","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":670,"y":560,"wires":[["87a4fd17.bd845"],[]]},{"id":"f762608a.98c5d","type":"api-current-state","z":"9bb0c125.f0cf1","name":"Lock = unlocked","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"unlocked","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"lock.****","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":670,"y":620,"wires":[["fb640f08.a2f94"],[]]},{"id":"fb640f08.a2f94","type":"api-call-service","z":"9bb0c125.f0cf1","name":"Lås opp dør","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"lock","service":"lock","entityId":"lock.****","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":870,"y":620,"wires":[[]]},{"id":"87a4fd17.bd845","type":"api-call-service","z":"9bb0c125.f0cf1","name":"set Alarm arm_home","server":"ac20270b.4d8de8","version":1,"debugenabled":true,"service_domain":"alarm_control_panel","service":"alarm_arm_home","entityId":"alarm_control_panel.*****","data":"{\"code\":\"****\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":880,"y":560,"wires":[[]]},{"id":"48f27e69.1c71e","type":"server-state-changed","z":"9bb0c125.f0cf1","name":"Henning sengetid aktivert","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.****_bedtime_henning","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":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":246,"y":592,"wires":[["3a635327.66a01c"],[]]},{"id":"ac20270b.4d8de8","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

 

  • Like 1
Skrevet

Her har jeg et eksempel hvor jeg bruker en Xiaomi Aqara button for å skru lys automasjon av/på og styre Ikea rullegardiner.

De to rommene jeg styrer her har normalt bevegelsessensor og automasjon for styring av lyset, men rommet brukes for dagsoving til minsten i helgen og da er det litt upraktisk at lyset går på ved bevegelse.

  • Ett klikk, rommet settes i auto og rullegardinene går opp.
  • To klikk, rommet settes i manuell og for å få bekreftelse på det så flasher lyset
  • Tre klikk, rommet settes i manuell, den ene taklampen settes til 5% de andre skrus av, rullegardinene går ned.

 

image.thumb.png.9346f89b014c786bea2ae485526a987c.png

 

Kode:

[{"id":"16f99d2a.744dd3","type":"switch","z":"cf70e5ae.0af7d8","name":"Get Event id Spillrom Aqara Button","property":"payload.event.id","propertyType":"msg","rules":[{"t":"eq","v":"bryter_spillrom_scener","vt":"str"}],"checkall":"false","repair":false,"outputs":1,"x":396,"y":100,"wires":[["5b0b6400.17928c"]]},{"id":"5b0b6400.17928c","type":"switch","z":"cf70e5ae.0af7d8","name":"Get clicks","property":"payload.event.event","propertyType":"msg","rules":[{"t":"eq","v":"1002","vt":"str"},{"t":"eq","v":"1004","vt":"str"},{"t":"eq","v":"1006","vt":"str"},{"t":"eq","v":"1008","vt":"str"}],"checkall":"false","repair":false,"outputs":4,"x":620,"y":100,"wires":[["e2f10785.ceb688"],["12cb2dd2.2a8ba2"],["e67c125e.61b3d"],[]]},{"id":"e4181753.f186b8","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Set lys taklampe spillrom 5%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.spillrom_taklampe","data":"{\"kelvin\":2256,\"brightness_pct\":5}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1130,"y":143,"wires":[["993af6d.f775308"]]},{"id":"993af6d.f775308","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Turn off lys spillrom spot 1 & 2","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.spillrom_spot_1, light.spillrom_spot_2","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1400,"y":143,"wires":[["c0cbce5a.bf357"]]},{"id":"c0cbce5a.bf357","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Rullegardiner kontor og spillrom ned","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"cover","service":"close_cover","entityId":"cover.blind_kontor, cover.blind_spillrom","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1701,"y":143,"wires":[[]]},{"id":"e67c125e.61b3d","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Set spillrom og kontor manuell - on","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.manuell_spillrommet, input_boolean.manuell_kontoret","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":853,"y":143,"wires":[["e4181753.f186b8"]]},{"id":"9bb13e2e.10ff2","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Rullegardiner kontor og spillrom opp","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"cover","service":"open_cover","entityId":"cover.blind_kontor, cover.blind_spillrom","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1163,"y":44,"wires":[[]]},{"id":"e2f10785.ceb688","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Set spillrom og kontor manuell - off","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.manuell_spillrommet, input_boolean.manuell_kontoret","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":855,"y":44,"wires":[["9bb13e2e.10ff2"]]},{"id":"12cb2dd2.2a8ba2","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Set spillrom og kontor manuell - on","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.manuell_spillrommet, input_boolean.manuell_kontoret","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":855,"y":94,"wires":[["6f935438.78f7cc"]]},{"id":"6f935438.78f7cc","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Flash light","server":"ac20270b.4d8de8","version":1,"debugenabled":true,"service_domain":"light","service":"turn_on","entityId":"light.lys_spillrom_taklys","data":"{\"flash\":\"short\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1085,"y":94,"wires":[[]]},{"id":"f4571ec5.48cd5","type":"server-events","z":"cf70e5ae.0af7d8","name":"","server":"5f450dd2.c65454","event_type":"deconz_event","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"x":133,"y":100,"wires":[["16f99d2a.744dd3"]]},{"id":"ac20270b.4d8de8","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"5f450dd2.c65454","type":"server","name":"Home Assistant - rpi4-deconz","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

 

  • Like 1
Skrevet

Noen ganger dro vi fra huset med musikken stående på. Ikke noe stor sak, men heller ikke nødvendig med litt automasjon 🙂

 

image.thumb.png.3bfd25f06f2e55137cb1662d99a73a48.png

 

Kode:

[{"id":"d2c09d6b.99971","type":"server-state-changed","z":"cf70e5ae.0af7d8","name":"Ingen hjemme = on","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.ingen_hjemme","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,"x":130,"y":800,"wires":[["1c18221b.713e5e","4e20b760.485f18","b4700fda.ce869","158f239c.d218cc","b636880a.a90088","a0002f12.f7c4b","85a2f9b.67da108","caf5d17e.7a4e9","8e0ffa73.99de98","4aca48ba.f73d48","59805cbe.aa0474","9b4c812e.143b1"],[]]},{"id":"1c18221b.713e5e","type":"api-current-state","z":"cf70e5ae.0af7d8","name":"Sonos Spillrom = playing","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.spillrom","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":390,"y":540,"wires":[["fdf3da66.581118"],[]]},{"id":"fdf3da66.581118","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Pause Sonos","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"media_pause","entityId":"media_player.spillrom","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":589,"y":534,"wires":[[]]},{"id":"4e20b760.485f18","type":"api-current-state","z":"cf70e5ae.0af7d8","name":"Sonos Bad = playing","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.bathroom","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":380,"y":588,"wires":[["1711ef4a.6ea521"],[]]},{"id":"1711ef4a.6ea521","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Pause Sonos","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"media_pause","entityId":"media_player.bathroom","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":569,"y":581,"wires":[[]]},{"id":"b4700fda.ce869","type":"api-current-state","z":"cf70e5ae.0af7d8","name":"Sonos Kjøkken = playing","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.kjokken","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":390,"y":634,"wires":[["6c0c939f.6e388c"],[]]},{"id":"6c0c939f.6e388c","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Pause Sonos","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"media_pause","entityId":"media_player.kitchen","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":590,"y":628,"wires":[[]]},{"id":"158f239c.d218cc","type":"api-current-state","z":"cf70e5ae.0af7d8","name":"Sonos Stua = playing","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.stue","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":380,"y":682,"wires":[["a69669be.853488"],[]]},{"id":"a69669be.853488","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Pause Sonos","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"media_pause","entityId":"media_player.atv_room","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":570,"y":675,"wires":[[]]},{"id":"b636880a.a90088","type":"api-current-state","z":"cf70e5ae.0af7d8","name":"Sonos Sov MH = playing","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.sov_mh","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":390,"y":731,"wires":[["c6b37c6f.8b458"],[]]},{"id":"c6b37c6f.8b458","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Pause Sonos","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"media_pause","entityId":"media_player.spillrom","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":590,"y":724,"wires":[[]]},{"id":"a0002f12.f7c4b","type":"api-current-state","z":"cf70e5ae.0af7d8","name":"Sonos Kjellerstue = playing","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.kjellerstue","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":400,"y":781,"wires":[["65627808.3ccd98"],[]]},{"id":"65627808.3ccd98","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Pause Sonos","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"media_pause","entityId":"media_player.kjellerstue","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":609,"y":774,"wires":[[]]},{"id":"85a2f9b.67da108","type":"api-current-state","z":"cf70e5ae.0af7d8","name":"Sonos Vaskerom = playing","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.vaskerom","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":400,"y":831,"wires":[["7d8d6621.ec80d8"],[]]},{"id":"7d8d6621.ec80d8","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Pause Sonos","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"media_pause","entityId":"media_player.vaskerommet","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":609,"y":824,"wires":[[]]},{"id":"caf5d17e.7a4e9","type":"api-current-state","z":"cf70e5ae.0af7d8","name":"Sonos Sov KC = playing","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.sov_kc","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":390,"y":881,"wires":[["7d698794.a56cf8"],[]]},{"id":"7d698794.a56cf8","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Pause Sonos","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"media_pause","entityId":"media_player.hagen","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":590,"y":875,"wires":[[]]},{"id":"8e0ffa73.99de98","type":"api-current-state","z":"cf70e5ae.0af7d8","name":"Sonos Sov TS = playing","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.sov_ts","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":390,"y":930,"wires":[["99e4bad5.6b9888"],[]]},{"id":"99e4bad5.6b9888","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Pause Sonos","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"media_pause","entityId":"media_player.sov_kct","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":590,"y":923,"wires":[[]]},{"id":"4aca48ba.f73d48","type":"api-current-state","z":"cf70e5ae.0af7d8","d":true,"name":"Sonos Garasjen = playing","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.garasjen","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":390,"y":977,"wires":[["4c4bd53f.7e51cc"],[]]},{"id":"4c4bd53f.7e51cc","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Pause Sonos","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"media_pause","entityId":"media_player.garasjen","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":590,"y":970,"wires":[[]]},{"id":"59805cbe.aa0474","type":"api-current-state","z":"cf70e5ae.0af7d8","name":"Sonos Kontor = playing","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.kontor","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":390,"y":1027,"wires":[["541b1884.4d1cc8"],[]]},{"id":"541b1884.4d1cc8","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Pause Sonos","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"media_pause","entityId":"media_player.terrassen","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":592,"y":1020,"wires":[[]]},{"id":"9b4c812e.143b1","type":"api-current-state","z":"cf70e5ae.0af7d8","d":true,"name":"Sonos Basseng = playing","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"playing","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.basseng","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":390,"y":1075,"wires":[["b47dfef6.9f83a"],[]]},{"id":"b47dfef6.9f83a","type":"api-call-service","z":"cf70e5ae.0af7d8","name":"Pause Sonos","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"media_pause","entityId":"media_player.basseng","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":589,"y":1069,"wires":[[]]},{"id":"ac20270b.4d8de8","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

 

  • Like 1
Skrevet

Her er flow for å styre en panelovn. Panelovnen dekker to rom og det er ingen dør i mellom de. Jeg har derfor benyttet Xioami Aqara temperatur og fuktighetssensor på begge rommene og styrer panelovnen etter snittet av de to.

I Home Assistant har jeg laget en Generic Thermostat som leser temp og styrer en Fibaro Wall plugg for å skru panelovnen på/av. Jeg har også laget virtuelle enheter for å styre komfort- og økonomi-modus.

 

I denne flowen har jeg en type node som ikke jeg har i noen av de tidligere eksemplene, inject-node. Denne kan brukes for å trigge en flow til gitt tid og gitt dag.

 

image.thumb.png.1844d9e7e39db6281bca61f56f782a37.png

 

Kode:

[{"id":"4efeb115.8c62b","type":"server-state-changed","z":"3c46cbf8.e1e0b4","name":"State changed - Temp kontor","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.temperatur_kontor","entityidfiltertype":"exact","outputinitially":true,"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,"x":160,"y":840,"wires":[["ef6bfb58.c78f98"]]},{"id":"dce161b.11876a","type":"server-state-changed","z":"3c46cbf8.e1e0b4","name":"State changed - Temp spillrom","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.temperatur_spillrom","entityidfiltertype":"exact","outputinitially":true,"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,"x":150,"y":780,"wires":[["ef6bfb58.c78f98"]]},{"id":"ef6bfb58.c78f98","type":"average","z":"3c46cbf8.e1e0b4","name":"Temp avg","topic":"","x":380,"y":811,"wires":[["7e8a897d.b25c98"]]},{"id":"7e8a897d.b25c98","type":"api-call-service","z":"3c46cbf8.e1e0b4","name":"Set avg temp","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"input_number","service":"set_value","entityId":"input_number.temp_avg_spillrom_kontor","data":"{\"value\":\"{{payload}}\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":553,"y":811,"wires":[[]]},{"id":"2bd19596.2c4bca","type":"server-state-changed","z":"3c46cbf8.e1e0b4","name":"State changed - Set point Eco","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.setpoint_spillrom_eco","entityidfiltertype":"exact","outputinitially":true,"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,"x":180,"y":980,"wires":[["eb0d79ae.e9cc18"]]},{"id":"eb0d79ae.e9cc18","type":"api-current-state","z":"3c46cbf8.e1e0b4","name":"Eco = on","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.spillrom_eco","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":401,"y":974,"wires":[["404cb5b1.7238fc"],[]]},{"id":"38442988.8a4b06","type":"server-state-changed","z":"3c46cbf8.e1e0b4","name":"State changed - Spillrom Eco","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.spillrom_eco","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,"x":181,"y":1037,"wires":[["2b963406.fd75ac"],["bbcb6d34.ef595"]]},{"id":"2b963406.fd75ac","type":"api-current-state","z":"3c46cbf8.e1e0b4","name":"Hent eco temp","server":"ac20270b.4d8de8","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.setpoint_spillrom_eco","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":421,"y":1030,"wires":[["b2a70ff3.a3853"]]},{"id":"b2a70ff3.a3853","type":"api-call-service","z":"3c46cbf8.e1e0b4","name":"Set thermostat temp","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"climate","service":"set_temperature","entityId":"climate.spillrom","data":"{\"temperature\":{{payload}}}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":821,"y":1030,"wires":[[]]},{"id":"bbcb6d34.ef595","type":"api-current-state","z":"3c46cbf8.e1e0b4","name":"Hent comf temp","server":"ac20270b.4d8de8","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.setpoint_spillrom_comf","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":421,"y":1084,"wires":[["b2a70ff3.a3853"]]},{"id":"d322b35b.a887","type":"server-state-changed","z":"3c46cbf8.e1e0b4","name":"State changed - Set point comf","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.setpoint_spillrom_comf","entityidfiltertype":"exact","outputinitially":true,"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,"x":191,"y":930,"wires":[["4849a701.d28658"]]},{"id":"4849a701.d28658","type":"api-current-state","z":"3c46cbf8.e1e0b4","name":"Eco = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.spillrom_eco","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":401,"y":922,"wires":[["5d148866.f4b728"],[]]},{"id":"5d148866.f4b728","type":"api-current-state","z":"3c46cbf8.e1e0b4","name":"Hent temp","server":"ac20270b.4d8de8","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.setpoint_spillrom_comf","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":571,"y":910,"wires":[["b2a70ff3.a3853"]]},{"id":"404cb5b1.7238fc","type":"api-current-state","z":"3c46cbf8.e1e0b4","name":"Hent temp","server":"ac20270b.4d8de8","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.setpoint_spillrom_eco","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":571,"y":970,"wires":[["b2a70ff3.a3853"]]},{"id":"eb4de0f0.6253f","type":"inject","z":"3c46cbf8.e1e0b4","name":"Tid = 06.30 hverdag","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"30 06 * * 1,2,3,4,5","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":141,"y":1161,"wires":[["86c2ce64.a0b98"]]},{"id":"bdfdb567.b589b8","type":"inject","z":"3c46cbf8.e1e0b4","name":"Tid = 08.00 helg","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 08 * * 6,0","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":145,"y":1212,"wires":[["86c2ce64.a0b98"]]},{"id":"86c2ce64.a0b98","type":"api-call-service","z":"3c46cbf8.e1e0b4","name":"Turn off eco","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.spillrom_eco","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":351,"y":1190,"wires":[[]]},{"id":"4894bafe.dae8a4","type":"inject","z":"3c46cbf8.e1e0b4","name":"Tid = 22.30 hverdag","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"30 22 * * 1,2,3,4,5","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":141,"y":1310,"wires":[["56582f3a.3c1b1"]]},{"id":"e19d2e7.1be3cd","type":"inject","z":"3c46cbf8.e1e0b4","name":"Tid = 23.00 helg","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 23 * * 6,0","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":148,"y":1360,"wires":[["56582f3a.3c1b1"]]},{"id":"56582f3a.3c1b1","type":"api-call-service","z":"3c46cbf8.e1e0b4","name":"Turn on eco","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.spillrom_eco","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":351,"y":1330,"wires":[[]]},{"id":"d67913ad.ff407","type":"server-state-changed","z":"3c46cbf8.e1e0b4","name":"Hus changed to home","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.hus_home","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,"x":141,"y":1259,"wires":[["86c2ce64.a0b98"],["56582f3a.3c1b1"]]},{"id":"ac20270b.4d8de8","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

 

  • Like 1
Skrevet (endret)

Oppdatert 16/12-20.

Prøveprosjektet med HUE dimmeren er ferdig. 

Flow er ryddet litt og oppdatert med endelig kode.

 

Opprinnelig post:

Her er et nytt rom og enda litt utvidet styring av lyset.

Spesielt nå som det blir mer hjemmekontor enn normalt, så er det fint at lyset ikke plutselig skrus av når jeg jobber. Jeg løste dette med en Fibaro Wall plug som rapporterer strømbruken til skjermen som også fungerer som docking for min mac.

Siden dette er kontoret mitt, så er det rommet hvor jeg har prøveprosjekt med HUE dimmeren. Her forsøker jeg å overstyre automasjonen, i én time eller til off knappen blir holdt inne, hvis HUE dimmeren blir benyttet. Foreløpig virker det som den funksjonen virker ok.

 

 

image.thumb.png.2956bcfd8b6e90b181cba03700b21131.png

 

Kode:

[{"id":"384f77e4.0ac5a8","type":"group","z":"c73cf615.f18078","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["3590dbf9.f45934","58f2dc91.5bfa94","4e531a47.1403f4","55011687.ecb508","2cebcc70.46ae54","7b204c06.1a33d4","e0f2e16e.91a31","f33772d1.d7ed6","735af4c1.cb824c","ece6ead9.2972d8","8f350e96.9950f","856248e2.bea3b8","c149417b.007cd","7fbdfbd7.256dd4","aa83002c.8a2f2","b299693c.e47808","6f7d7315.cc9d5c","85014b30.fa5598","8cfa8ccd.80895","138b412a.fb823f","5f1c7646.eb0b08","e7561d00.823c6","32be2710.0e5378","581eb935.9f2a58","fa102ed.cd34bd","21e9feec.f452c2","ac7b2071.96718","2f0e5fed.7dd29","f3c61e6e.6ee23","3b42ee5e.3971b2","e1ed6dcf.05e05","edf1f733.341bb8","ba0bb07c.aa3a9","4f5bb01e.ae4f1","43efa403.0c4f2c","d79a092f.f6cee8","a43750ab.a9479","cb768e5c.453b4","82a015ff.f9e718","9ee933af.893ea","cf60df67.40b47","f702cbbf.2b9ef8","560add46.1c6cb4","bd9242be.5aae1","cd83b74f.d65b38","f89d54a2.6c9908","512169b7.af6a78","c92944db.668308","e1bab322.2a69f","1dc1fd6.24bbd03","330eecd1.103794","d4715e48.292ca","4d21843e.19dcfc","3823453f.938e6a","365a20ba.d11c7","e9b85204.03b91","867a2082.99458","1cb1ab66.084be5","797ebc06.9d6b64","c60128cd.ebfb98","8a2f9b09.489ea8","f690e08c.6d1b6"],"x":14,"y":51,"w":1749,"h":850},{"id":"3590dbf9.f45934","type":"server-state-changed","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Motion = on","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.motionsensor_kontor","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,"x":130,"y":280,"wires":[["ba0bb07c.aa3a9"],["4f5bb01e.ae4f1"]]},{"id":"58f2dc91.5bfa94","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Manuell = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.manuell_kontoret","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":524,"y":257,"wires":[["f89d54a2.6c9908"],[]]},{"id":"4e531a47.1403f4","type":"time-range-switch","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Tid = Lys dag","lat":"59.05121","lon":"10.04995","startTime":"06:00","endTime":"23:30","startOffset":0,"endOffset":0,"x":900,"y":254,"wires":[["21e9feec.f452c2","512169b7.af6a78"],["797ebc06.9d6b64","c60128cd.ebfb98"]]},{"id":"55011687.ecb508","type":"stoptimer","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","duration":"2","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":1300,"y":294,"wires":[["7fbdfbd7.256dd4"],[]]},{"id":"2cebcc70.46ae54","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Set lys spotter 70%","server":"ac20270b.4d8de8","version":1,"debugenabled":true,"service_domain":"light","service":"turn_on","entityId":"light.lys_kontor","data":"{\"brightness_pct\":70}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1498,"y":145,"wires":[[]]},{"id":"7b204c06.1a33d4","type":"stoptimer","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","duration":"4","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":1300,"y":386,"wires":[["8f350e96.9950f"],[]]},{"id":"e0f2e16e.91a31","type":"time-range-switch","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Tid = Lys Dag","lat":"","lon":"","startTime":"06:20","endTime":"23:30","startOffset":0,"endOffset":0,"x":1060,"y":300,"wires":[["55011687.ecb508"],["6f7d7315.cc9d5c"]]},{"id":"f33772d1.d7ed6","type":"change","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Send stop to timer","rules":[{"t":"set","p":"payload","pt":"msg","to":"stop","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1030,"y":396,"wires":[["55011687.ecb508","7b204c06.1a33d4","6f7d7315.cc9d5c","365a20ba.d11c7"]]},{"id":"735af4c1.cb824c","type":"server-state-changed","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Manuell = on","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.manuell_kontoret","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,"x":150,"y":380,"wires":[["f33772d1.d7ed6"],["ece6ead9.2972d8"]]},{"id":"ece6ead9.2972d8","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Motion = on","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.motionsensor_kontor","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":350,"y":420,"wires":[["ba0bb07c.aa3a9"],["4f5bb01e.ae4f1"]]},{"id":"8f350e96.9950f","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Set Lys play off","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.lys_kontor_play","data":"{\"transition\":5}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1480,"y":385,"wires":[[]]},{"id":"856248e2.bea3b8","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Manuell = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.manuell_kontoret","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":523,"y":302,"wires":[["32be2710.0e5378"],[]]},{"id":"c149417b.007cd","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Set lys play 75%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_kontor_play","data":"{\"brightness_pct\":75,\"transition\":1}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1493,"y":92,"wires":[[]]},{"id":"7fbdfbd7.256dd4","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Set Lys tak off","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.lys_kontor","data":"{\"transition\":5}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1480,"y":295,"wires":[[]]},{"id":"aa83002c.8a2f2","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Set spotter 15%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_kontor","data":"{\"brightness_pct\":15}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1480,"y":240,"wires":[[]]},{"id":"b299693c.e47808","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Set lys play 40%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_kontor_play","data":"{\"brightness_pct\":50,\"transition\":1}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1490,"y":200,"wires":[[]]},{"id":"6f7d7315.cc9d5c","type":"stoptimer","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","duration":"1","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":1300,"y":436,"wires":[["85014b30.fa5598"],[]]},{"id":"85014b30.fa5598","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Turn off lys play","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.lys_kontor_play","data":"{\"transition\":10}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1479,"y":435,"wires":[["8cfa8ccd.80895"]]},{"id":"8cfa8ccd.80895","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Set Lys tak off","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.lys_kontor","data":"{\"transition\":5}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1657,"y":435,"wires":[[]]},{"id":"138b412a.fb823f","type":"server-state-changed","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":">60w 15sec = Room in use","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.watt_kontorpult","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"60","halt_if_type":"num","halt_if_compare":"gt","outputs":2,"output_only_on_state_change":true,"for":"15","forType":"num","forUnits":"seconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":200,"y":800,"wires":[["867a2082.99458"],[]]},{"id":"5f1c7646.eb0b08","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Set Kontor in use - on","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.office_in_use","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":640,"y":800,"wires":[[]]},{"id":"e7561d00.823c6","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Set Kontor in use - off","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.office_in_use","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":640,"y":860,"wires":[[]]},{"id":"32be2710.0e5378","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Room in use = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.office_in_use","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":704,"y":302,"wires":[["2f0e5fed.7dd29","4d21843e.19dcfc"],[]]},{"id":"581eb935.9f2a58","type":"server-state-changed","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Room in use is = on","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.office_in_use","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":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":150,"y":500,"wires":[["f33772d1.d7ed6","e1bab322.2a69f"],["ece6ead9.2972d8","560add46.1c6cb4"]]},{"id":"fa102ed.cd34bd","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Manuell = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.manuell_kontoret","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":790,"y":460,"wires":[["cf60df67.40b47","330eecd1.103794","82a015ff.f9e718"],[]]},{"id":"21e9feec.f452c2","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Spotter av?","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.lys_kontor","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1168,"y":150,"wires":[["2cebcc70.46ae54"],["ac7b2071.96718"]]},{"id":"ac7b2071.96718","type":"switch","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Ikke 70%","property":"data.attributes.brightness","propertyType":"msg","rules":[{"t":"neq","v":"178","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1318,"y":168,"wires":[["2cebcc70.46ae54"]]},{"id":"2f0e5fed.7dd29","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Spotter på?","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.lys_kontor","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":881,"y":303,"wires":[["e0f2e16e.91a31"],[]]},{"id":"f3c61e6e.6ee23","type":"hue-switch","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"HUE Dimmer kontor","bridge":"9588cc82.3423","sensorid":"65","skipevents":false,"universalevents":false,"x":160,"y":660,"wires":[["a43750ab.a9479","d79a092f.f6cee8"]]},{"id":"3b42ee5e.3971b2","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Turn off automation","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.automation_kontor","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":850,"y":620,"wires":[["f33772d1.d7ed6"]]},{"id":"e1ed6dcf.05e05","type":"trigger","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"60","extend":true,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":615,"y":666,"wires":[["43efa403.0c4f2c"]]},{"id":"edf1f733.341bb8","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Turn on automation","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.automation_kontor","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1010,"y":680,"wires":[["ece6ead9.2972d8"]]},{"id":"ba0bb07c.aa3a9","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Automation = on","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.automation_kontor","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":346,"y":256,"wires":[["58f2dc91.5bfa94"],[]]},{"id":"4f5bb01e.ae4f1","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Automation = on","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.automation_kontor","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":345,"y":303,"wires":[["856248e2.bea3b8"],[]]},{"id":"43efa403.0c4f2c","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Automation = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.automation_kontor","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":810,"y":680,"wires":[["edf1f733.341bb8"],[]]},{"id":"d79a092f.f6cee8","type":"switch","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Button == off long released","property":"payload.button","propertyType":"msg","rules":[{"t":"eq","v":"4003","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":400,"y":700,"wires":[["43efa403.0c4f2c"]]},{"id":"a43750ab.a9479","type":"switch","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Button != off long released","property":"payload.action","propertyType":"msg","rules":[{"t":"neq","v":"4003","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":400,"y":620,"wires":[["e1ed6dcf.05e05","cb768e5c.453b4"]]},{"id":"cb768e5c.453b4","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Automation = on","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.automation_kontor","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":650,"y":620,"wires":[["3b42ee5e.3971b2"],[]]},{"id":"82a015ff.f9e718","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Turn off spotter","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.lys_kontor","data":"{\"transition\":3}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1040,"y":440,"wires":[[]]},{"id":"9ee933af.893ea","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Set lampe 70%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lampe_kontor","data":"{\"brightness\":178,\"transition\":2}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1340,"y":491,"wires":[[]]},{"id":"cf60df67.40b47","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Lampe av?","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.lampe_kontor","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1030,"y":494,"wires":[["9ee933af.893ea"],["f702cbbf.2b9ef8"]]},{"id":"f702cbbf.2b9ef8","type":"switch","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Ikke 70%","property":"data.attributes.brightness","propertyType":"msg","rules":[{"t":"neq","v":"178","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1180,"y":513,"wires":[["9ee933af.893ea"]]},{"id":"560add46.1c6cb4","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Turn off taklampe","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.lampe_kontor","data":"{\"transition\":3}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":350,"y":540,"wires":[[]]},{"id":"bd9242be.5aae1","type":"server-state-changed","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"<60w 2min = Room not in use","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.watt_kontorpult","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"60","halt_if_type":"num","halt_if_compare":"lt","outputs":2,"output_only_on_state_change":true,"for":"2","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":200,"y":860,"wires":[["1cb1ab66.084be5"],[]]},{"id":"cd83b74f.d65b38","type":"comment","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Lys","info":"","x":130,"y":140,"wires":[]},{"id":"f89d54a2.6c9908","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Room in use = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.office_in_use","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":706,"y":258,"wires":[["4e531a47.1403f4","f33772d1.d7ed6"],[]]},{"id":"512169b7.af6a78","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Play av?","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.lys_kontor_play","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1160,"y":100,"wires":[["c149417b.007cd"],["c92944db.668308"]]},{"id":"c92944db.668308","type":"switch","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Ikke 75%","property":"data.attributes.brightness","propertyType":"msg","rules":[{"t":"neq","v":"191","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1310,"y":115,"wires":[["c149417b.007cd"]]},{"id":"e1bab322.2a69f","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Automation = on","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.automation_kontor","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":610,"y":480,"wires":[["fa102ed.cd34bd"],[]]},{"id":"1dc1fd6.24bbd03","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Set lys play 90%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_kontor_play","data":"{\"brightness_pct\":90,\"transition\":3}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1330,"y":543,"wires":[[]]},{"id":"330eecd1.103794","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Play av?","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.lys_kontor_play","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1020,"y":546,"wires":[["1dc1fd6.24bbd03"],["d4715e48.292ca"]]},{"id":"d4715e48.292ca","type":"switch","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Ikke 90%","property":"data.attributes.brightness","propertyType":"msg","rules":[{"t":"neq","v":"230","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1160,"y":564,"wires":[["1dc1fd6.24bbd03"]]},{"id":"4d21843e.19dcfc","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Play på?","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.lys_kontor_play","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":870,"y":349,"wires":[["3823453f.938e6a"],[]]},{"id":"3823453f.938e6a","type":"time-range-switch","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Tid = Lys Dag","lat":"","lon":"","startTime":"06:20","endTime":"23:30","startOffset":0,"endOffset":0,"x":1059,"y":346,"wires":[["365a20ba.d11c7","7b204c06.1a33d4"],["6f7d7315.cc9d5c"]]},{"id":"365a20ba.d11c7","type":"stoptimer","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","duration":"2","units":"Minute","payloadtype":"num","payloadval":"0","name":"","x":1300,"y":340,"wires":[["e9b85204.03b91"],[]]},{"id":"e9b85204.03b91","type":"api-call-service","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Set lys play 20%","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_kontor_play","data":"{\"brightness_pct\":20,\"transition\":10}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1490,"y":340,"wires":[[]]},{"id":"867a2082.99458","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Room in use = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.office_in_use","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":430,"y":800,"wires":[["5f1c7646.eb0b08"],[]]},{"id":"1cb1ab66.084be5","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Room in use = on","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.office_in_use","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":430,"y":860,"wires":[["e7561d00.823c6"],[]]},{"id":"797ebc06.9d6b64","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Play av?","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.lys_kontor_play","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1160,"y":200,"wires":[["b299693c.e47808"],["a220b8d0.3faa88"]]},{"id":"c60128cd.ebfb98","type":"api-current-state","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Spotter av?","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.lys_kontor","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1170,"y":245,"wires":[["aa83002c.8a2f2"],["8a2f9b09.489ea8"]]},{"id":"8a2f9b09.489ea8","type":"switch","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Ikke 15%","property":"data.attributes.brightness","propertyType":"msg","rules":[{"t":"neq","v":"39","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1320,"y":260,"wires":[["aa83002c.8a2f2"]]},{"id":"f690e08c.6d1b6","type":"server-state-changed","z":"c73cf615.f18078","g":"384f77e4.0ac5a8","name":"Automation - on","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.automation_spillrom","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":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":120,"y":447,"wires":[["ece6ead9.2972d8"],[]]},{"id":"ac20270b.4d8de8","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"9588cc82.3423","type":"hue-bridge","name":"Hue SV17 1 etg","bridge":"192.168.3.49","key":"Hjl7Rk2Pp0C44-vdtDHiLgsrg7ATAnAHS3KaHaeF","interval":"3000","disableupdates":false}]

 

Endret av henlagt
  • Like 1
Skrevet

Spørsmål litt på siden. Fungerer dine Aquara sensorer helt stabilt over lengre tid, dvs gjennom sykluser med skifte av batteri og over flere år? Jeg klarer ikke bli enig med meg selv om jeg stoler 100% på de :)

Skrevet
1 minute ago, borg1n said:

Spørsmål litt på siden. Fungerer dine Aquara sensorer helt stabilt over lengre tid, dvs gjennom sykluser med skifte av batteri og over flere år? Jeg klarer ikke bli enig med meg selv om jeg stoler 100% på de :)

Ja, så lenge de ikke mister ruten sin til kontrolleren, så er de stabile, hos meg i hvert fall. Mister de ruten sin, så må jeg manuelt "refreshe" dem ved å trykke på sensorene. Jeg er fornøyd med dem.

Skrevet
47 minutter siden, borg1n skrev:

dvs gjennom sykluser med skifte av batteri

Jeg har opplevd at de blir stille i både 1, 2 og 3 dager ved batteriskift. Men de kommer på nett igjen uten hjelp når de får summet seg etter strømsjokket

 

Skrevet (endret)

Oppdatert 30/3-21.

 

Utelys, automasjon med soloppgang/solnedgang, tid og lux. Lyslenke på levegg skrus av om natta og på igjen i en periode på morgenen hvis ikke lys er over 130 lux.

 

image.png.8050445c64a591db1ee8a5b8930fdff0.png

 

 

 

Kode:

[{"id":"327b0514.7b4b4a","type":"server-state-changed","z":"f0fcc3d0.d1cc","name":"Sun above horizon","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sun.sun","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"above_horizon","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,"x":110,"y":160,"wires":[["f1094e00.e5888","c31d6935.cf34c8","ade2b140.3f3bb"],["a98965.39001698","c0c0e938.a4db98","111dadce.9ce092","67be2d1f.5e4cd4","85977399.c0687","cf0f867d.229c38","6ea2d77c.48f7c8"]]},{"id":"6106e6a5.30ca88","type":"api-call-service","z":"f0fcc3d0.d1cc","name":"Turn on lys pergola","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.stikk_lyslenke_pergola","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":510,"y":323,"wires":[[]]},{"id":"e9b205a7.51a3e8","type":"api-call-service","z":"f0fcc3d0.d1cc","name":"Turn on lys basseng","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.stikk_lyslenke_basseng","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":520,"y":371,"wires":[[]]},{"id":"628af135.818fe","type":"api-call-service","z":"f0fcc3d0.d1cc","name":"Turn on lys under balkong","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.stikk_lyslenke_balkong","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":530,"y":419,"wires":[[]]},{"id":"cff6215e.b341b","type":"api-call-service","z":"f0fcc3d0.d1cc","name":"Turn on lys hundehus","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.stikk_lyslenke_hundehus","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":520,"y":466,"wires":[[]]},{"id":"7ea89816.f3ad08","type":"api-call-service","z":"f0fcc3d0.d1cc","name":"Turn on lys terrassen","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.ute_terrassen","data":"{\"brightness_pct\":70,\"transition\":15}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":520,"y":180,"wires":[[]]},{"id":"4d4371a9.91414","type":"api-call-service","z":"f0fcc3d0.d1cc","name":"Turn on lys garasjen","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.lys_ute_garasjen","data":"{\"brightness_pct\":70,\"transition\":15}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":520,"y":229,"wires":[[]]},{"id":"4343a0e2.0d5dd","type":"api-call-service","z":"f0fcc3d0.d1cc","name":"Turn on lys inngangsparti","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.ute_inngangsparti","data":"{\"brightness_pct\":70,\"transition\":15}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":530,"y":276,"wires":[[]]},{"id":"1c16887d.1d44d8","type":"api-call-service","z":"f0fcc3d0.d1cc","name":"Turn off lys terrassen","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.ute_terrassen","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":520,"y":40,"wires":[[]]},{"id":"7c204251.1b3a2c","type":"api-call-service","z":"f0fcc3d0.d1cc","name":"Turn off lys garasjen","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.lys_ute_garasjen","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":520,"y":86,"wires":[[]]},{"id":"cf2f8da.7b12e7","type":"api-call-service","z":"f0fcc3d0.d1cc","name":"Turn off lys inngangsparti","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.ute_inngangsparti","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":530,"y":132,"wires":[[]]},{"id":"ed52fe2a.daf3d","type":"api-call-service","z":"f0fcc3d0.d1cc","name":"Turn off lys pergola","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.stikk_lyslenke_pergola","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":530,"y":540,"wires":[[]]},{"id":"24f35697.85c51a","type":"api-call-service","z":"f0fcc3d0.d1cc","name":"Turn off lys basseng","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.stikk_lyslenke_basseng","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":540,"y":591,"wires":[[]]},{"id":"8e03408f.b7169","type":"api-call-service","z":"f0fcc3d0.d1cc","name":"Turn off lys under balkong","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.stikk_lyslenke_balkong","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":550,"y":640,"wires":[[]]},{"id":"23466b14.490a34","type":"api-call-service","z":"f0fcc3d0.d1cc","name":"Turn off lys hundehus","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.stikk_lyslenke_hundehus","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":540,"y":687,"wires":[[]]},{"id":"e2c891a8.0eae1","type":"inject","z":"f0fcc3d0.d1cc","name":"Tid = 00:30","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"30 00 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":600,"wires":[["adbbf983.fa0e28","ca5ac45d.2f12a8","3298a16c.34907e","b476e643.514668"]]},{"id":"a98965.39001698","type":"api-current-state","z":"f0fcc3d0.d1cc","name":"Lys = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.ute_terrassen","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":340,"y":180,"wires":[["7ea89816.f3ad08"],[]]},{"id":"c0c0e938.a4db98","type":"api-current-state","z":"f0fcc3d0.d1cc","name":"Lys = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.lys_ute_garasjen","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":340,"y":229,"wires":[["4d4371a9.91414"],[]]},{"id":"111dadce.9ce092","type":"api-current-state","z":"f0fcc3d0.d1cc","name":"Lys = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.ute_inngangsparti","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":340,"y":276,"wires":[["4343a0e2.0d5dd"],[]]},{"id":"f1094e00.e5888","type":"api-current-state","z":"f0fcc3d0.d1cc","name":"Lys = on","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.ute_terrassen","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":340,"y":40,"wires":[["1c16887d.1d44d8"],[]]},{"id":"c31d6935.cf34c8","type":"api-current-state","z":"f0fcc3d0.d1cc","name":"Lys = on","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.lys_ute_garasjen","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":340,"y":86,"wires":[["7c204251.1b3a2c"],[]]},{"id":"ade2b140.3f3bb","type":"api-current-state","z":"f0fcc3d0.d1cc","name":"Lys = on","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.ute_inngangsparti","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":340,"y":132,"wires":[["cf2f8da.7b12e7"],[]]},{"id":"adbbf983.fa0e28","type":"api-current-state","z":"f0fcc3d0.d1cc","name":"Lys = on","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.stikk_lyslenke_pergola","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":340,"y":540,"wires":[["ed52fe2a.daf3d"],[]]},{"id":"ca5ac45d.2f12a8","type":"api-current-state","z":"f0fcc3d0.d1cc","name":"Lys = on","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.stikk_lyslenke_basseng","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":340,"y":591,"wires":[["24f35697.85c51a"],[]]},{"id":"3298a16c.34907e","type":"api-current-state","z":"f0fcc3d0.d1cc","name":"Lys = on","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.stikk_lyslenke_balkong","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":340,"y":640,"wires":[["8e03408f.b7169"],[]]},{"id":"b476e643.514668","type":"api-current-state","z":"f0fcc3d0.d1cc","name":"Lys = on","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.stikk_lyslenke_hundehus","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":340,"y":687,"wires":[["23466b14.490a34"],[]]},{"id":"67be2d1f.5e4cd4","type":"api-current-state","z":"f0fcc3d0.d1cc","name":"Lys = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.stikk_lyslenke_pergola","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":340,"y":323,"wires":[["6106e6a5.30ca88"],[]]},{"id":"85977399.c0687","type":"api-current-state","z":"f0fcc3d0.d1cc","name":"Lys = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.stikk_lyslenke_basseng","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":340,"y":371,"wires":[["e9b205a7.51a3e8"],[]]},{"id":"cf0f867d.229c38","type":"api-current-state","z":"f0fcc3d0.d1cc","name":"Lys = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.stikk_lyslenke_balkong","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":340,"y":419,"wires":[["628af135.818fe"],[]]},{"id":"6ea2d77c.48f7c8","type":"api-current-state","z":"f0fcc3d0.d1cc","name":"Lys = off","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.stikk_lyslenke_hundehus","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":340,"y":466,"wires":[["cff6215e.b341b"],[]]},{"id":"3b7bd2ed.ef1e2e","type":"inject","z":"f0fcc3d0.d1cc","name":"Tid = 09:00","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 09 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":640,"wires":[["adbbf983.fa0e28","ca5ac45d.2f12a8","3298a16c.34907e","b476e643.514668"]]},{"id":"6f357f7b.940fc","type":"inject","z":"f0fcc3d0.d1cc","name":"Tid = 06:00","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 06 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":260,"wires":[["67be2d1f.5e4cd4","85977399.c0687","cf0f867d.229c38","6ea2d77c.48f7c8"]]},{"id":"ac20270b.4d8de8","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

 

Endret av henlagt
Cleaned up the flow, added lux.
  • Like 1
Skrevet (endret)

I stua har vi en Namron Z-Wave bryter. Denne har 8 knapper og er fin til å starte scener med, og siden den har vanlig trykk og hold kan du lage 16 funksjoner fra denne.

Om du ønsker zigbee så kommer samme bryter i zigbee versjon også.

@Sune har laget en fin Sonos kontroller med node-red for sin HUE dimmer, jeg modifiserte hans kode litt og ble veldig fornøyd med hvordan det passer med Namron bryteren. Nå benytter jeg 4 knapper til 2 scener, på og av, og 5 "knapper" til Sonos, 4 trykk og 1 hold.

 

Min z-wave kontroller er tilkoblet HomeSeer. Jeg bruker MQTT for å sende status endringer fra z-wave devicene til Home Assistant. Triggeren i sekvensen under er derfor en "mqtt in node".

 

Kort forklaring til Sonos styringen:

Ett trykk knapp 5 = Toogle - Play Sonos og sett volum til 10% eller pause Sonos.

Hold knapp 5 = Kanal-/spillelistevelger

Ett trykk knapp 6 = Neste sang

Ett trykk knapp 7 = Volume +

Ett trykk knapp 8 = Volume -

 

Her er sekvensen:

image.thumb.png.7ff25cd0090b75cd2bf84dd6e28db79e.png

 

Kode:

[{"id":"df1da4b9.fae6c8","type":"mqtt in","z":"e7db151a.fabb88","name":"Buttons - Namron stue","topic":"homeseer/StueNamron","qos":"2","datatype":"auto","broker":"538b5aa3.d2fd64","x":320,"y":1060,"wires":[["40dde949.ea2048"]]},{"id":"40dde949.ea2048","type":"switch","z":"e7db151a.fabb88","name":"Which button","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1000","vt":"num"},{"t":"eq","v":"2000","vt":"num"},{"t":"eq","v":"3000","vt":"num"},{"t":"eq","v":"4000","vt":"num"},{"t":"eq","v":"5000","vt":"num"},{"t":"eq","v":"5002","vt":"num"},{"t":"eq","v":"6000","vt":"num"},{"t":"eq","v":"6002","vt":"num"},{"t":"eq","v":"7000","vt":"num"},{"t":"eq","v":"8000","vt":"num"}],"checkall":"true","repair":false,"outputs":10,"x":560,"y":1060,"wires":[["329c0142.585bde"],["2717f7f4.f26098"],["5a85b6a9.e215d8"],["e36f5fd4.4123e"],["e00cdb76.3c86d8"],["d830fd08.efe06"],["2808e812.b8b528"],[],["1b9a6a1.1546e96"],["cfbe8058.c9952"]]},{"id":"e36f5fd4.4123e","type":"api-call-service","z":"e7db151a.fabb88","name":"Set Scene TV lys - off","server":"ac20270b.4d8de8","version":1,"debugenabled":true,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.scene_stue_tv_lys","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":800,"y":1047,"wires":[[]]},{"id":"5a85b6a9.e215d8","type":"api-call-service","z":"e7db151a.fabb88","name":"Set Scene TV lys - on","server":"ac20270b.4d8de8","version":1,"debugenabled":true,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.scene_stue_tv_lys","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":800,"y":1000,"wires":[[]]},{"id":"329c0142.585bde","type":"api-call-service","z":"e7db151a.fabb88","name":"Set Manuell - on","server":"ac20270b.4d8de8","version":1,"debugenabled":true,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.manuell_stue","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":780,"y":900,"wires":[[]]},{"id":"2717f7f4.f26098","type":"api-call-service","z":"e7db151a.fabb88","name":"Set Manuell - off","server":"ac20270b.4d8de8","version":1,"debugenabled":true,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.manuell_stue","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":780,"y":949,"wires":[[]]},{"id":"583415ce.87c6ec","type":"api-call-service","z":"e7db151a.fabb88","name":"Vol UP","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.stue","data":"{\"volume_level\": data.attributes.volume_level + 0.05}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":890,"y":1420,"wires":[[]]},{"id":"9e0c8e58.d9799","type":"api-call-service","z":"e7db151a.fabb88","name":"Vol DOWN","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.stue","data":"{\"volume_level\": data.attributes.volume_level - 0.05}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":890,"y":1480,"wires":[[]]},{"id":"cfbe8058.c9952","type":"api-current-state","z":"e7db151a.fabb88","name":"Hent lydnivå","server":"ac20270b.4d8de8","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.stue","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":730,"y":1480,"wires":[["9e0c8e58.d9799"]]},{"id":"1b9a6a1.1546e96","type":"api-current-state","z":"e7db151a.fabb88","name":"Hent lydnivå","server":"ac20270b.4d8de8","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.stue","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":730,"y":1420,"wires":[["583415ce.87c6ec"]]},{"id":"d830fd08.efe06","type":"counter","z":"e7db151a.fabb88","name":"","init":"1","step":"1","lower":"","upper":"5","mode":"increment","outputs":1,"x":760,"y":1280,"wires":[["8ab4fc04.25a4d"]]},{"id":"535c6845.58c958","type":"function","z":"e7db151a.fabb88","name":"Reset counter","func":"msg.reset = true;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":800,"y":1160,"wires":[["d830fd08.efe06"]]},{"id":"8ab4fc04.25a4d","type":"switch","z":"e7db151a.fabb88","name":"","property":"count","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"3","vt":"num"},{"t":"eq","v":"4","vt":"num"},{"t":"eq","v":"5","vt":"num"}],"checkall":"true","repair":false,"outputs":5,"x":890,"y":1280,"wires":[["6f1c3d6e.7a6fb4"],["53d3f56d.a2b99c"],["8b92376f.302ff8"],["49884f24.4a39f"],["535c6845.58c958"]]},{"id":"6f1c3d6e.7a6fb4","type":"api-call-service","z":"e7db151a.fabb88","name":"P5 Hits","server":"ac20270b.4d8de8","version":1,"debugenabled":true,"service_domain":"media_player","service":"select_source","entityId":"media_player.stue","data":"{\"source\":\"P5 Hits\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1054,"y":1180,"wires":[[]]},{"id":"53d3f56d.a2b99c","type":"api-call-service","z":"e7db151a.fabb88","name":"NRK mP3","server":"ac20270b.4d8de8","version":1,"debugenabled":true,"service_domain":"media_player","service":"select_source","entityId":"media_player.stue","data":"{\"source\":\"NRK mP3\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1114,"y":1240,"wires":[[]]},{"id":"8b92376f.302ff8","type":"api-call-service","z":"e7db151a.fabb88","name":"NRK Alltid Nyheter","server":"ac20270b.4d8de8","version":1,"debugenabled":true,"service_domain":"media_player","service":"select_source","entityId":"media_player.stue","data":"{\"source\":\"NRK Alltid Nyheter\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1144,"y":1340,"wires":[[]]},{"id":"49884f24.4a39f","type":"api-call-service","z":"e7db151a.fabb88","name":"Your Top Songs 2020","server":"ac20270b.4d8de8","version":1,"debugenabled":true,"service_domain":"media_player","service":"select_source","entityId":"media_player.stue","data":"{\"source\": \"Your Top Songs 2020\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1134,"y":1400,"wires":[["ce7c0418.fdbe88"]]},{"id":"ce7c0418.fdbe88","type":"api-call-service","z":"e7db151a.fabb88","name":"Random","server":"ac20270b.4d8de8","version":1,"debugenabled":true,"service_domain":"media_player","service":"shuffle_set","entityId":"media_player.stue","data":"{\"shuffle\": \"true\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1400,"y":1400,"wires":[[]]},{"id":"22252bf2.02d1c4","type":"switch","z":"e7db151a.fabb88","name":"Volum 10%?","property":"data.attributes.volume_level","propertyType":"msg","rules":[{"t":"neq","v":"0.1","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1330,"y":1076,"wires":[["6f26e967.518118"]]},{"id":"6f26e967.518118","type":"api-call-service","z":"e7db151a.fabb88","name":"Set volume 10%","server":"ac20270b.4d8de8","version":1,"debugenabled":true,"service_domain":"media_player","service":"volume_set","entityId":"media_player.stue","data":"{\"volume_level\":0.1}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1500,"y":1076,"wires":[[]]},{"id":"e00cdb76.3c86d8","type":"api-current-state","z":"e7db151a.fabb88","name":"Status Sonos Stue","server":"ac20270b.4d8de8","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.stue","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":790,"y":1100,"wires":[["98d59230.23eda"]]},{"id":"2808e812.b8b528","type":"api-call-service","z":"e7db151a.fabb88","name":"Next track","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"media_next_track","entityId":"media_player.stue","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":730,"y":1340,"wires":[[]]},{"id":"724ab066.3f478","type":"api-call-service","z":"e7db151a.fabb88","name":"Play Sonos","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"media_play","entityId":"media_player.stue","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1170,"y":1076,"wires":[["22252bf2.02d1c4"]]},{"id":"98d59230.23eda","type":"switch","z":"e7db151a.fabb88","name":"Play/pause","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"paused","vt":"str"},{"t":"eq","v":"playing","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":970,"y":1100,"wires":[["724ab066.3f478"],["a8397607.304bd8"]]},{"id":"a8397607.304bd8","type":"api-call-service","z":"e7db151a.fabb88","name":"OFF (pause)","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"media_player","service":"media_pause","entityId":"media_player.stue","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1170,"y":1131,"wires":[[]]},{"id":"538b5aa3.d2fd64","type":"mqtt-broker","name":"MQTT","broker":"192.168.2.20","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"ac20270b.4d8de8","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

 

Endret av henlagt
Fant ut at det var smartere med toogle på knapp 5. Oppdatert sekvens bilde og kode.
  • Like 1
Skrevet (endret)

Her kommer et eksempel på varsling ved bruk av en fargepære.

 

Denne leser status på farge og lysstyrken på pæren, deretter fader den til rød med 99% lysstyrke i løpet av 2sek, deretter venter den 5sek før den fader tilbake til opprinnelig status.

 

Varslingsfarge redigeres i node (Fade farge til rød i løpet av 2 sek) 

Rød - {"brightness_pct": 99,"rgb_color":[255,0,0],"transition":2}

Grønn - {"brightness_pct": 99,"rgb_color":[0,255,0],"transition":2}

Blå - {"brightness_pct": 99,"rgb_color":[0,0,255],"transition":2}

 

Lysstyrke: endre verdi etter brightness_pct fra 1-99

 

Overgang: endre tall i sek etter transition

 

Send PM om du ønsker kopi av flow.

 

Skjermbilde 2020-12-08 kl. 00.36.19.png

Endret av kimstoroy
  • Like 1
Skrevet (endret)

Pushvarsel på garasjeporter dersom en eller begge har vært åpne og ingen bevegelse i garasjen på 30min.

 

Denne har og handlingsknapper i push melding, der man velge hvilken port man ønsker og lukke eller slumre i 15min.

 

Send PM om du ønsker kopi av flow.

 

 

Skjermbilde 2020-12-08 kl. 00.49.38.png

Endret av kimstoroy
  • Like 2
Skrevet

Vanning av hage, kl 05 sjekker den utetemperatur og nedbør de siste 24t.

 

Dersom temp er over 10 grader og ingen nedbør de siste 24timer starter vanning.

 

Den kjører 10 min pr sone 2 ganger.

 

Send PM om du ønsker kopi av flow.

Skjermbilde 2020-12-08 kl. 00.58.07.png

  • Like 2
Skrevet (endret)

Styring i Home Assistant av Panelovn som er i på en Z-wave Fibaro Wall plug i HomeSeer.

 

Denne slår av termostat dersom man åpner et vindu, samt skrur på termostat igjen når vindu lukkes. 

Samt sjekker status om termostat var på eller av før vindu ble åpnet, slik man unngår at den skrur på om termostat var av.

 

Rapporterer og forbruk til HA.

 

Send PM om du ønsker kopi av flow.

 

Skjermbilde 2020-12-08 kl. 01.04.31.png

Skjermbilde 2020-12-08 kl. 01.14.29.png

Endret av kimstoroy
  • Like 2
Skrevet

Lys og radio ved bevegelse

 

Denne setter lys til 99% ved bevegelse, og ned til 1% 20min etter siste bevegelse.

 

Den starter Sonos ved bevegelse og setter pause etter 20 min.

Ved dagens første bevegelse angir den radiostasjon.

 

Dersom noen bruker bryter deaktiveres lys automatikk i 1time

 

Send PM om du ønsker kopi av flow.

Skjermbilde 2020-12-08 kl. 01.32.20.png

  • Like 1
Skrevet (endret)

Flow for styring av utelamper.

 

Utelamper styres av LUX veridier fra Philips Hue Motion sensor.

 

Dersom klokken er imellom 6-23 vil utelamper slå seg på med 75% lysstyrke, dersom kl er mellom 23-6 vil de slå seg på med 5% lysstyrke.

 

Utelamper settes til 5% kl 23 og settes til 75% kl 06 dersom solen ikke er oppe.

 

Utelamper slår seg av dersom LUX verdien overstiger satt nivå i 20min.

 

Bevegelse mellom kl 23-06 gir 99% lysstyrke på Utelamper i 15min og Flomlys aktiveres i 3min

 

Send PM om du ønsker kopi av flow.

 

image.thumb.png.e9c9de2624a72ef500efc6722faec055.png

image.png.45fdeda8e199849db3f34a7461164bb6.png

image.thumb.png.145b0a86dcd8421857002eb90ade13f6.png

 

 

Endret av kimstoroy
  • Like 1
Skrevet

Flow for å aktivere hjemme og borte modus via automatikk.

 

Denne har også en delay på bortemodus dersom man kun skal en rask tur i butikken osv.

 

Varsling av hvem som trigger hjemme/bortemodus til mobil

 

Send PM om du ønsker kopi av flow.

 

image.thumb.png.84628c77d7f59199696e677302698e97.png

image.thumb.png.abbb0de38a40ed8149e8eec0b27ad289.png

  • Like 1
  • 2 måneder senere...
Skrevet

Varsling når vaskemaskin har startet og når den er ferdig.

Har vurdert å legge inn en current state node som sjekker om vi er hjemme eller ikke, men fant ut at det egentlig er greit å få varsling uansett.

 

image.thumb.png.c1b6c10e08ed5c92d06d74005e26ea33.png

 

[{"id":"ca5c583.911b9a8","type":"server-state-changed","z":"7c60512.71db9b","name":">15w 1min = Vaskemaskin startet","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.vaskemaskin_power","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"15","halt_if_type":"num","halt_if_compare":"gt","outputs":2,"output_only_on_state_change":true,"for":"1","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":1300,"y":680,"wires":[["f6347b36.f28db8"],[]]},{"id":"bfefd761.258468","type":"api-call-service","z":"7c60512.71db9b","name":"Sett vaskemaskin i bruk","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.vaskemaskin_i_bruk","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1790,"y":680,"wires":[[]]},{"id":"2de7313e.2d0d6e","type":"api-call-service","z":"7c60512.71db9b","name":"Sett vaskemaskin ikke i bruk","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.vaskemaskin_i_bruk","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1780,"y":740,"wires":[[]]},{"id":"40a71da6.1ebec4","type":"server-state-changed","z":"7c60512.71db9b","name":"<5w 2min = Vaskemaskin ferdig","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.vaskemaskin_power","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"5","halt_if_type":"num","halt_if_compare":"lt","outputs":2,"output_only_on_state_change":true,"for":"2","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":1290,"y":740,"wires":[["f6255881.76a568"],[]]},{"id":"f6347b36.f28db8","type":"api-current-state","z":"7c60512.71db9b","name":"Vaskemaskin i bruk?","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.vaskemaskin_i_bruk","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1560,"y":680,"wires":[["bfefd761.258468"],[]]},{"id":"f6255881.76a568","type":"api-current-state","z":"7c60512.71db9b","name":"Vaskemaskin i bruk?","server":"ac20270b.4d8de8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.vaskemaskin_i_bruk","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1540,"y":740,"wires":[["2de7313e.2d0d6e"],[]]},{"id":"af45b932.870058","type":"server-state-changed","z":"7c60512.71db9b","name":"Vaskemaskin i bruk?","server":"ac20270b.4d8de8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.vaskemaskin_i_bruk","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":1250,"y":820,"wires":[["85eb9110.74b21"]]},{"id":"c96578b9.1f3db8","type":"api-call-service","z":"7c60512.71db9b","name":"Notify Henning: Vaskemaskin startet","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_henning_lauritsens_iphone","entityId":"","data":"{\"message\":\"Vaskemaskin startet\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1810,"y":800,"wires":[["588e50c9.e8967"]]},{"id":"85eb9110.74b21","type":"switch","z":"7c60512.71db9b","name":"Vaskemaskin startet eller ferdig?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1490,"y":820,"wires":[["c96578b9.1f3db8"],["d888bba8.6e2c58"]]},{"id":"d888bba8.6e2c58","type":"api-call-service","z":"7c60512.71db9b","name":"Notify Hening: Vaskemaskin ferdig","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_henning_lauritsens_iphone","entityId":"","data":"{\"message\":\"Vaskemaskin ferdig\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1800,"y":850,"wires":[["ba8eb72b.760e28"]]},{"id":"ba8eb72b.760e28","type":"api-call-service","z":"7c60512.71db9b","name":"Notify Mari Vaskemaskin ferdig","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_mari_s_iphone","entityId":"","data":"{\"message\":\"Vaskemaskin ferdig\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":2110,"y":850,"wires":[[]]},{"id":"588e50c9.e8967","type":"api-call-service","z":"7c60512.71db9b","name":"Notify Mari: Vaskemaskin startet","server":"ac20270b.4d8de8","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_mari_s_iphone","entityId":"","data":"{\"message\":\"Vaskemaskin startet, forbered deg på tømming når programmet er ferdig\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":2110,"y":800,"wires":[[]]},{"id":"ac20270b.4d8de8","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

 

Bli med i samtalen

Du kan publisere innhold nå og registrere deg senere. Hvis du har en konto, logg inn nå for å poste med kontoen din.

Gjest
Skriv svar til emnet...

×   Du har limt inn tekst med formatering.   Lim inn uten formatering i stedet

  Du kan kun bruke opp til 75 smilefjes.

×   Lenken din har blitt bygget inn på siden automatisk.   Vis som en ordinær lenke i stedet

×   Tidligere tekst har blitt gjenopprettet.   Tøm tekstverktøy

×   Du kan ikke lime inn bilder direkte. Last opp eller legg inn bilder fra URL.

×
×
  • Opprett ny...

Viktig informasjon

Vi har plassert informasjonskapsler/cookies på din enhet for å gjøre denne siden bedre. Du kan justere dine innstillinger for informasjonskapsler, ellers vil vi anta at dette er ok for deg.