justme-1968/homebridge-fhem

caching: On: true (as boolean; from 'off') ??

Opened this issue · 9 comments

Hi,

I get a strange caching for a Multilevel Switch (Z-Wave dimmer ZMNHDD1) without further homebridgeMapping applied: caching On:true for off.

The homebridge.log reports:

[1/15/2021, 4:56:58 PM] [FHEM] ZWD4.1: executing set cmd for On with value false
[1/15/2021, 4:56:58 PM] [FHEM]   executing: http://127.0.0.1:8083/fhem?
cmd=set%20ZWD4.1%20off&fwcsrf=csrf_233194561868642&XHR=1
2021-01-15 16:56:58 caching: ZWD4.1-state: off
[1/15/2021, 4:56:59 PM] [FHEM]     caching: On: true (as boolean; from 'off')
[1/15/2021, 4:56:59 PM] [FHEM]     caching: Brightness: 0 (as number; from 'off')`

Could this be linked to issue #32 - also see this lighting up to 100%

It doesn't seem to help to use nocache in the mapping.
Any ideas where to investigate or how to workaround?

please run homebridge with -D for more output and provide a list of the fhem device

Haven't found a workaround for nearly a year now - how to fix this?
@justme-1968 can yo help us?

please try adding default=XX

Where do I add this?

in the homebridgeMapping

So replace XX with an int ?

So I tried both but nothing worked for me here

[9/26/2022, 3:05:03 PM] [Homebridgename] caching: Brightness: 100 (as number; from '99.5') 2022-09-26 15:05:03 caching: lightname-state: 99.5 [9/26/2022, 3:05:03 PM] [Homebridgename] caching: On: true (as boolean; from '99.5') 2022-09-26 15:05:08 caching: lightname-pct: 18 [9/26/2022, 3:05:08 PM] [Homebridgename] caching: Brightness: 18 (as number; from '18') 2022-09-26 15:05:08 caching: lightname-state: 18 [9/26/2022, 3:05:08 PM] [Homebridgename] caching: On: true (as boolean; from '18')

sorry for the late answer...

i know what the problem is, but i have at the moment no idea how to fix it without a mayor rewrite of the event interface. i have to think some more...

Maybe you can skip the first command or wait a short time if a second one occurs?