-
-
Notifications
You must be signed in to change notification settings - Fork 43
Description
Hi dear community,
Context
Today, we (the Hilo team) added the deprecation header on the event details endpoints : /GDService/v1/api/locations/{locationId}/events/{eventId}.
This endpoint is not used anymore inside the Hilo application, but we kept it up and functional for Home Assistant.
That being said, it's not tested so much anymore and it will, at some point, be removed or just stop working properly.
New Approach
You should be able to achieve the same result through websocket/signalR :
https://api.hiloenergie.com/ChallengeHub
Request Message: SubscribeToChallenge with a { eventId: long, locationId: long } payload
Which will trigger these 2 events in response
ChallengeDetailsInitialValuesReceived
{
"required": [
"progress",
"isParticipating",
"isConfigurable",
"id",
"period",
"phases"
],
"type": "object",
"properties": {
"progress": {
"enum": [
"none",
"scheduled",
"inProgress",
"completed"
],
"type": "string",
"default": "none"
},
"isParticipating": {
"type": "boolean"
},
"isConfigurable": {
"type": "boolean"
},
"currentPhase": {
"enum": [
"none",
"preheat",
"reduction",
"recovery"
],
"type": "string",
"default": "none",
"nullable": true
},
"id": {
"type": "integer",
"format": "int64"
},
"period": {
"enum": [
"none",
"am",
"pm"
],
"type": "string",
"default": "none"
},
"phases": {
"$ref": "#/components/schemas/eventPhases"
}
}
},
ChallengeConsumptionUpdatedValuesReceived
{
"required": [
"generatedTimeUTC"
],
"type": "object",
"properties": {
"currentWh": {
"type": "number",
"format": "double",
"nullable": true
},
"baselineWh": {
"type": "number",
"format": "double",
"nullable": true
},
"estimatedReward": {
"type": "number",
"format": "double",
"nullable": true
},
"generatedTimeUTC": {
"minLength": 1,
"type": "string",
"format": "date-time"
},
"cumulativeBaselinePoints": {
"type": "array",
"items": {
"$ref": "#/components/schemas/cumulativeConsumptionPoints"
}
},
"cumulativeConsumptionPoints": {
"type": "array",
"items": {
"$ref": "#/components/schemas/cumulativeConsumptionPoints"
}
}
}
},
"cumulativeConsumptionPoints": {
"required": [
"timeUTC",
"wh"
],
"type": "object",
"properties": {
"timeUTC": {
"minLength": 1,
"type": "string",
"format": "date-time"
},
"wh": {
"type": "number",
"format": "double"
}
}
},
Obviously, these format could change in the future (probably not for this season).
Sorry that I can't be a lot more helpful, especially in this time of the year.