Procesy z życia wzięte - czujnik ruchu i światło - błąd

Jakbyś wyeksportował i zamieścił flow zamiast screena byłoby prościej.

Nie ten node. Wstaw Trigger
image
z opcją
image

Overide w delay pozwala na podanie w msg. indywidualnej wartosci.

ja mam to w ten sposób zrobione

[{"id":"b7cbb6df996af097","type":"mqtt in","z":"4d1d611d.bd4da","name":"Czujnik kuchnia","topic":"zigbee2mqtt/Czujka_kuchnia","qos":"2","datatype":"json","broker":"7f257382.e85b1c","nl":false,"rap":true,"rh":0,"inputs":0,"x":120,"y":1460,"wires":[["fc19928139cc3d26"]]},{"id":"fc19928139cc3d26","type":"switch","z":"4d1d611d.bd4da","name":"Czy ruch","property":"payload.occupancy","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"false","repair":false,"outputs":2,"x":300,"y":1460,"wires":[["974c78aa9bde8cfd","13b9f93feed27be3"],["706b1d5d82d9932f"]]},{"id":"13b9f93feed27be3","type":"change","z":"4d1d611d.bd4da","name":"Resetuj","rules":[{"t":"set","p":"reset","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":1520,"wires":[["706b1d5d82d9932f"]]},{"id":"706b1d5d82d9932f","type":"delay","z":"4d1d611d.bd4da","name":"2 minuty","pauseType":"delay","timeout":"2","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":500,"y":1520,"wires":[["48b138ea924a47f9"]]},{"id":"974c78aa9bde8cfd","type":"switch","z":"4d1d611d.bd4da","name":"Jasność","property":"payload.illuminance_lux","propertyType":"msg","rules":[{"t":"lte","v":"75","vt":"num"},{"t":"gt","v":"75","vt":"num"}],"checkall":"false","repair":false,"outputs":2,"x":500,"y":1460,"wires":[["bfdd3516deef0d18"],[]]},{"id":"48b138ea924a47f9","type":"switch","z":"4d1d611d.bd4da","name":"Czy przyciskiem","property":"pod_szafkami","propertyType":"flow","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":740,"y":1520,"wires":[["faaa17038ec6cfa9"],[]]},{"id":"faaa17038ec6cfa9","type":"change","z":"4d1d611d.bd4da","name":"Wyłącz pod szafkami","rules":[{"t":"set","p":"payload","pt":"msg","to":"off","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"shellies/shelly_pod_szafkami/relay/0/command","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":1520,"wires":[["28f9415e.21f1ae"]]},{"id":"bfdd3516deef0d18","type":"change","z":"4d1d611d.bd4da","name":"Włącz pod szafkami","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"shellies/shelly_pod_szafkami/relay/0/command","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":1460,"wires":[["28f9415e.21f1ae"]]},{"id":"7f257382.e85b1c","type":"mqtt-broker","name":"HA MQTT","broker":"localhost","port":"1883","clientid":"","autoConnect":true,"usetls":false,"compatmode":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""}]

jeśli wykryje ruch z czujki włączam światło (o ile nie jest jasno) i włączam odliczanie jeśli czujka wykryje ruch restuje delay znowu na 2 minuty i tak w kółko jeśli nie będzie ruchu przez 2 minuty sprawdza czy nie włączyłem przełącznikiem (stan w zmiennej flow) i wyłącza.

Dokładnie o to chodziło. Walczyłem nie z tym modem. Dziękuję.

Czy mógłbyś wrzucić plik json z projektem?

Hej,
W filmie Arutra wszystko jest prawie zrozumiale. Jednak nie potrafie zrobic tego pod swoje potrzeby. U mnie wyglada to tak że, mam shelly1 gdzie jest proste włacz wyłacz, jednym przyciskiem. Kombinuje i cos mi nie idzie, a wydaje sie ze ta część powinna być prostrasz Ta zaznaczona czesc nie dziala, a w niej pewnie ta na żółto nie działa.
Czujka jak wykryje ruch to po sek światło gasnie.

flows (5).json (7.3 KB)

Pomoze ktos ? :frowning:

Edit:

Walcze dalej,
poprawilem troche ( chociaz ciagle nie dziala :expressionless: )

Pokaze punkty w ktorych gdzies jest babol.


Stan swiatla

Stan przelacznika

wlacz /wylacz

Swiatlo w lazience

Stan

I tym razem nie reguje w ogole na wlacz/wylacz

Ma ktos pomysl ?

[{"id":"91fade93.7dae5","type":"group","z":"4d1d611d.bd4da","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["67b6ed2e.1b31f4","284f107ce2305d90","ed312836.8c40f8","df3e4bfe.009b88","95e9fc25.5a002","6edd7a56c4a06ade","f00e785fd564cdd3","40e47b1be78e9167"],"x":14,"y":-1,"w":1072,"h":142},{"id":"67b6ed2e.1b31f4","type":"mqtt in","z":"4d1d611d.bd4da","g":"91fade93.7dae5","name":"Przełącznik pod szafkami","topic":"shellies/shelly_pod_szafkami/input_event/0","qos":"2","datatype":"json","broker":"7f257382.e85b1c","nl":false,"rap":false,"inputs":0,"x":150,"y":40,"wires":[["284f107ce2305d90"]]},{"id":"284f107ce2305d90","type":"switch","z":"4d1d611d.bd4da","g":"91fade93.7dae5","name":"Czy krótkie","property":"payload.event","propertyType":"msg","rules":[{"t":"eq","v":"S","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":390,"y":40,"wires":[["6edd7a56c4a06ade"]]},{"id":"ed312836.8c40f8","type":"function","z":"4d1d611d.bd4da","g":"91fade93.7dae5","name":"Ustaw wyłączony","func":"flow.set(\"pod_szafkami\",0)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":970,"y":80,"wires":[[]]},{"id":"df3e4bfe.009b88","type":"function","z":"4d1d611d.bd4da","g":"91fade93.7dae5","name":"Ustaw włączony","func":"flow.set(\"pod_szafkami\",1)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":960,"y":40,"wires":[[]]},{"id":"95e9fc25.5a002","type":"api-current-state","z":"4d1d611d.bd4da","g":"91fade93.7dae5","name":"Czy świeci","server":"c00e7dc3.fec7d","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.pod_szafkami","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":750,"y":40,"wires":[["df3e4bfe.009b88"],["ed312836.8c40f8"]]},{"id":"6edd7a56c4a06ade","type":"delay","z":"4d1d611d.bd4da","g":"91fade93.7dae5","name":"1 sek","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":570,"y":40,"wires":[["95e9fc25.5a002"]]},{"id":"f00e785fd564cdd3","type":"server-state-changed","z":"4d1d611d.bd4da","g":"91fade93.7dae5","name":"Czy zmiana w HA","server":"c00e7dc3.fec7d","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.pod_szafkami","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[],"x":120,"y":100,"wires":[["40e47b1be78e9167"],[]]},{"id":"40e47b1be78e9167","type":"switch","z":"4d1d611d.bd4da","g":"91fade93.7dae5","name":"Czy przełącznikiem","property":"pod_szafkami","propertyType":"flow","rules":[{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":730,"y":100,"wires":[["ed312836.8c40f8"]]},{"id":"7f257382.e85b1c","type":"mqtt-broker","name":"HA MQTT","broker":"localhost","port":"1883","clientid":"","autoConnect":true,"usetls":false,"compatmode":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""},{"id":"c00e7dc3.fec7d","type":"server","name":"Home Assistant iZYD","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"}]

Nie było mnie kilka dni w domu więc dopiero wrzucam (o ile to pomoże)

tutaj masz cały json ze moim sterowaniem oświetleniem

flows.json (79,9 KB)

Dzieki Rafał,

Twoje flow to kosmos jeszcze dla mnie.
Poki co odpuszczam swoj przykład bo ciagle nie wychodzi…;|
Kurde a kopiouje prawie identycznie jak ma Rafał na yt.
Chyba że ktos pomoże za pare groszy i mi to wyjaśni co robię źle to chetnie zapłace.

Ok napisz co chcesz uzyskać tzn. kiedy ma zapalać światło kiedy gasić, oraz jakie warunki i jaki sprzęt ma to wywoływać) coś w wolnej chwili postaram się pomyśleć i podeślę jakieś moje przemyślenia :wink: