Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facility_ID #30

Open
matzzzz opened this issue Aug 17, 2022 · 6 comments
Open

Facility_ID #30

matzzzz opened this issue Aug 17, 2022 · 6 comments

Comments

@matzzzz
Copy link

matzzzz commented Aug 17, 2022

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

@carlback
Copy link

carlback commented Sep 4, 2022

I wonder the same thing. Any progress? @matzzzz

@alexandernajafi
Copy link

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

@alexandernajafi
Copy link

alexandernajafi commented Dec 16, 2022

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

@linsvensson
Copy link
Owner

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

@doddlastic
Copy link

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?

@simonlarsson92
Copy link
Contributor

simonlarsson92 commented Jul 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants