Comments (7)
Device:
{
href: '/device/37',
Name: 'Sensor de movimiento',
FullyQualifiedName: [ 'Garaje', 'Sensor de movimiento' ],
Parent: { href: '/project' },
SerialNumber: 52654332,
ModelNumber: 'PD-OSENS-XX',
DeviceType: 'RPSOccupancySensor',
AssociatedArea: { href: '/area/12' },
OccupancySensors: [ { href: '/occupancysensor/1' } ],
LinkNodes: [ { href: '/device/37/linknode/29' } ],
DeviceRules: [ { href: '/devicerule/122' } ],
AddressedState: 'Addressed'
}
from homebridge-lutron-caseta-leap.
{
"CommuniqueType": "ReadResponse",
"Header": {
"MessageBodyType": "OneDeviceDefinition",
"StatusCode": "200 OK",
"Url": "/device/37"
},
"Body": {
"Device": {
"href": "/device/37",
"Name": "Sensor de movimiento",
"FullyQualifiedName": [
"Garaje",
"Sensor de movimiento"
],
"Parent": {
"href": "/project"
},
"SerialNumber": 52654332,
"ModelNumber": "PD-OSENS-XX",
"DeviceType": "RPSOccupancySensor",
"AssociatedArea": {
"href": "/area/12"
},
"OccupancySensors": [
{
"href": "/occupancysensor/1"
}
],
"LinkNodes": [
{
"href": "/device/37/linknode/29"
}
],
"DeviceRules": [
{
"href": "/devicerule/122"
}
],
"AddressedState": "Addressed"
}
}
}
from homebridge-lutron-caseta-leap.
After subscribe, response is
{
"CommuniqueType": "SubscribeResponse",
"Header": {
"MessageBodyType": "MultipleOccupancyGroupStatus",
"StatusCode": "200 OK",
"Url": "/occupancygroup/status"
},
"Body": {
"OccupancyGroupStatuses": [
{
"href": "/occupancygroup/1/status",
"OccupancyGroup": {
"href": "/occupancygroup/1"
},
"OccupancyStatus": "Unknown"
},
{
"href": "/occupancygroup/2/status",
"OccupancyGroup": {
"href": "/occupancygroup/2"
},
"OccupancyStatus": "Unknown"
},
{
"href": "/occupancygroup/3/status",
"OccupancyGroup": {
"href": "/occupancygroup/3"
},
"OccupancyStatus": "Unknown"
},
{
"href": "/occupancygroup/4/status",
"OccupancyGroup": {
"href": "/occupancygroup/4"
},
"OccupancyStatus": "Unknown"
},
{
"href": "/occupancygroup/5/status",
"OccupancyGroup": {
"href": "/occupancygroup/5"
},
"OccupancyStatus": "Unknown"
},
{
"href": "/occupancygroup/6/status",
"OccupancyGroup": {
"href": "/occupancygroup/6"
},
"OccupancyStatus": "Unknown"
},
{
"href": "/occupancygroup/7/status",
"OccupancyGroup": {
"href": "/occupancygroup/7"
},
"OccupancyStatus": "Unknown"
},
{
"href": "/occupancygroup/8/status",
"OccupancyGroup": {
"href": "/occupancygroup/8"
},
"OccupancyStatus": "Unknown"
},
{
"href": "/occupancygroup/9/status",
"OccupancyGroup": {
"href": "/occupancygroup/9"
},
"OccupancyStatus": "Unknown"
},
{
"href": "/occupancygroup/10/status",
"OccupancyGroup": {
"href": "/occupancygroup/10"
},
"OccupancyStatus": "Unknown"
},
{
"href": "/occupancygroup/11/status",
"OccupancyGroup": {
"href": "/occupancygroup/11"
},
"OccupancyStatus": "Unoccupied"
}
]
}
}
Status change message looks like
{
"CommuniqueType": "ReadResponse",
"Header": {
"MessageBodyType": "MultipleOccupancyGroupStatus",
"StatusCode": "200 OK",
"Url": "/occupancygroup/status",
"ClientTag": "8b73ef78-8af0-41d8-96f6-16eb18cf43a4"
},
"Body": {
"OccupancyGroupStatuses": [
{
"href": "/occupancygroup/11/status",
"OccupancyGroup": {
"href": "/occupancygroup/11"
},
"OccupancyStatus": "Occupied"
}
]
}
}
n.b. that the most recent subscription wins, and subsequent subscriptions silently drop the earlier one. also, trying to subscribe to /occupancygroup/X/status
fails (even though that's a valid href. wtf lutron?)
from homebridge-lutron-caseta-leap.
Getting a single occupancygroup returns
{
"CommuniqueType": "ReadResponse",
"Header": {
"MessageBodyType": "OneOccupancyGroupDefinition",
"StatusCode": "200 OK",
"Url": "/occupancygroup/11"
},
"Body": {
"OccupancyGroup": {
"href": "/occupancygroup/11",
"AssociatedSensors": [
{
"OccupancySensor": {
"href": "/occupancysensor/1"
}
}
],
"AssociatedAreas": [
{
"Area": {
"href": "/area/12"
}
}
],
"ProgrammingType": "Freeform",
"ProgrammingModel": {
"href": "/programmingmodel/169"
},
"OccupiedActionSchedule": {
"ScheduleType": "None"
},
"UnoccupiedActionSchedule": {
"ScheduleType": "None"
}
}
}
}
from homebridge-lutron-caseta-leap.
Area response is
{
"CommuniqueType": "ReadResponse",
"Header": {
"MessageBodyType": "OneAreaDefinition",
"StatusCode": "200 OK",
"Url": "/area/12"
},
"Body": {
"Area": {
"href": "/area/12",
"Name": "Garaje",
"Parent": {
"href": "/area/1"
},
"Category": {
"Type": "Garage"
},
"AssociatedDevices": [
{
"href": "/device/36"
},
{
"href": "/device/37"
}
],
"AssociatedOccupancyGroups": [
{
"href": "/occupancygroup/11"
}
],
"LoadShedding": {
"href": "/area/12/loadshedding"
},
"OccupancySettings": {
"href": "/area/12/occupancysettings"
},
"OccupancySensorSettings": {
"href": "/area/12/occupancysensorsettings"
},
"DaylightingGainSettings": {
"href": "/area/12/daylightinggainsettings"
}
}
}
}
from homebridge-lutron-caseta-leap.
The relationship between an occupancy sensor and a group (and an area) is still unknown to me, but it looks like the flow will go
Devices[Device].AssociatedArea -> Area.AssociatedOccupancyGroups <- OccupancyGroupStatuses.OccupancyGroup
I'm still not sure wtf it means for an occupancy group to potentially have multiple differing occupancy status values from different sensors 🤷
Because I apparently can't query for an individual occupancygroup's status, I will have to use the omnibus endpoint to set the initial values for the occupancygroup. Which, by the way, isn't returned with the tag, so waiting for the subscribe response with a direct callback doesn't work. 🤯 So anyway, I'll need to:
- get all devices
- if there's a sensor, get its area, and then save its occupancygroup
- subscribe to occupancygroup updates, and ignore that you don't get a response (I mean, you do, it just doesn't have a tag, so you can't know it's yours... anyway...)
- request occupancygroup status update and update all sensors w/ the reported values
from homebridge-lutron-caseta-leap.
Baked in v2.3.0-beta9 pending GA release.
from homebridge-lutron-caseta-leap.
Related Issues (20)
- Connects to RadioRA3 but fails to run HOT 1
- Question: Support for 4 button -P01 Pico? HOT 6
- Homebridge stops working when LEAP plugin enabled HOT 5
- Devices not showing up in HomeKit HOT 4
- Just a question before a purchase... or maybe more. HOT 4
- Accessories not appearing in Homekit HOT 1
- Pico Paddle PJ2-P2B incorrectly appears as PJ2-1P-GXX HOT 1
- Pico not adding to home app HOT 2
- Lutron 4 Button LS21 HOT 3
- Hide long/double press action in Home app when disabled in this plugin
- Infinite spinning gear HOT 5
- Pico Remotes not showing in homekit HOT 2
- support for aquaria shade driver e1
- Can't control picos from Homebridge
- Cannot discover Smart Hub 2 HOT 1
- infinite Spinning in Config! HOT 2
- Pico to trigger brightness? HOT 1
- UI NOT WORKING HOT 1
- Leap has been broke. For me for weeks now since Homebridge update
- Can't seem to get the plugin to detect my lutron hub
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-lutron-caseta-leap.