Just a quick reference: Using the original firmware, you can control your shelly 1 switch with the new mqtt 2.4.0 binding as follows:
Create a mqtt broker, providing your broker’s data, and create a MQTT Thing. In the MQTT Thing configuration, create a new channel with the followin Data:
Sorry, this string in the THING file cause Bridge not start (not visible in Paper UI)
[ stateTopic=“shellies/shelly1-4FFC66/online/0”, commandTopic=“shellies/shelly1-4FFC66/online/0/command”, on=“on” off=“off”]
Instead this is fully operational and Paper UI show both Bridge and thing channel configuration
[ stateTopic=“shellies/shelly1-4FFC66/relay/0”, commandTopic=“shellies/shelly1-4FFC66/relay/0/command”]
So it seems I’m wrong with the aliases configuration at the and (on and off)…
Preceeding lines in thing file for Bridge configuration is
Bridge mqtt:broker:brignoudBroker [ host=“192.168.xx.xx”, secure=false, username=“openhabian”, password=“xxxx” ]
{
Thing topic shellies {
Channels:
Type switch : shelly1-4FFC66 “Kitchen Lamp”
…
Replicated your config step by step except the shelly ID and some minor
I got nothing but the broker and the thing available and still didn.’ see the value passing throught MQTTfx
I defined a Switch in sitemap that seems to do nothing alterning the state
In my Shelly panel configuration I got this
Does it misleading with the OpenHab configuration files we shared ?
I regulary see value in transit when I operate from the phisical button or virtual Shelly app so MQTT is fully working I assume
Just checked mine from the phone and it shows the same message in the “Will Topic”, but that doesn’t change regardless of if I turn the Shelly off via the Shelly web app or OH switch.
Have you tried enabling full logging on mosquito and watch the messages for state changes?
Do you use habmin and if so does the broker and Shelly switch show as available under configuration/ things?
Just checked the last (?) thing, I just wanted to try adding the port to the Bridge configuration
It’s works now as expected!
By the way, port number is the standard (1883) but it seems configuration need it anyway
Don’t know if is normal behaviour or if it has dignity to pay attention to it by the OH mantainers
Thank you all for supporting, you made me understand a lot with MQTT
Hi,
Like a lot of people here I’ve been using other people’s examples to get my own working with the new mqtt 2.4, the link below is where I started with some of this.
But if I made an educated guess the first “Shelly 1” is just a nice name for the topic, so in Habmin is see Shelly 1 under things instead of StudyShelly1, @ “Study” is just a nice location name but not sure if it has any other use.
The docs don’t really mention the use from what I’ve seen.
sorry man @LungBen , could you post your config? Things , item and sitemap (eventually rules or JS) on shelly 2.5 but nothing…
i have read many posts but i’m at the same start point…
attached are screenshots of my openHAB configuration (in PaperUI - requires OpenHAB 2.4).
Unfortunately I cannot provide screenshots of my Shelley config now, my garden water equipment is already switched off for winter. Hope that the information is nevertheless helpful!