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

[V3] Support motion sensor "inactive since" #226

Closed
nougad opened this issue Jul 6, 2019 · 2 comments
Closed

[V3] Support motion sensor "inactive since" #226

nougad opened this issue Jul 6, 2019 · 2 comments

Comments

@nougad
Copy link

nougad commented Jul 6, 2019

Hey,

Alexa added new(?) support for motion detector including a "inactive since" property:

Looks like there is a timeOfSample property: https://developer.amazon.com/docs/device-apis/alexa-motionsensor.html

I tried the following configuration with my hue motion detector:

Group KitchenMotion "Motion" <motion> (Kitchen,gMotion) {alexa="ENDPOINT.MOTION_SENSOR"}
Switch KitchenMotionSensor_Presence
    (KitchenMotion)
    {channel="hue:0xx7:$ID:kitchen-motion-sensor:presence", alexa="MotionSensor.detectionState"}
DateTime KitchenMotionSensor_LastUpdated
    (KitchenMotion)
    {channel="hue:0xx7:$ID:kitchen-motion-sensor:last_updated"}
Number KitchenMotionSensor_BatteryLevel
    (KitchenMotion)
    {channel="hue:0xx7:$ID:kitchen-motion-sensor:battery_level"}
Switch KitchenMotionSensor_BatteryLow
    (KitchenMotion)
    {channel="hue:0xx7:$ID:kitchen-motion-sensor:battery_low"}

But I guess there is some annotation for last updated missing.

@jsetton
Copy link
Collaborator

jsetton commented Jul 8, 2019

I think these extra annotations are tied in with the proactive reporting via ChangeReport event. Sending these events to Amazon would allow Alexa to keep track of historical events and therefore provide the information you mentioned above.

Unfortunately, the current skill doesn't support that type of reporting. You can follow #73 for the work related to this. Until that, only the real time item state is polled. This is why all property responses have a timeOfSample set to the time of the request. Additional, this is the reason why contact and motion sensors can't be use in Alexa routines at the moment with the skill.

@jsetton
Copy link
Collaborator

jsetton commented Aug 2, 2019

Closing this issue in place of #73 enhancement.

@jsetton jsetton closed this as completed Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants