PatchworkBoy / homebridge-edomoticz

Domoticz Homebridge-Plugin
Other
118 stars 44 forks source link

Lux value #138

Closed marcotini closed 6 years ago

marcotini commented 6 years ago

Why in Home's app it show me 1910 instead 1906?

{
   "ActTime" : 1518372568,
   "AstrTwilightEnd" : "19:30",
   "AstrTwilightStart" : "05:57",
   "CivTwilightEnd" : "18:21",
   "CivTwilightStart" : "07:05",
   "DayLength" : "10:15",
   "NautTwilightEnd" : "18:56",
   "NautTwilightStart" : "06:31",
   "ServerTime" : "2018-02-11 19:09:28",
   "SunAtSouth" : "12:05",
   "Sunrise" : "07:35",
   "Sunset" : "17:51",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "1906 Lux",
         "Description" : "",
         "Favorite" : 0,
         "HardwareID" : 20,
         "HardwareName" : "Dummy",
         "HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
         "HardwareTypeVal" : 15,
         "HaveTimeout" : false,
         "ID" : "82311",
         "LastUpdate" : "2018-02-11 19:06:35",
         "Name" : "Apertura",
         "Notifications" : "false",
         "PlanID" : "2",
         "PlanIDs" : [ 2 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "Lux",
         "Timers" : "false",
         "Type" : "Lux",
         "TypeImg" : "lux",
         "Unit" : 1,
         "Used" : 1,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "311"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
PatchworkBoy commented 6 years ago

No idea... homebridge-eDomoticz just strips the ' lux' off the end of the Data field and uses the value that's left. Whether homekit protocols then rounds to nearest 10 I've no idea.

If MQTT is enabled it'll be using whatever nvalue is transmitted by that rather than what the JSON API shows.

Either way, it only displays what it's told by Domoticz - no processing of the figure takes place within this plugin.