Node Red: A widget based dashboard working with Homey trough MQTT

And shutdown docker first, and the edit the docker setting to do that.
Then start the docker again.

@Robin_van_Kekem and @M_a_r_c_o
Thanks, I was impatient. After changing the port and restarting docker it takes some time before the dashboard starts working. Now it is working with my own port.

Sorry, feel a bit stupid here but… Got the port right now. Switches work but not two way. I used the example above (changed values to my own) but the switches don’t change when I switch the light through homey.
I have set my server and topic in “MQTT receiver light”. In the debug window I see the light go to false or true twice, so it gets the message but… what did I do wrong :relaxed:

My first guess is that you forgot to put “/set” behind the topic:

Double click the Output node, select the MQTT server (previous created) and fill in the topic (from the debug window): homie/homey-topic/light/onoff/set
NOTE!: you NEED to add “/set” behind to topic to control it.
The node will automatically use the parameter that the switch generates (msg.payload).
firstswitch

You also need to uncheck the “Pass though msg if payload matches new state” inside the switch. Otherwise you create a repeating loop.

Hi @Satoer,
This is what I have:





As it is now it does not work.

You have a wildcard ("#") in the topics first “MQTT in node”. This way, all messages are put trough, and the switch will be switched by any mqtt message with a boolean value. You should change this to:
“homie/homey-topic/woonkamer-spot/onoff”

Also, try to add the topic “homie/homey-topic/woonkamer-spot/onoff/set” inside the output node topic (although it shouldn’t make a difference if the topic in the switch is correct)

You can download MQTT explorer to check all MQTT in / out messages, and try to set a light directly using MQTT:

I have MQTT explorer and as far as I can see all messages are getting through.
I have set the topic before but that did not work either. I have did so now again, sadly it still does not work. I even set it in the output topic now, still no luck.


btw. Satoer, thanks for your help :+1:

Hi @Satoer,
It works now. I had to check the “Pass though msg if payload matches new state” and now it works. You said to uncheck it so I hope it has no further negative side effects.

Ok, I gave this a try, despite missing the (probably essential) developer skills.

I currently have the MQTT Broker, Client and Hub on Homey. I have Termux on an old android tablet, which has node red installed. I followed the steps of Satoer and got to the point where Node Red is connected to the Broker.

Some settings:
Broker:
Gate 1883, Debug logging on. Other than that, everything not checked and no additional data given

Client:
IP address of Homey entered, without http:// or :1880.
Gate number entered (1883)
Disable certificate check
Keepalive of 60 seconds

Hub:
Running (of course)
Changed topic name (not used that yet anywhere)
Everything else unchecked
Devices all enabled

The problem I’m facing is that no data is shown in de debug screen when I turn a light on or off. Tried restarting all the apps a few times. Does anyone have an idea what I’m doing wrong?

thanx for the great tutorial.

I can turn on and off some lights and i’m able to read values from sensors en show them whith some gaugs on the dashboard.

Now i whant not only turn the lights on and off but olso like to dim the lights, can you explain how i can do that?

greats JW

Have you installed MQTT explorer mentioned by Satoer? With it you can see every message that is sent by MQTT. Try pushing the “broadcast” button in the MQTT hub.
Lastly, sometimes it takes some time before everything starts working.

Haven’t installed the MQTT explorer yet, will try that tonight.
I did try the broadcast button a few tmes, but no result so far.

I installed it about 3-4 hours ago, and it’s not yet working. I would expect this to be minutes? Or can this really take a few hours to work?

Am I correct when I assume that I simply need to turn on a light in the Homey app, and I should see the output in the debug field? That is what I understood from Satoer’s opening post.

No, should be minutes indeed.
You are right, switching in homey should show it in the debug window.
Try MQTT explorer, see if you see the messages there. If so then it is a setting in node red, else, it is in the MQTT apps in homey.

I didn’t manage to install the MQTT Explorer, but I tried several MQTT Clients in de Play Store. I didn’t receive any messages. So this must be in the Homey apps somewhere, right?

Any ideas where to look first?

  • Broker, port number, username and password and start the broker.
  • Client, homey ip address, same port as broker, check certificate, same username and password.
  • Hub, running switch on ( :wink:), topic, commands switch on, topic, send birth and last will messages switch on.

That is what I have.

Alright, I copied this now. Didn’t work yet, I will let it rest for a few minutes and try again. Thanks for the help so far!

Edit: It still doesn’t work for me…
Edit 2: When using the Client on the android device to publish a message, this is received by Node Red
Edit 3: When turning the hub on and off, this is shown on Node Red

EDIT 4: It works! I changed the topic from homie/homey-neuron44 to homey and it suddenly came to life. Thanks for the help!

Did you add a “#” in the MQTT receiver topic (without the quotes)? This is a wildcard to receive every message.

Great! Good to hear.

I would like to add a camera fead from my doorbird. Doorbird is an ONVIF camera which I have in my Synology surveillance station. So I thought I could just add the synology nodes and make it work. Sadly I could not. I tried a ONVIF node that did not work either. I tried the sollution from Tangodelta, still nothing. Has anyone managed to add an ONVIF camera (or the doorbird)? I can find so little on the internet about adding a camera.

Camera feed is following the api of doorbird.
http://[device-ip]/bha-api/video.cgi?http-user=xxxxxx0001&http-password=xxxxxxx"
http://[username]:[password]@[device-ip]/bha-api/video.cgi"

https://www.doorbird.com/api
https://www.doorbird.com/connect

(corrected post on 19/12/2019 to have a correct first url)

Yes, I did that. Thank you!