I installed the MQTT hub, client and server again and it works now! Thanks for the help !
Hey Guys!
I hope you can help me with this.
I’m trying to toggle multiple lights with one switch, but I can’t really figure out how.
Although I’m new to this whole Node Red thing, I’m willing to learn.
What I’ve done so far is to toggle separate lights and showing their actual status. But I don’t want to create multiple buttons (e.g. for the lights in one room).
Maik
Make a group (app) device in Homey, or a virtual switch (also an app) and some flows in the homey.
Of course it is possible in Node-red also, but then you need an true/false output to multiple functions which set the mqtt status for each lamp.
So easy.
You’re totally right.
Thank you!
If you want to do it inside Node-red: Every MQTT-out can overwrite the received topic. So if you change the topic inside every MQTT-out you can switch multiple lights with a single switch by connecting multiple mqtt-out’s to a single switch.
But I personally think @M_a_r_c_o 's solution might be more convenient if you want to use it outside of node-red. For example I ask siri: “Hey Siri, Moodlight” and it sets and switches multiple lights inside a flow.
Thank you Satoer.
I did it with the solution @M_a_r_c_o gave me.
When i paste your code into a template, what else do I need to ‘connect’?
Because a template you can not ‘show’ on your dashboard?
The template node doesn’t have to be connected to anything to display the image on the dashboard.
You only need to specify in which group you want to “show” the template node. (Like any other UI node):
Hi,
Sorry for the late reply. Been busy last few weeks.
If stil needed here is the json for the newsitems as requested.
[{"id":"fa15d643.22c738","type":"ui_template","z":"dc66d990.117fb8","group":"daf50d5b.5ef0f","name":"Buienradar","order":6,"width":4,"height":4,"format":"<a href=\"https://www.buienradar.nl\" target=\"_blank\"><img border=\"0\" src={{msg.payload}}></a>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":530,"y":620,"wires":[[]]},{"id":"a3e011a9.bce45","type":"http request","z":"dc66d990.117fb8","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"http://feeds.nos.nl/nosnieuwsalgemeen","tls":"","persist":false,"proxy":"","authType":"basic","x":290,"y":500,"wires":[["23e40bbc.f70dd4"]]},{"id":"23e40bbc.f70dd4","type":"xml","z":"dc66d990.117fb8","name":"","property":"payload","attr":"","chr":"","x":450,"y":500,"wires":[["a0a47240.9b5b2","6e29915b.2ebc7"]]},{"id":"a35dc647.0fdae8","type":"inject","z":"dc66d990.117fb8","name":"Elke 15min","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"*/15 6-22 * * *","once":false,"onceDelay":0.1,"x":122,"y":500,"wires":[["a3e011a9.bce45","2c2ade08.e65df2"]]},{"id":"a0a47240.9b5b2","type":"debug","z":"dc66d990.117fb8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":590,"y":560,"wires":[]},{"id":"ce9fbe3c.76c78","type":"template","z":"dc66d990.117fb8","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<h3><a href=https://nos.nl/nieuws/ target=\"_blank\" style=\"color:white\">NOS</a></h3>\n<table>\n <tr><td>{{payload.one}}<hr></td></tr>\n <tr><td>{{payload.two}}<hr></td></tr>\n <tr><td>{{payload.three}}<hr></td></tr>\n <tr><td>{{payload.four}}<hr></td></tr>\n <tr><td>{{payload.five}}<hr></td></tr>\n <tr><td>{{payload.six}}</td></tr>\n</table>","output":"str","x":780,"y":500,"wires":[["8d05743a.92baf8"]]},{"id":"8d05743a.92baf8","type":"ui_template","z":"dc66d990.117fb8","group":"6f3af887.fa4f68","name":"Nieuwsfeed","order":1,"width":6,"height":9,"format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":950,"y":500,"wires":[[]]},{"id":"6e29915b.2ebc7","type":"function","z":"dc66d990.117fb8","name":"Last 6 items","func":"msg.payload.one = msg.payload.rss.channel[0].item[0].title[0]\nmsg.payload.two = msg.payload.rss.channel[0].item[1].title[0]\nmsg.payload.three = msg.payload.rss.channel[0].item[2].title[0]\nmsg.payload.four = msg.payload.rss.channel[0].item[3].title[0]\nmsg.payload.five = msg.payload.rss.channel[0].item[4].title[0]\nmsg.payload.six = msg.payload.rss.channel[0].item[5].title[0]\nreturn msg;","outputs":1,"noerr":0,"x":610,"y":500,"wires":[["ce9fbe3c.76c78"]]},{"id":"2c2ade08.e65df2","type":"function","z":"dc66d990.117fb8","name":"","func":"msg.payload = \"https://api.buienradar.nl/image/1.0/RadarMapNL?w=204&h=204\"+Math.random();\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":620,"wires":[["fa15d643.22c738"]]},{"id":"daf50d5b.5ef0f","type":"ui_group","z":"","name":"Weer + Verkeer","tab":"a74c5fa4.31437","order":3,"disp":true,"width":"4","collapse":false},{"id":"6f3af887.fa4f68","type":"ui_group","z":"","name":"Nieuws","tab":"a74c5fa4.31437","order":2,"disp":true,"width":"6","collapse":false},{"id":"a74c5fa4.31437","type":"ui_tab","z":"","name":"Overzicht","icon":"dashboard","order":1,"disabled":false,"hidden":false,"info":"<title>Thuis</title>"}]
Hi @Satoer
I have an aqara sensor, but I am not able to see it through NodeRed. In Homey it is displayed correctly, temperature, humidity …
I tried to check it with the Mqtt-Explorer. The sensor appears, but only shows two topics. Type and name of sensor.
I tried to restart everything. I have the MQTT in a Raspberry.
I have also activated the “Broadcast system state”.
Any ideas?
The picture does not show the info of the aquara sensor, its still folded.
Weird, I have multiple of these sensors. without barometric pressure:
And with barometric pressure:
They all work fine.
I would try to restart the MQTT hub. Or restart Homey completely. You might also need to wait a while while new temperature messages are pushed over MQTT. I’ve noticed some MQTT brokers are working differently. I’m using a MQTT broker on my Synology NAS, and this one keeps way more data cached than the Homey MQTT broker. The Synology broker pushes all previous messages when a MQTT device signs up. At least I noticed it when I publish a new node-red change and watch the debug stream.
Just keep the MQTT explorer open for a while. If a new MQTT message arrives, it will add it to the MQTT tree.
Hi @Satoer
Yes. That must be the problem. I spoke with the developer of the Aqara application and it seems that the sensors take time to synchronize with the application and the MQTT Broker includes them in “offline”.
I got to know that if I “turn off and on” the sensor from the MQTT Hub application, the sensor starts to send data to the Broker.
I am trying to make a flow so that once the homey is restarted, the MQTT Hub is restarted and so I can find the sensors.
It seems that these sensors also have a novel barometric pressure.
I will be telling you news.
Thanks!!!
… and it looks like no $properties topic for the nodes either , although in your application you probably don’t use that.
Share some inspiration of using Node-Red as dashboard presenting data from different data sources. have based the Homey integration on node-red-contrib-homie-convention in Node-Red and some other data such Wind and Energy via MQTT. Most of the texts is Swedish but I believe you anyway can interpret the data and the ideas.
Next step is to start integrate my IP-cameras…
Mainpage
Subpages
Hi @Satoer
I continue with the design of the Node-Red panel.
I wanted to ask you: how do you show the temperature icon and the number of degrees of temperature that the probe marks?
I have tried several things but I cannot do it how you have it.
Thank you very much for the help!!!
Hi Angel,
I’ts just a “template” node (the blue one) with a piece of HTML:
<p style="text-align: center">Woonkamer</p>
<p style="font-size:35px; text-align: left; font-weight: bold; "> <i style="color:#0094CE!important;" class="fa fa-thermometer-three-quarters" aria-hidden="true"></i>
{{msg.payload}}°</p>
You can use all kinds of basic HTML code. Look in the “Node help” dialogue sidebar how to insert and output value’s.
As always, THANK YOU @Satoer
Thank you very much!!!
Hi mate, i’m receiving the icon but the temperature value is not showing up
I added a debug node directly after my tempsensor and i receive a value.
So i connected mqtt node to the template and from template to a text.
Something i did wrong?
Thank you