FGMS-001 sensor & VeraLite - light sensor readings

Hello,

First of all, as I’m new here - welcome everybody!

Now, the main problem - could you please tell me if it’s possible to get FGMS-001 light sensor readings in luxes instead of percents?
As far as I know this sensor reports in luxes for Fibaro HC2, so why only percentage is visible in VeraLite with UI7 on board?

Thanks for your help!

Regards,
Michael

OK, so maybe someone can tell me if it’s possible to have readings of any light sensor provided in luxes instead of in percents on UI7?

@mszewcz,

Welcome!

Is UI7 just showing the wrong unit, or is there something wrong with the value also?

CurrentLevel is also in percents. Part of logs:

10 09/10/14 9:01:21.841 Parsing device 11: template urn:schemas-micasaverde-com:device:LightSensor:1 controlled via 9 room 4 IPaddress mac disabled 0 <0x2afaf000> 10 09/10/14 9:01:21.938 Device_LuaUPnP::LoadDeviceDoc 11 file D_LightSensor1.xml size 922 result 0 <0x2afaf000> 10 09/10/14 9:01:21.939 Device_LuaUPnP::LoadDeviceDoc 11 file /etc/cmh-lu//D_LightSensor1.xml finished <0x2afaf000> 10 09/10/14 9:01:22.173 Device_Variable::m_szValue_set device: 9 service: urn:micasaverde-com:serviceId:LightSensor1 variable: CurrentLevel startup: 10 v:0xefba38/NONE <0x2afaf000> 10 09/10/14 9:01:22.182 Device_Variable::m_szValue_set device: 11 service: urn:micasaverde-com:serviceId:LightSensor1 variable: CurrentLevel startup: 10 v:0xefba38/NONE <0x2afaf000>

Also D_LightSensor1.json was prepared to show only percentage values (see label below):

"Control": [ { "ControlGroup":"1", "ControlType": "variable", "top": "1", "left": "0", "Display": { "Service": "urn:micasaverde-com:serviceId:LightSensor1", "Variable": "CurrentLevel", "Top": 60, "Left": 145, "Width": 75, "Height": 20 } }, { "ControlGroup":"1", "ControlType": "label", "top": "0", "left": "0", "Label": { "lang_tag": "ui7_percent_sign", "text": "&#37;" }, "Display": { "Top": 60, "Left": 160, "Width": 75, "Height": 20 } }

But, according to the producer, this sensor provides value in luxes (range: 0-32000).
Seems to be a bug in UI7. Just like the “path” for this sensor was kind like this:

  • read sensor value
  • store it somewhere (sensor doesn’t have any other visible variable that could hold its value in luxes)
  • find the highest value from past readings store
  • calculate percentage of highest value found
  • set CurrentLevel variable of sensor

I have already mailed support, but they haven’t provide any sensible answer… Just that as far as they know the sensor values should be displayed in luxes, and so it should go up to 1000.

Why only 1000 - I don’t know? As per S_LightSensor1.xml it’s i4 dataType (I assume it’s 4-byte signed integer), so it should accept a way bigger values…

<?xml version="1.0"?> <scpd xmlns="urn:schemas-upnp-org:service-1-0"> <specVersion> <major>1</major> <minor>0</minor> </specVersion> <serviceStateTable> <stateVariable> <name>CurrentLevel</name> <sendEventsAttribute>yes</sendEventsAttribute> <dataType>i4</dataType> <shortCode>light</shortCode> </stateVariable> </serviceStateTable> </scpd>

Any thoughts?

Strange thing, but after few exclusions and inclusions it started to work fine. Now readings are in luxes for sure (tried on a sunny balcony and it showed over 24k luxes). After that I corrected json file to change ‘%’ sign to ‘lux’ and it looks nice.

The only problem remained is that UI does not show 0 lux value (showing only ‘lux’).
Also when at 0 lux sensor does not seem to send change reports (variable #40 set to 1 - so it should send reports after lighting change of 1 lux).
When above 0 lux it seems to work properly.

Has anyone similiar problems with other sensors?