Closed dreeas closed 3 years ago
Hi Andreas. Also hoping for this support If you are running Node Red I have a quickfix for you. If you import this flow it gives you a example. It picks up the message directly from the mqtt broker and runs it thru a switch-node that routes the flow depending on how you have used the switch. I use this flow in several rooms at home. you can use it more or less directly after adopting to your installation. If you look at the 'topic' in the mqtt node, you should edit the number to the datapointnumber your switch is at and you are all set
[{"id":"19e70d92.957912","type":"mqtt in","z":"77301e62.f7de6","name":"Stue bryter","topic":"xcomfort/27/event","qos":"2","datatype":"auto","broker":"8d04253a.52e1a8","x":200,"y":80,"wires":[["17e05c13.557034"]]},{"id":"17e05c13.557034","type":"switch","z":"77301e62.f7de6","name":"Sw eval","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"upPressed","vt":"str"},{"t":"eq","v":"upReleased","vt":"str"},{"t":"eq","v":"downReleased","vt":"str"},{"t":"eq","v":"downPressed","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":380,"y":80,"wires":[["1319643b.294c0c"],[],[],[],[],["16dad825.30ea08"]],"outputLabels":["Enkel opp","Hold opp","Slipp opp","Slipp ned","Hold ned","Enkel ned"]},{"id":"1319643b.294c0c","type":"api-call-service","z":"77301e62.f7de6","name":"Normal","server":"e0b0277.67740d8","version":1,"debugenabled":false,"service_domain":"scene","service":"turn_on","entityId":"scene.stue_normal","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":660,"y":40,"wires":[[]]},{"id":"16dad825.30ea08","type":"api-call-service","z":"77301e62.f7de6","name":"Dempet","server":"e0b0277.67740d8","version":1,"debugenabled":false,"service_domain":"scene","service":"turn_on","entityId":"scene.stue_dempet","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":660,"y":120,"wires":[[]]},{"id":"8d04253a.52e1a8","type":"mqtt-broker","name":"HA Mosq","broker":"http://homeassistant.lan:1883","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"e0b0277.67740d8","type":"server","name":"Home Assistant","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
Great, thanks. Gave it a try now and seems it won't connect to the broker.
Tried with your settings, also tried with 127.0.0.1 but just getting error. See the log from mosquito:
On the security page for mqtt serverconfig in node red you have to enter the username and a password for a user. Have you created a user for node red? (This is done in the usermenu in HA)
Great, thanks. Gave it a try now and seems it won't connect to the broker. [image]https://user-images.githubusercontent.com/65780543/109846627-a99f1300-7c4e-11eb-9f90-2285b414b579.png
Tried with your settings, also tried with 127.0.0.1 but just getting error. See the log from mosquito:
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/karloygard/hassio-addons/issues/14#issuecomment-789917368, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJF5SODWIBOPJMM4R4NEQH3TBZXQFANCNFSM4YQX7CCQ.
No I had not, made a nodered user and filled in info in the security tab and believe it connected according to the mosquito log:
Last log entry new client?
But still the nodered mqtt-in object is showing "connecting" and not receiving anything.
Setting server to http://127.0.0.1 AND adding the Nodered user helped :-)
Pushbuttons are exposed already, but using them is a little quirky; you have to use automations to trigger actions. Select the desired device under "Configuration -> Devices" and start adding automations.
Hi Karl,
I have a double xcomfort pushbutton on each side of the bed where a long press down should activate house night mode. I see the pushbutton is registered in the mosquito broker devices but the only entities is battery and signal strength. Is there a way to add the entities manually?
Both short and long push of the button is showing up in the addon log. Short push shows event on/off while long push shows downPressed/downReleased:
2021/03/03 09:02:02 handle_events: error: libusb: interrupted [code -10] 2021/03/03 09:02:12 RX: [c142500000000000003e0504] 2021/03/03 09:02:12 Device 5694204 (channel 1-'Hovedsov seng h�yre (h�yre)') sent message (battery new, signal good, cyclic false) event 'on' 2021/03/03 09:02:12 RX: [c1366221001fef0000453007] 2021/03/03 09:02:12 Device 5775793 (channel 1-'Energisensor VP 2etg. ( Effekt )') sent message (battery mains-powered, signal normal, cyclic true) event 'value' with value 817.5 2021/03/03 09:02:32 RX: [c142510000000000003d0505] 2021/03/03 09:02:32 Device 5694204 (channel 1-'Hovedsov seng h�yre (h�yre)') sent message (battery new, signal good, cyclic false) event 'off' 2021/03/03 09:02:32 RX: [c1376223000f0f0000463008] 2021/03/03 09:02:40 RX: [c142560000000000003c0506] 2021/03/03 09:02:40 Device 5694204 (channel 1-'Hovedsov seng h�yre (h�yre)') sent message (battery new, signal good, cyclic false) event 'downPressed' 2021/03/03 09:02:42 handle_events: error: libusb: interrupted [code -10] 2021/03/03 09:02:43 RX: [c142570000000000003e0507] 2021/03/03 09:02:43 Device 5694204 (channel 1-'Hovedsov seng h�yre (h�yre)') sent message (battery new, signal good, cyclic false) event 'downReleased'
Br Andreas