steilerDev / homebridge-openhab2-complete

A homebridge plugin for openHAB, that has the expectation to fully support all Services offered by Apple's Homekit Accessory Protocol (HAP)
GNU General Public License v3.0
52 stars 16 forks source link

Unable to transform NULL using transformation map {"OFF":false,"ON":true,"CLOSED":false,"OPEN":true}) #31

Closed maisun closed 5 years ago

maisun commented 5 years ago

Hi, I noticed a few times in the log file that the plugin receives NULL value from OpenHub which causes transformation error and the accessory in Homekit become in error state: [6/24/2019, 4:30:12 PM] [openHAB2-Complete] Received state: NULL (transformed to Error: Unable to transform NULL using transformation map {"OFF":false,"ON":true,"CLOSED":false,"OPEN":true}) for Nilan Filters Replace [HomeKitVentilationFilterItem] [6/24/2019, 4:30:12 PM] [openHAB2-Complete] Unable to transform NULL using transformation map {"OFF":false,"ON":true,"CLOSED":false,"OPEN":true}

One strange thing is, in the events.log of OpenHAB the state of the switch in question has never been set to NULL. How to diagnose problem like this? Thank you!

steilerDev commented 5 years ago

In general you could enable the homebridge debug log and see if there is a cache miss and a problem with this plugin. Otherwise this also might be an openHAB issue, where you can use the openhab console to check the actual system state.

maisun commented 5 years ago

Thanks! I think it's OpenHAB issue, because the values are updated rarely and the cache was reset for some reason. Now I added a condition in my rules to trigger every 15mins the issue is gone :)

steilerDev commented 5 years ago

Perfect, glad it now works for you :)