Energy Management
Energy management system Apps are usually implemented in the same way as Access Control Apps: there is some initial configuration, after which all booked accommodations are managed by listening to Reservation webhook events.
Supplying measurements
As it is possible in Booking Experts to store accommodation measurements, an Energy Management App is also able to send measurements back to Booking Experts. This can be realized by creating a special command that willl only be called by Booking Experts when an App is defined as an Energy system.
The command itself must conform to the following specifications:
- Its identifier must be
measurements
- Its context model must be
rentable_identity
When your endpoint is called, you will receive the metadata of the RentableIdentity and the desired start_date
and end_date
of the measurements that are requested by the user:
{
"command": "measurements",
"back_url": null,
"locale": "en",
"subscription_id": "1",
"record": {
"data": {
"id": "1",
"type": "rentable_identity",
"attributes": {
"name": "1"
}
}
},
"start_date": "2017-05-23",
"end_date": "2017-05-24"
}
- The response of the command must be a list of resources that conforms to the Measurement resource.
- utility must be 'gas', 'electricity' or 'water'
- rate - must be 'low', 'high' or blank when no distinction can be made.
An example response that should be generated by the app is shown below:
{
"data": [
{
"type": "measurement",
"attributes": {
"timestamp": "2017-05-23T11:54+02:00",
"utility": "electricity",
"rate": null,
"value": 49.9
}
},
{
"type": "measurement",
"attributes": {
"timestamp": "2017-05-23T11:54+02:00",
"utility": "gas",
"rate": null,
"value": 40.584
}
},
{
"type": "measurement",
"attributes": {
"timestamp": "2017-05-24T11:54+02:00",
"utility": "electricity",
"rate": "low",
"value": 52.9
}
},
{
"type": "measurement",
"attributes": {
"timestamp": "2017-05-24T11:54+02:00",
"utility": "gas",
"rate": "high",
"value": 45.223
}
}
]
}
Updated 2 months ago