sensor.greenely icon indicating copy to clipboard operation
sensor.greenely copied to clipboard

Facility_ID

Open matzzzz opened this issue 2 years ago • 6 comments

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

matzzzz avatar Aug 17 '22 14:08 matzzzz

I wonder the same thing. Any progress? @matzzzz

carlback avatar Sep 04 '22 19:09 carlback

Samma här. Hur kan jag hitta mitt facility_id? @linsvensson kanske vet?

alexandernajafi avatar Dec 16 '22 14:12 alexandernajafi

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".

alexandernajafi avatar Dec 16 '22 14:12 alexandernajafi

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

linsvensson avatar Dec 16 '22 22:12 linsvensson

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?

doddlastic avatar May 17 '23 12:05 doddlastic

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

Gummiberra avatar Jul 04 '24 05:07 Gummiberra