Issue reading dimmer level

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
Ric68
Posts: 15
Joined: Wednesday 28 January 2015 17:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Issue reading dimmer level

Post by Ric68 »

Hi,

I have problems reading the dimmer level using dzVents. It seems that domoticz is working as intended, but not dzVents. It works sometimes, but after some changes, either from the domoticz control panel or directly in the Philips Hue app, the level becomes incorrect when reading it in dzVents.

I have changed the level to 40% but dzVents reports 20%.

Code: Select all

Pct_Level = domoticz.devices('Hall Taklampa').level
        domoticz.log('PCT_LEVEL = ' .. tostring(Pct_Level), domoticz.LOG_INFO)

Code: Select all

2018-01-23 21:24:00.443 dzVents: Info: PCT_LEVEL = 20
The JSON output shows correct value

Code: Select all

{
   "ActTime" : 1516739109,
   "AstrTwilightEnd" : "18:08",
   "AstrTwilightStart" : "05:46",
   "CivTwilightEnd" : "16:27",
   "CivTwilightStart" : "07:27",
   "DayLength" : "07:22",
   "NautTwilightEnd" : "17:19",
   "NautTwilightStart" : "06:35",
   "ServerTime" : "2018-01-23 21:25:09",
   "SunAtSouth" : "11:05",
   "Sunrise" : "08:16",
   "Sunset" : "15:38",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "Set Level: 40 %",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 3,
         "HardwareName" : "PhilipsHue",
         "HardwareType" : "Philips Hue Bridge",
         "HardwareTypeVal" : 38,
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0000008",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2018-01-23 21:11:19",
         "Level" : 39,
         "LevelInt" : 6,
         "MaxDimLevel" : 15,
         "Name" : "Hall Taklampa",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "Set Level: 40 %",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "Dimmer",
         "SwitchTypeVal" : 7,
         "Timers" : "false",
         "Type" : "Lighting 2",
         "TypeImg" : "dimmer",
         "Unit" : 1,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "8"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: Issue reading dimmer level

Post by dannybloe »

Can you try this with the latest beta (using dzVents 2.4.1)?
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Ric68
Posts: 15
Joined: Wednesday 28 January 2015 17:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Issue reading dimmer level

Post by Ric68 »

dannybloe wrote: Friday 26 January 2018 7:42 Can you try this with the latest beta (using dzVents 2.4.1)?
It seems to work now.

Thank you very much, much appreciated, not only this fix but of course the creation of dzVents which makes life easier (even though I had a learning threshold to overcome in the beginning) !
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest