Shelly Binding - External Sensors

Hi developers and community,

is it possible to add a new channel for Shelly 1 to get the state of external sensor.
I’ve a temparatue-addon with a reed-switch to get my doorposition.

xxx.xxx.xxx.xxx/status: … “ext_switch”:{“0”:{“input”:0}} … close
xxx.xxx.xxx.xxx/status: … “ext_switch”:{“0”:{“input”:1}} … open

Do you know a other solution?

Thanks
Spiwi

One solution could be to use MQTT instead of the Shelly binding.

Hi Sunny,

please explains your idea. I don’t use MQTT at the moment!

Thanks!

Whilst I don’t personally use it, I do know most Shelly units support MQTT ( MQTT Support – API Reference (shelly.cloud))

The MQTT server would basically receive messages from the Shelly which should include the information from the add-ons.

You will need to configure an MQTT server - I believe there is one in OpenHAB but from forum posts I would say it is better to install a separate MQTT server. You would then configure the Shelly to use that MQTT server and configure OpenHAB to subscribe to the server and relevant channels.