Thing: Shelly via MQTT

Yes, when you split your things files you must add an extra parameter to give it clue about which broker to use, in round brackets.

for some reason it is still not switching.

shelly.items:
Switch ShellyBueroLicht “ShellyBueroLicht” [ “Licht” ] { channel=“mqtt:broker:embedded-mqtt-broker:shellybuero:ShellyBueroLicht” }

i think it has something to do with the channel definition. But i don’t how it should look like.

Yep, your channel is
mqtt:topic:embedded-mqtt-broker:ShellyBeuroLicht
I reckon.

You can examine your topic thing in PaperUI to see what it is called.

Not working with this settings.

in PaperUI the mqtt broker has no channels at all.

You need to look into your generic mqtt thing named “shellybuero”!

found it.

used

mqtt:topic:embedded-mqtt-broker:shellybuero:ShellyBueroLicht

which was written below the label for the thing.
still not switching.

Do you see any messages on your mqtt.fx when trying to switch from openHAB?
If not, your openhab instance migth not be connected to the broker you are looking onto with mqtt.fx.

I don’t see any messages in mqtt.fx when switching with open hab.
when i switch using the web interface of the shelly and being connected to the mqtt broker on open hab i see messages.

With what credentials do you connect to the mqtt brooker on mqtt.fx and what for openHAB?
Are these really the same?

In the examples above you seem to have an openhab embedded broker and another one running.

I don’t use credentials.

How can i check if i have 2 brokers running?

I have a Shelly 2.5. The problem with shelly was that shelly sends out “off” or “on” while OH only accept commons ON en OFF.

What I did was in PaperUi add a Thing [MQTT binding]- Generic MQTT Thing.
Then (…Add thing en show thing) I added a channel (ON/OFF switch).

Please state all actual settings and status of your Broker-Thing as can be sen on PaperUI.

This is more off an example. The issue here is to fill in as above in Custom on/Open value “on” and Custom Off/Closed off.
@denkteich Perhaps you can check to Büro thing channel for these values. I see now that @rlkoshak gave the same advices. If doubt in having two MQTT brokers:
It is a fact that installed de embedded broker. You can check for mosquito in a terminal.
image
I’ve installed Mosquitto as you can.
I don’t if you already tried to send actual on en off through MQTT.fx.


If your shelly reacts then your broker is okee.

Found a solution, thx for all the hints.

I really had 2 brokers.
One setup via a things file another automatically discovered via paperui sitting in the paperui inbox.

I started from scratch again and will use the following process:

  • Setup Shelly MQTT Thing and Channels using PaperUI
  • Setup Items using items files for more flexibility

thx
for the help

I guess you are talking here about a Broker-Things (the bridge to the mqtt broker) and not the actual mqtt broker!

What’s the IP of your Shelly and your broker? Really 127.0.0.1?

the broker has localhost (127.0.0.1) because it is running on the same host than openhab.
the shells hav normal private ips.

why did you think that the shellie have 127.0.0.1?

And the IP from your Shelly is on the same network 127.0.0.x?

the complete 127.0.0.0/8 network is used for loopback. so only accessible on the machine itself.
you can comminicate only with the host itself.
if openhab is running on the same host like the broker, you can use any address between 127.0.0.1 - 127.255.255.254 for the communication between openhab and the broker.

the communication to the outside (of the host) need to be with a non loopback address, commonly with an address of the following private ranges 192.168.0.0/16, 172.16.0.0/12 or 10.0.0.0/8.

Beside the loopback addresses the openhab host has an address of a private range and the shellies are in the same l2 broadcast domain. so no routing in-between.