Hello! I am new to openHAB but so far am quite excited about the possibilities! However, I have run into a bit of a problem which I cannot find a solution for. There are many threads which seem to address a similar issue but I just cannot find a working solution.
I have the following things in place
OpenHAB2 install on my Mac
Mosquitto install on my Mac
MQTT.fx running.
A Sonoff basic switch flashed with tasmota.
I can successfully control my sonoff/tasmota switch using the MQTT.fx program, by sending an “ON” or “OFF” command to: cmnd/sonoff/POWER
I have the following configuration files.
services.mqtt.cfg
[File is default with the expeption of the following]
broker.url=tcp://192.168.0.120:1883
broker.user=DVES_USER
broker.pwd=xxxxxxxxxxxxx
NB: the above detials are the same as set up in MQTT.fx which is working
but no matter what I seem to try in the home.items file, sonoff, cmnd/sonoff, cmnd/sonoff/POWER etc… the switch MQTTDEMO will not communicate with my sonoff.tasmota. I have been through thread after thread but cannot see what I am obviously missing. I am sure I am not the only one who has come across this. any help/guidance is appreciated!
Thanks mpampinos! the ON or OFF switch works for me. but, the getting the openhab switch to respond to the status of the relay is still beating me.
<[broker:stat/sonoff/POWER:state:default]
does not seem to work. I have seen various threads talking about mapping the response from the relay. I also get an error. NULL response received from topic if I operate the switch manually. so it seems that its working in part but not receive the correct message from the stat/ topic for some reason.
Yes is does work! the problem I seem to be having is large packet loss between Network and Sponoff! Not sure if you have come across this in the past? feels like this is a new thread item.
A Follow up on this. The problem I was experiencing with packet loss was solved when I moved my OpenHAB installation from my Mac to a dedicated Raspberry Pi. - I do not know why these issues were present. but either way, for me at least having dedicated hardware solved the issue.