Do you have any idea what I’m doing wrong? Cause when I press the switch button ‘ShellyTest’, nothing happens. Only the ‘ShellyTest2’ (rest, no MQTT) works fine, but I cannot read the status of the Shelly there.
The MQTT2 version binding works via Things, Channels and Items linked to Channels.
In your example you are using the old MQTT1 definitions.
So either change your definitions or install the legacy MQTT1 binding.
I’m also struggleing with the new mqtt binding (2.4.0).
I’m using the shelly 2 for controlling the roller shutters. but i don’t get the correct values send via mqtt. the roller shutter item only sends 0 or 100, but shelly expects open or close.
can this be done via a map file? where to put this in paperUI or in item-file?
Shelly1: MQTT
Shelly1 uses the following topics:
shellies/shelly1-<deviceid>/relay/0 to report status: on or off
shellies/shelly1-<deviceid>/relay/0/command accepts on and off and applies accordingly
Shelly1: /settings
Bug in OH 2.4. this is already fixed in OH 2.5 snapshots. Alternative: declare the broker in a separate file and don’t touch it while openhab is running.
Do you have any idea, how to get the status of the Shelly via rest? Here I can send a command, but how can I get the status into the switch in addition?
As far as I know all Shelly devices return their status information if you send a “/status” GET request, e.g. http://192.168.2.71/status. This will return a JSON buffer and you can extract the value you need from this response.
Currently, I don’t have a working openHAB example but I will work on it the next days.