We have power cut recently and when the power came back on I restarted my Raspberry Pi with openhab and MQTT on it. However openhab was failing to start. My first port of call was to do an UPDATE & UPGRADE as I havent done one for a while, However the UPDATE failed with references to invalid signitures. I found a post on the community referencing public key for the APT repos, I followed that and then was able to UPDATE, UPGARDE and start openhab2.
Now my problem is when i try and toggle any switch using the the openhab2 client in the web browser nothing happens, however if I go to the switches IP address and toggle manually I see the messages in an MQTT client.
My items file is OK I havent changed that for months, so I am just wondering what I can check that would give me any hints to the problem.
you are not telling us which version you are using, but some of the older version had issues with MQTT that can be fixed by clearing the cache (stop OH2, enter openhab-cli clear-cache; start OH2)
I hope I did the right thing I did openhab-cli clean-cache ; as opposed to clear-cache (clear-cache wasnt an option)
I still appear to have the issue, I am guessing (I may be wrong), but I think its openhab not communicating with mosquitto as I can communicate with the switches with the mosquitto client and vice versa
yes, sorry, openhab-cli clean-cache is the correct term (if you have stopped OH2 before executing the command).
Do you have any errors in your log-file? What is the status of the broker thing?
Unfortunatly I am not a LINU guru, so I am not sure if mosquitto is started as a service, howver I am presuming it is because it always starts when the server reboots and has been running ok for a number of months. is there a command i can useto check?
openhab.log file doesnt seem to have any errors, is there another log file that i should be looking at.
By the way mosquitto is running OK from the command line
If you have openhab 2.4 now you did run the mqtt binding 1 before. After the update openHAB has most probably loaded the actual MQTT (version2) binding.
In this case remove the binding, enable legacy bindings and install the version 1 MQTT binding.
For moving to the version 2 binding of mqtt it needs one more actions and reading.