Nodered Mosquitto

Hello everybody

I installed Mosquito on my Raspberry. now I have specified my Rasperry as MQTT server on my Shellys. On NodeRed I also added the MQTT server. on Nodered it also indicates that it is connected to the MQTT server. However, he does not receive any packages from Shelly, does anyone know exactly how to do this or has instructions so that I can see what I am doing wrong ..?

Many Thanks

Hard to tell with no information, whats your flow look like, are both the node-red and mosquitto on same lan, what topic are you subscribed to?

If you are using mosquitto version >= 2.0 then you have to setup the configuration to allow connections from other devices on the lan. However, if you installed mosquitto from the Raspbian repo then it should not be version 2. You can check using
apt policy mosquitto
Mine says
mosquitto:
Installed: 1.5.7-1+deb10u1
Candidate: 1.5.7-1+deb10u1

If you install MQTT Explorer on one of your computers you can connect to mosquitto and easily see what, if anything, is publishing. That will tell you whether it is a problem with the Shellys connecting to mosquitto or something else. It is an indispensable tool if you are using MQTT, in my opinion.

Did you enabled mqtt on your shelly's?
it's a hard to find option, I think under Internet/security. Rtfm

Mosquitto was already installed on my Rasperry, how do I access the Mosquitto? you can't access a web interface via ip and port?

I don't understand. What do you mean by 'access'?
What does the apt policy mosquitto command show in a terminal?

Also what does sudo systemctl status mosquitto show?

Also is this a standard Raspbian install?

Those two statements appear to conflict.

mosquitto is installed on my Raspberry. How do I make settings on the Mosquitto server? I have no idea since I didn't install this ..

Why do you need to make changes, or do you know you are using version 2?
You haven't answered the questions I asked in order to find that out.

If you do need to make changes google returned this link for a search of how to configure mosquitto on a pi.

I am note sure that you haven’t put the cart before the horse. MQTT is very easy to use, but everything needs to be set exactly.

I assume that if you are using Shelley’s you will be sending a simple message to turn on and off. What you first need to do in node red is to set up an MQTT out node. On this node there will be a box with a pencil next to it, press the pencil. The next page will allow you to set up the MQTT broker, this is your current machines Pi address and of course the port setting of 1883. You can give this connection an name for convenience when using this broker later.

On your Shelley, you need to set the MQTT broker to the Pi address and port that you set up previously on the Shelley.

Now you need to sort out what signal the Shelley needs for on and off. This is done by attaching a dashboard switch node to the MQTT out node and setting on and off payloads.

Hopefully this has helped a bit, sorry I cannot give you help with the Shelley set up because I don’t have any experience with them.

Good luck

Rick

Something that you could intent is, in the topic properties put "#". it help you to look all the topic and payload that there are on MQTT. Or use MQTT Explorer / MQTT.fx

Captura de pantalla 2021-05-09 a la(s) 12.32.15 p. m.

Also, hopefully this has helped a bit.

Hi automati.
Don't know if you have solved the issue in the meantime. I use shellies with NR and mosquitto and they works very well together.
Since you write "However he (Node-red or mosquitto, please clarify) does not receive any packages from Shelly" I assume that you want to subscribe to the data from shelly via the mosquitto broker and, therefore, you need a "mqtt in"node. Have you done this? Also be sure to have specified the same topic both in mqtt in node and the shelly device configuration page (field Custom MQTT prefix of tab "Internet & Security -> Advanced-developer Setting "
HTH

I would at first install an mqtt client on your pc/laptop/...

  • check you can publish ánd receive messages
  • then check your shelly settings: internet & security - advanced. Check mqtt is enabled and the settings are ok.
  • as said above, in your mqtt client listen for topic # (you might see a lot coming to you) and see what you receive when you switch shelly manual on and off.
  • with the results and shelly’s doc, find out how to operate shelly from your mqtt client.
    Could be something like:
    shellies/shellyswitch25-F40E6A/relay/0
    shellies/shellyswitch25-F40E6A/relay/0/command
  • then open node red and try to implement it as above said.

One Word......Tasmota !

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.