sensor.greenely
sensor.greenely copied to clipboard
Facility_ID
Hi I have two houses which Greenely supplies energy, I have had one of the houses getting figures from Greenely without providing facility_id and that worked fine. When I now tried to set up both houses (different zones) and use facility_id to differentiate I get zero output probably because I state the facility_id in wron format but I cant see info regardin that at you github. This is how i tried now (I exchanged the 8 last figures with x in this text for security reason) facility_id: 7359991021xxxxxxxx How should it look like? Thanks for you good work in HA Matz
I wonder the same thing. Any progress? @matzzzz
Samma här. Hur kan jag hitta mitt facility_id? @linsvensson kanske vet?
Ok, I found out how to get it.
In the API python file there is a request to result = requests.get(self._url_facilities_base + 'primary?includes=retail_state&includes=consumption_limits&includes=parameters', headers = self._headers)
that fetches the facitiliy id of the primary facility. If you do a manual request to result = requests.get(self._url_facilities_base, headers = self._headers)
it will return an array with all facilities.
@matzzzz The greenely "facility id" is not the same as "anläggnings id". Maybe "facility id" is a bad name since it can easily be confused with the name "anläggnings id".
For anyone using Postman, here's a collection with some requests.
To get the facility I first sent the login request, used the JTW from that to send the facilities request, scroll down in the response and you have facility_id
I have been having issues since I moved and got a new greenly contract. I also asked Greenly to clear old facilities that I had which were not in use. Since then I am not receiving any data of my consumption and suspect I need to specify facility id.
I have tried getting the ID via Posman but do not seem to be able to get the facility ID, perhaps this is more of a Posman/API issue in which I am not so versed.
I am getting { "title": "Autentisering misslyckades", "description": "Formatet på informationen för autentisering saknas.", "jwt": null } In the response body. I have tried sending the JWT which I am getting when sending login in Authorization in the header both prefixed by Bearer and stand alone just the JWT string.
Any thoughts?
I have been having issues since I moved and got a new greenly contract. I also asked Greenly to clear old facilities that I had which were not in use. Since then I am not receiving any data of my consumption and suspect I need to specify facility id.
I have tried getting the ID via Posman but do not seem to be able to get the facility ID, perhaps this is more of a Posman/API issue in which I am not so versed.
I am getting { "title": "Autentisering misslyckades", "description": "Formatet på informationen för autentisering saknas.", "jwt": null } In the response body. I have tried sending the JWT which I am getting when sending login in Authorization in the header both prefixed by Bearer and stand alone just the JWT string.
Any thoughts?
If you still need help regarding this. The bearer prefix is JWT so header should look like. Authorization: JWT insert_token