The last items on my current TODO list are now complete. In this update, open window detection and room/hotwater scheduling have been added.
The schedule channel has been given the id masterSchedule
as it refers to the raw JSON schedule on a per room/hot water basis. If the JSON for the room schedule looks like this when queried:
{
"id": 1,
"Monday": {
"SetPoints": [
{
"Time": 600,
"DegreesC": 200
},
{
"Time": 830,
"DegreesC": 160
},
{
"Time": 1230,
"DegreesC": 200
},
{
"Time": 2200,
"DegreesC": 170
}
]
},
...SNIP...
"Type": "Heating",
"CurrentSetpoint": 160,
"NextEventTime": 750,
"NextEventSetpoint": 200
}
This is what should be sent as an update to that channel:
{
"Monday": {
"SetPoints": [
{
"Time": 600,
"DegreesC": 200
},
{
"Time": 830,
"DegreesC": 160
},
{
"Time": 1230,
"DegreesC": 200
},
{
"Time": 2200,
"DegreesC": 170
}
]
},
...SNIP...
}
It appears that the API does support PATCHing individual schedule items, i.e. http://HEATHUB_URL/data/domain/Schedule/1/Monday/SetPoints/0/Time
so theoretically it would be possible to configure the entire heating schedule from openhab, and creating a sitemap for this would be trivial, however that would require a lot more channels for each room (8 times, 8 setpoints per day = 112 channels), unless anyone knows of a better way.