-
Notifications
You must be signed in to change notification settings - Fork 2
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
[FEATURE] Live data from more than one home #26
Comments
Hi, I will look into adding support for multiple homes in one script. For now, you could try splitting each home into separate scripts and see if that works. About the connection issue; I am still trying to figure that one out... There is a similar issue that has been brought up which is probably the same issue you are experiencing. I will be a bit busy the next week but will try to find the problem as soon as I have time! |
Hi, could you try updating to the newest version of tibber (version 0.3.0) and see how it goes? Run:
You will still have to split your two homes into two separate scripts for now, but the connection limit error/bug should be fixed or at least improved in the newest version!
import tibber
import init
account = tibber.Account(init.GetTibberKey())
home = account.homes[0]
@home.event("live_measurement")
def show_accumulated_cost(data):
print(f"0 - {data.power} {data.power_production}")
if __name__ == '__main__':
home.start_live_feed()
import tibber
import init
account = tibber.Account(init.GetTibberKey())
home = account.homes[1]
@home.event("live_measurement")
def show_accumulated_cost(data):
print(f"0 - {data.power} {data.power_production}")
if __name__ == '__main__':
home.start_live_feed() |
The connection limit issue should be fixed now. See issue #23 if the problem persists. Although you should be able to run multiple homes with the above steps, I'll keep this issue open since adding support for multiple homes in a single file still seems like a potentially nice idea! |
Hi
I have 2 home with pulser. I writing a program in python so I can look at the realtime use.
But I only get data from 1 of the homes.
I get:
Connection to websocket failed... Retrying in 10 seconds...
received 4429 (private use) Too many open connections on this server: 2; then sent 4429 (private use) Too many open connections on this server: 2
This is probably me that has tried to mutch.
WHAT IS THE CORRECT WAY TO GET REALTIME DATA FROM MORE THAN 1 HOME?
Here is my code:
import tibber
import init
account = tibber.Account(init.GetTibberKey())
home0 = account.homes[0]
home1 = account.homes[1]
@home0.event("live_measurement")
def show_accumulated_cost(data):
print(f"0 - {data.power} {data.power_production}")
@home1.event("live_measurement")
def show_accumulated_cost1(data):
print(f"1 - {data.power} {data.power_production}")
if name == 'main':
# Start the live feed. This runs forever.
home0.start_live_feed()
home1.start_live_feed()
The text was updated successfully, but these errors were encountered: