Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call getState to know manual changes/sensor values #6

Open
Genosse274 opened this issue Oct 7, 2018 · 5 comments
Open

call getState to know manual changes/sensor values #6

Genosse274 opened this issue Oct 7, 2018 · 5 comments

Comments

@Genosse274
Copy link

Genosse274 commented Oct 7, 2018

It would be nice to read the current state(position), for example after manual control. I also have an sun sensor, which should be readable with the same functionality. Here is all the data from the sensor. Under states - core:LuminanceState is the interesting value.

{"creationTime":xxxxxxxxxx,
"lastUpdateTime":xxxxxxxxxxx,
"label":"Sonnensensor",
"deviceURL":"io://xxxxxxxxxxx",
"shortcut":false,
"controllableName":"io:LightIOSystemSensor",
"definition":{
"commands":[],
"states":[{"type":"ContinuousState","qualifiedName":"core:LuminanceState"},{"type":"ContinuousState","qualifiedName":"core:RSSILevelState"},
{"values":["dead","lowBattery","maintenanceRequired","noDefect"],"type":"DiscreteState","qualifiedName":"core:SensorDefectState"},
{"values":["available","unavailable"],"type":"DiscreteState","qualifiedName":"core:StatusState"}],
"dataProperties":[{"value":{"activationDelayMap":{"middle":0,"lower":1200,"upper":300},"referenceStates":["middle","lower","upper"],
"qualifiedName":"io:SunSensorHysteresisBehavior"},"qualifiedName":"core:timeBasedHysteresisBehavior"}],
"widgetName":"LuminanceSensor","uiClass":"LightSensor","qualifiedName":"io:LightIOSystemSensor","type":"SENSOR"},

"states":[
{"name":"core:StatusState","type":3,"value":"available"},
{"name":"core:RSSILevelState","type":2,"value":92.0},
{"name":"core:LuminanceState","type":2,"value": 32956.0}
],
"attributes":[
{"name":"core:MeasuredValueType","type":3,"value":"core:LuminanceInLux"},
{"name":"core:MaxSensedValue","type":1,"value":100000},
{"name":"core:MinSensedValue","type":1,"value":50},
{"name":"core:PowerSourceType","type":3,"value":"battery"}
],
"available":true,
"enabled":true,
"placeOID":"xxxxxxx",
"widget":"LuminanceSensor",
"type":2,"oid":"xxxxxxxxx",
"uiClass":"LightSensor"
},

@taucher4000
Copy link

I would also be very interested in getting the current position of the shutter.

@nikkow
Copy link
Owner

nikkow commented Oct 21, 2018

I have added both requests to the development version:

  • A new node that reads the current position and returns the value to the outputed msg.payload.
  • This new node will also read the value of core:LuminanceState and returns the value in a new luminance property.

However, please node that the luminance thing was not tested on a real device (I currently don't have any sun sensor). Any feedback on that feature would be more than welcome :)

I will merge those items and publish a new release very soon.

Thanks!
N.

@taucher4000
Copy link

fantastic, thank you very much!

@frankis78
Copy link

frankis78 commented Nov 29, 2018

Is it possible to also get the status of the window sensor?
I can get the label of the vindow sensor, when i do a getDeviceState , but it doesent publish open or closed
{"value":"open","when":1543523953200},{"value":"closed","when":1543523957574}],
"historizationMethod":3,"stateName":"core:ContactState",
"deviceUnit":"core:AbsoluteValue"}

@hmwelsch
Copy link

Luminance reading seems to be left out from official API altogether. Even when this was still working, no luminance device can be found in the device list. I can't test anything right now any more because of issue #23. Is anyone in contact with Somfy about luminance device?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants