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

Working example for Realtime data #228

Closed
flopp999 opened this issue Nov 30, 2022 · 6 comments
Closed

Working example for Realtime data #228

flopp999 opened this issue Nov 30, 2022 · 6 comments

Comments

@flopp999
Copy link

Anyone have a complete example.py to get realtime data from "wss://websocket-api.tibber.com/v1-beta/gql/subscriptions"?

@flopp999
Copy link
Author

flopp999 commented Dec 1, 2022

That link is for HA.
I want an example for a single py file

@Danielhiversen
Copy link
Owner

That should work as an example.
You also have https://github.com/Danielhiversen/pyTibber#example-realtime-data

@flopp999
Copy link
Author

flopp999 commented Dec 1, 2022

That example gives me error for useragent even if I change text to the example that Tibber has on their page, "Homey/10.0.0 com.Tibber/1.8.3"
I also tried with other useragent but same error.
I can see in your code that user_agent is set to None, is that wrong?

@Danielhiversen
Copy link
Owner

Danielhiversen commented Dec 1, 2022

Ahh, there is a bug introduced in #212

@alexbergsland
Copy link

That example gives me error for useragent even if I change text to the example that Tibber has on their page, "Homey/10.0.0 com.Tibber/1.8.3" I also tried with other useragent but same error. I can see in your code that user_agent is set to None, is that wrong?

Did you get it running?
I get no output from the "Example realtime data".

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

3 participants