Powiadomienia
Wyczyść wszystko
Krótkie pytanie i krótka odpowiedź
27
Wpisów
4
Użytkownicy
1
Reactions
1,542
Wyświetleń
Autor tematu
[{"id":"82ae8264e29328bb","type":"tab","label":"radio","disabled":false,"info":"","env":[]},{"id":"832c199232ccfcb1","type":"debug","z":"82ae8264e29328bb","name":"debug 22","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":440,"y":160,"wires":[]},{"id":"28dcf1e3fd4787d3","type":"server-state-changed","z":"82ae8264e29328bb","name":"radio1","server":"3d7533d10bf6d654","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"media_player.volumio","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":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"Data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"radio","propertyType":"flow","value":"","valueType":"eventData"}],"x":170,"y":200,"wires":[["832c199232ccfcb1","d098508686460ae4"]]},{"id":"d098508686460ae4","type":"http request","z":"82ae8264e29328bb","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://10.10.10.127/control?cmd=dotmatrix,txt,1,{{payload}}","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":430,"y":280,"wires":[[]]},{"id":"3d7533d10bf6d654","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":": ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"default","statusTimeFormat":"h:m","enableGlobalContextStore":false}]
Dodane : 08/04/2023 9:09 am
@pawell32 skopiuj tą scieżkę, wklej do notatnika i zobacz jak wygląda, potem musisz użyć funkcji żeby odpytać zmienną "radio" i zapsać do nowej zmiennej ten konkretny atrybut i dalej wysłać go jako payload. Pokazałem przykład już wcześniej tylko nie wiedziałem co chcesz zrobić z tym atrybutem title
Dodane : 08/04/2023 9:21 am
Autor tematu
Dodane : 08/04/2023 9:24 am
@pawell32 nod funkcja, na poniższym foto zmienna przepust przechowuje pozycję przepustnicy kominka, kiedy zostanie wysłane polecenie ustaw na 40% nie chcę żeby przy kolejnym cyklu znów było wysłane do przepustnicy to polecenie, chyba że poziom jest inny niż 40%
Jak widać GET odpytuje zmienną , potem zapis do var - poziom samego atrybutu position i prosty IF
Ty masz jeszcze łatwiej
Dodane : 08/04/2023 9:32 am
podmień swojego noda event
[{"id":"ab7f2f92.a50cc8","type":"tab","label":"Przykładowy flow","disabled":false,"info":""},{"id":"bd5a5d5a.849e88","type":"api-current-state","z":"ab7f2f92.a50cc8","name":"Stan urządzenia","server":"61c2b02c.8e369c","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.example_device","state_type":"str","blockInputOverrides":false,"override_topic":false,"state_location":"new_state","override_payload":"none","entity_location":"data","override_data":"none","x":170,"y":80,"wires":[["d43e08e2.2a7358"]]},{"id":"d43e08e2.2a7358","type":"function","z":"ab7f2f92.a50cc8","name":"Filtruj atrybut media_title","func":"msg.payload = msg.data.new_state.attributes.media_title;\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":80,"wires":[["c8a5d5d5.5f57a"]]},{"id":"c8a5d5d5.5f57a","type":"debug","z":"ab7f2f92.a50cc8","name":"Wyświetl filtrowaną wartość","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":80,"wires":[]},{"id":"61c2b02c.8e369c","type":"server","name":"Home Assistant","version":1,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeatInterval":"60"}]
Dodane : 08/04/2023 9:38 am
Autor tematu
@mariusz-2 dziękuję i poczytam jeszcze nt. To co mi podpowiedzieliście to działa, wymaga dopracowania, ale to po świętach. Na niektóeych wyświeltla mi np. tylko wykonawcę, tytuł jest po przecinku i tego już nie. Spoko i wesołych.
Dodane : 08/04/2023 10:33 am
Strona 2 / 2
Poprzednia