Hi all. I have been using OpenHab for about 4 years now. I have been seeing some strange things after upgrading to 2.4. My light will switch on at random and my bathroom extractor fan that is controlled by a sonof basic will switch on and off at a rapid pace almost like a PWM signal but it seems to be MQTT signals it is getting. Has anybody else seen this ?
- Platform information:
- Hardware: Raspberry Pi
- OS: Latest
- Java Runtime Environment: Latest
- openHAB version: 2.4
After upgrading are you using the old 1.x or the new 2.4 version MQTT binding?
Have you looked in events.log and used a third party MQTT client to see/verify that the messages are being sent from OH?
Do you have Rules that are driving these commands?
Hi. Thanks for the reply.
I am using the old 1.x binding for MQTT as I did not have time to figure out the new method. Is there an issue with using the version 1 binding and should I move to the new 2.4 version ?
Where can I find the event logs that I should have a look at ?
I have only 1 rule and that is to switch on a light stand at 6 en switch it off at 12.
Read the log file chapter in the doc
It seems that the logs are not being updated as they are all very old.
None that I know of. But the two versions are completely different. Knowing which one you are using is vital to help figure out the problem.
Either the time is really messed up on this machine, you had OH installed using apt up until March and then switched to a manual installation for some reason, or you have a very broken OH install. The logs don’t just stop without some change you made or something going wrong. Without the logs we cannot hope to help diagnose this problem.
Does everything else in OH work?
Hi. I had Openhab 1 installed on the same Pi and did an Upgrade 2 years ago. OpenHab is working and all is fine. Only issue I have is the app will not work all the time. I get a lot of service down issues but I guess that is the cloud service being down. If I go to the web interface all works 100%. Where do I check the config to sdee where the log files should be saved ? The time is correct on the Pi. I have other systems running on it as well like EMONCMS and it draws the charts 100% according to the time.
The reason I suspect OpenHab is when the extractor fan goes into the on off mode I see the button on the Openhab dashboard also jump from on to off in sync with what the fan is doing. I thought maybe somebody hacked my OpenHab cloud account and was remote controlling my devices.
Unlikely but anything is possible.
But if you haven’t changed this file there is something very big and very fundamentally wrong with your setup. If you are on an SD card, you might consider your SD card is wearing out or corrupted due to a loss of power.
I can see the messages coming in from MQTT
I killed Mosquitto en it stopped. So I need to figure out where this is coming from. I deleted the log files and it created a new one when I restarted OH2
When I click the switch on the dashboard it will send the command 2 times via MQTT. Is it because of the version 1 binding ?
Worth showing events.log for that double-send as well.
Autoupdate has changed a bit in 2.4, I wonder if that is involved. As you get status update back from the device, you can disable it for that Item.
There is no events.log file, only openhab.log with nothing in it
Do you think I should remove Openhab and re-install it ? I used apt-get to install it last time I think.
That does seem bad, if you’re really sure you are looking in the right places.
OK I removed OpenHab and reinstalled it. Now the events.log is working. Will monitor and see what happens now.
OK so it happened again and it recorded to the event.log file. How can I trace to see what is sending the on/off so rapidly ?
If I kill mosquitto it stops. Even if I restart mosquitto it will not start up again till a later time.
It appears something gets into a loop.
I don’t know MQTT logs, but the one you showed earlier appears to me to be all incoming status changes i.e. its not a case of OH spewing commands to the extractor, its the broker fabricating them or the tasmota spewing them.
Maybe someone with more MQTT experience would confirm that.
My money would be with the tasmota - confident there is a good WiFi signal? Anythiing close at hand to interfere (like an electrically noisy fan)?
OK so its seems I found what the problem was. I used Node Red to switch of the extractor after 20 min. This worked for 2 years. But is seems that after the 2.0.4 upgrade something changed and it made the integration not work correctly. I now use the Expire binding in Openhab itself and it seems to be stable again.