ppieczul/org.openhab.binding.loxone

Update miniserver state does not work

Closed this issue · 17 comments

Hello,
the function "Updates of openHAB channel's state in runtime according to control's state changes on the Miniserver" does not work in my environment. Tested with classic UI and HABpanel. I can control Loxone devices, but the if I e.g. switch on a light via Loxone app or wall switch, the state is not updated in HABpanel/classic UI. Running openHAB2 with 2.2.0-SNAPSHOT release, Miniserver software V8.3.3.21.
Might I have done something wrong?
Greetings,
Harald
P.S. Tested in Safari (11.0 (12604.1.38.1.7)), Chrome (61.0.3163.100) and Firefox (56.0)

Ok, can be closed. I changed the "Period between connection keep-alive messages" from standard 240 to 120 seconds. Since then, it works.

Sorry, issue didn't went with the change of keep-alive setting. Still no refresh, when I reload the the dashboard.

Hi @Shogun1978
Could you please give me more details:

  • what exact version of the openHAB2 and the binding (does the binding come from openHAB or is installed separately?)
  • when you restart the binding or openHAB, does it work fine at first and breaks later or is wrong from the beginning?
  • when the state is not updating, what is the Thing status of your miniserver?
  • could you enable debug logging as described here and send the logs?
    Thanks

Hi ppieczul,
regarding your questions:

  • it is the openHAB 2.2.0 Build #1072, I use the binding that comes with openHAB (configured all in the web UI / PaperUI. Everything is found what is presented by the Loxone MS.
  • yes, everything works fine. I now tested how long it takes till the states will not change: 3-4 minutes. When I restart openHAB2, openHAB hangs in the WebUI with "Please stand by while UIs are being installed. This can take several minutes." Everything just works fine after cleaning the cache with "rm -rf /var/lib/openhab2/cache/*"
  • Thing status is still online
  • I am away for a week (IBM conference in Prague), so I can just try to get next weekend
    Thank you for this great binding and your support!
    Best regards,
    Shogun

Hi ppieczul,
I made DEBUG and TRACE logs - but there is just an openhab.log, which is empty.
Any ideas? Because I have no clue what it could be... The last thing I could do is a complete reinstall.
One last idea: Openhab2 runs in a KVM/Qemu Guest (Proxmox). But it shouldn't be a problem, the Loxone Miniserver Thing is visible and shown as online.
Regards,
Shogun

I rolled back to the initial snapshot directly after setting up the basic Ubuntu system before any other software (Java, OpenHAB). I will send you feedback when I tested everything - I have feeling, where the error could come from. But I want to be sure.

Ok, it was not the Java nor old 2.1.0 code... here are the log files after a fresh reinstall. All files are created in debug mode. I additionally try the same with trace mode.

audit.log
events.log
openhab.log

First question: the trace level was set manual, when the error came up again. I set the log level to trace and then restarted, so these must be the last fragment of the changed. The function did not work before the change to trace. Attached I have the log files set to trace level from last night till this morning. The GUI just uses two items, a living room dimmer and a living room light (switched). Everything else is not registered as an item. The GUI was not used since last night (laptop closed). Maybe the files give some information. Additionally, I can use another item, that is not updated very often like a kitchen room light we seldom use. Then I will run on log level debug for 40 minutes and see, what happens. I will send over the log files also. First: here are the trace level files:

events.log
openhab.log
openhab1.log
(openhab1.log was changed from openhab.log.1 for upload)

No need to thank me, I have to thank you! Here is the last log in DEBUG mode. If you want, I can restart the system and run everything in TRACE mode. Just give me sign.
events.log
openhab.log

Ok, I see... this is "dew point guest room". The value is calculated from a temperature and humidity sensor (1-wire). This sensor is faulty and gives sometimes bad values which seems to deliver a non readable value in Loxone. The value is "-nan(ind)". Here the formula:
243,12*((17,62I1)/(243,12+I1)+LN(I2/100))/((17,62243,12)/(243,12+I1)-LN(I2/100))
So if the humidity value falls to 0 (due to a faulty value of the sensor), the calculation gives out -nan(ind). This is causing the error in the Loxone binding.
Sorry for the stress - I will set a validation to prevent this error in Loxone. It was not your code, it was a bad value.

Cool, we have nailed it down! Thanks a lot. I will repro locally and add some code to prevent such severe consequences in case it happens.

Perfect, thank you for the amazing support and fast response! I hope you continue this binding for future releases. For now I simple excluded the values for openHAB to avoid these errors at all. But great if I could find a possible error that could come up from faulty calculations in Loxone (in this case it was an error in layer 8 ;-) ). Thanks again and please provide is with more great extensions and programs!