-
Notifications
You must be signed in to change notification settings - Fork 8
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
How to use Entity States as API-Key / Curling RT Data sucessfully, but Error when using the Integration #51
Comments
First, 0.4.4 has issues with the key's, try 0.4.4.4 (dev release) |
Any chance your realtime is covered with this one? https://gtfs.de/de/realtime/ |
Just noticed that you can just add the word 'Bearer' as well into the field for the API key....maybe that could help too? |
First: Wow, you are Lightning Fast! 🚀
Done.
I tried it in the Integration with X-API or API Key, with and without Prefix (no Quotes, just plain API Key, either with or without leading "Bearer "). Unfortunatly always same outcome:
I'm not sure how to interpret the Debuglog, in Case this might be helpful please see Attachment debuglog.txt
That might be a doable Solution! 👍 But lets put that aside, i will check this after i got it to work using manually updated API Keys.
Unfortunatly not 😢 |
From tyhe logs I cannot see an error so it seems (?) to work. Can you try and use the service call and tick it to also receive readable output ? Then at least you can see if the key/logic works. |
Can you send me the link to the rt source ? |
Sure! If i try it with Prefix Bearer:
I get
Sure! Ill send you in a couple of minutes everything needed, or at least what i do have 😄 |
As i couldnt find any Adress for you, i think i found you HAs' Forum - Check your PNs there! 😎 |
Issue closed with 0.4.4.7 |
This would be the service call based on your sensor colelcting the token...add it to automation or so
And from the gtfs2 integration to refer to the local file instead of the external sandbox |
In Case somebody wants to get started with RNVs (Mannheim, Ludwigshafen, Heidelberg) Realtime Data: They will send you an Email containing Information like this:
Now, in order to create an API Key, you can set up a Sensor like this:
This will get you an API Key valid for an Hour. The Key will be in the Attributes, the State of the Entity contains the Timestamp til when it is valid.
You can easily put this API Refreshment in one big Automation - check if the API-Key is still valid - if not refresh it, and then continue with calling |
Describe the bug
I am facing two Problems integrating my Local Transportations' Provider Realtime-Data:
How can i make the Integration use this Sensors' Value as API Key?
when using 'curl' to query the Realtime-Data, I sucessfully get a JSON Response, which looks valid to me (see below).
Release used
gtfs2: 0.4.4
HA: HAOS
Core: 2024.4.3
Additional
Path for static Zip-File: https://rnv-dds-prod-gtfs.azurewebsites.net/latest/gtfs.zip
Provided Realtime Query Information Sample from the Data Provider:
Querying the RT-Data with (Sample Key Expired):
Results in (Example stripped):
Debug Log when Configuring the Integration with Option API-Key / Header:
The text was updated successfully, but these errors were encountered: