OpenHab noob here trying to get this working but not having much luck.
I think I must have read nearly all the tutorials online on setting up openhab and configuring but I cannot seem to get MQTT fully working.
My plan is to have OpenHAB running on a raspberry pi, with either Arduino+Ethernet shield+relay or ESP8266(running Arduino code)+relay to control lights in the house.
Currently I have set up the following –
.Sitemap and .items configured for 2 switches
Openhab.cfg configured for the MQTT binding
If I open another terminal and use the command mosquito_sub –d –v –t /# , then flick a switch using the openhab.app website I can see the commands coming through.
I haven’t tried putting a Arduino in subscribe mode and waiting for the data yet (new house and waiting for broadband to be activated so im doing everything over a 4g wifi hotspot), but I am trying to mosquito_pub messages to the openhab but nothing is showing on the /start.sh console window, even though the messages look exactly the same on the mosquito_sub terminal as they do when the openhab sends the messages by toggling in the GUI.
Am I confused? I expected the messages to be routed into the openhab and toggle the switch?
I can speak and receive mqtt commands between my MacBook and the raspberry pi running openhab.
Also I have a arduino uno running some code, and it will connect to my MacBook and commands work fine, but it will not connect to the raspberry pi when I change the server ip to the raspberry pi’s
It feels like I have missed something,and it is blocking connection from the uno, perhaps because I have been using shh from the MacBook the raspberry pi allows the commands but will not allow them from anything else.