Thank you again, sorry for the confusion with the missing data-segment, but I tried basically everything without getting it to work, so ignore the last post.
So now it work, but I found another problem. Don't know if it is due to Domoticz or dzVents, but there seems to be some kind of rounding somewhere as the level decreases by 6-7 % until it gets fixed at an even decade.
The lamp is a IKEA Trådfri E27 WS opal 980lm with SW 1.2.217 running via Philips Hue Bridge
This is ok if I am at 86% and land at 80%, but I had a case where I started at 13% and the next step was then 0%.
Starting at 86%
Code: Select all
2018-01-09 15:06:14.100 EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2018-01-09 15:06:33.470 dzVents: Info: Handling events for: "Sovrum Rörelse", value: "On"
2018-01-09 15:06:33.470 dzVents: Info: ------ Start internal script: Altan: Device: "Sovrum Rörelse (RfxTrx)", Index: 290
2018-01-09 15:06:33.474 dzVents: Info: Level On = 100
2018-01-09 15:06:33.475 dzVents: Info: ------ Finished Altan
2018-01-09 15:06:33.477 EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2018-01-09 15:06:41.389 dzVents: Info: Handling events for: "Sovrum Rörelse", value: "Off"
2018-01-09 15:06:41.389 dzVents: Info: ------ Start internal script: Altan: Device: "Sovrum Rörelse (RfxTrx)", Index: 290
2018-01-09 15:06:41.391 dzVents: Info: Level Off = 100
2018-01-09 15:06:41.391 dzVents: Info: ------ Finished Altan
2018-01-09 15:06:41.392 EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2018-01-09 15:06:41.761 dzVents: Info: Handling events for: "Trapphus Innerdörr", value: "Open"
2018-01-09 15:06:41.761 dzVents: Info: ------ Start internal script: Test: Device: "Trapphus Innerdörr (Zwave)", Index: 318
2018-01-09 15:06:41.762 dzVents: Info: Level at ON = 86
2018-01-09 15:06:41.763 dzVents: Info: ------ Finished Test
2018-01-09 15:06:41.764 EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2018-01-09 15:06:44.587 dzVents: Info: Handling events for: "Trapphus Innerdörr", value: "Closed"
2018-01-09 15:06:44.587 dzVents: Info: ------ Start internal script: Test: Device: "Trapphus Innerdörr (Zwave)", Index: 318
2018-01-09 15:06:44.588 dzVents: Info: Level at OFF = 86
2018-01-09 15:06:44.589 dzVents: Info: ------ Finished Test
2018-01-09 15:06:44.590 EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2018-01-09 15:06:46.312 dzVents: Info: Handling events for: "Trapphus Innerdörr", value: "Open"
2018-01-09 15:06:46.312 dzVents: Info: ------ Start internal script: Test: Device: "Trapphus Innerdörr (Zwave)", Index: 318
2018-01-09 15:06:46.314 dzVents: Info: Level at ON = 80
2018-01-09 15:06:46.315 dzVents: Info: ------ Finished Test
2018-01-09 15:06:46.316 EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2018-01-09 15:06:48.549 dzVents: Info: Handling events for: "Trapphus Innerdörr", value: "Closed"
2018-01-09 15:06:48.549 dzVents: Info: ------ Start internal script: Test: Device: "Trapphus Innerdörr (Zwave)", Index: 318
2018-01-09 15:06:48.550 dzVents: Info: Level at OFF = 80
2018-01-09 15:06:48.551 dzVents: Info: ------ Finished Test
Starting at 13%. The first time I close the door, the lamp is still lit, but the second time it is dark and in domoticz I can see that it is not active, i.e. not 6%
Code: Select all
2018-01-09 15:16:18.398 dzVents: Info: Handling events for: "Trapphus Innerdörr", value: "Open"
2018-01-09 15:16:18.398 dzVents: Info: ------ Start internal script: Test: Device: "Trapphus Innerdörr (Zwave)", Index: 318
2018-01-09 15:16:18.400 dzVents: Info: Level at ON = 13
2018-01-09 15:16:18.400 dzVents: Info: ------ Finished Test
2018-01-09 15:16:18.402 EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2018-01-09 15:16:21.464 dzVents: Info: Handling events for: "Trapphus Innerdörr", value: "Closed"
2018-01-09 15:16:21.464 dzVents: Info: ------ Start internal script: Test: Device: "Trapphus Innerdörr (Zwave)", Index: 318
2018-01-09 15:16:21.466 dzVents: Info: Level at OFF = 13
2018-01-09 15:16:21.467 dzVents: Info: ------ Finished Test
2018-01-09 15:16:21.469 EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2018-01-09 15:16:24.387 dzVents: Info: Handling events for: "Trapphus Innerdörr", value: "Open"
2018-01-09 15:16:24.387 dzVents: Info: ------ Start internal script: Test: Device: "Trapphus Innerdörr (Zwave)", Index: 318
2018-01-09 15:16:24.388 dzVents: Info: Level at ON = 6
2018-01-09 15:16:24.388 dzVents: Info: ------ Finished Test
2018-01-09 15:16:24.389 EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2018-01-09 15:16:27.312 dzVents: Info: Handling events for: "Trapphus Innerdörr", value: "Closed"
2018-01-09 15:16:27.312 dzVents: Info: ------ Start internal script: Test: Device: "Trapphus Innerdörr (Zwave)", Index: 318
2018-01-09 15:16:27.314 dzVents: Info: Level at OFF = 6
2018-01-09 15:16:27.317 dzVents: Info: ------ Finished Test