Closed DeVille70 closed 2 years ago
Ok, I guess you want to change it then, but it seems to be running fine now.
@DeVille70 updated again, please try when you got time thanks
Yes, will do. Very busy at the moment, but hopefully tonight.
Sorry for the long delay, I have been very busy. Installed the new script, and it has been running for a few minutes now. Looks good. :)
Proposal for future versions: The Tibber subscription also offers the variables minPower, averagePower, and maxPower. Not sure I see any use of those for myself at the moment, but perhaps others will.
I also saw that there are a lot more.
Please have a look here and tell me if you need more data. It is fun to add features :)
Do you have solar cell at home? I want to add data for production as well.
Wow, that was a long list, I was not aware of that. Perhaps the ones I mentioned as well as PriceLevel.
Not sure what the negative effects on Domoticz and the RPi of loading too much data every 10-12 seconds would be, though.
No, I have no solar cells.
I will add your proposals. I only collect data once per hour, let’s start with this and see if that is enough. Otherwise I can collect more often for maxPower and other that may change often. Price and PriceLevel will only change every hour Thanks for your input
👍
@DeVille70 I have now updated branch 0.90 with 5 new devices. The 3 that you "asked" for and also accumulated cost and accumulated consumption. If you got time to test I'll be happy :)
It looks good.
The 5 new devices did not update until after close to an hour, but I guess that is as intended.
Great work!
Thank you. Correct, the new devices will update next minute 0, or if you restart Hardware twice. Will fix this in the future.
Great work!
sorry, change HomeID in plugin.py. I will add this ass a text field in the stable version
You can get the HomeID with:
{ viewer { homes { id } } }
So the user does not need to add it manually.
Btw, it is also important to close the websocket connection when Domoticz exits, since you can have max 3 open connections to Tibber.
Regards Daniel (author of the Tibber integration in Home Assistant)
More than one house I have a house and a cabin, both with power from Tibber. Would be nice to be able to input home ID or address in order to select the location of interest. As it is now, it apears that the first house in houses is selected
Sugestion: Allow for home ID as optional input
If no home ID is given:
Find home ID of first house in houses
else:
Find the house in houses with the given home ID
Use the house found
Great work!
sorry, change HomeID in plugin.py. I will add this ass a text field in the stable version
You can get the HomeID with:
{ viewer { homes { id } } }
So the user does not need to add it manually. Btw, it is also important to close the websocket connection when Domoticz exits, since you can have max 3 open connections to Tibber. Regards Daniel (author of the Tibber integration in Home Assistant)
More than one house I have a house and a cabin, both with power from Tibber. Would be nice to be able to input home ID or address in order to select the location of interest. As it is now, it apears that the first house in houses is selected
Sugestion: Allow for home ID as optional input
If no home ID is given: Find home ID of first house in houses else: Find the house in houses with the given home ID Use the house found
I think I can do a solution. Please create a new issue with the request. This issue is solved and long :)
Sorry to bug you again. This plugin has worked excellently since March, but after a crash I partially had to rebuild my system. Installing this plugin does not go so well. No devices are created, and even if I select Tibber API 1.11 it comes up as Tibber API 0.89. Any advise to share, please?
From Domoticz log: 2022-01-05 14:34:58.510 Error: Tibber: (Tibber) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Tibber-Domoticz/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'. 2022-01-05 14:34:58.510 Error: Tibber: (Tibber) Module Import failed, exception: 'ModuleNotFoundError' 2022-01-05 14:34:58.510 Error: Tibber: (Tibber) Module Import failed: ' Name: python_graphql_client' 2022-01-05 14:34:58.510 Error: Tibber: (Tibber) Error Line details not available.
I have had other people also having problem since yesterday. I don't know why, maybe an update for a package? Anyway please update again to 1.12, I just did a change in 1.11 Please tell me how it goes :)
Thanks for quick response. So I replace the plugin.py file, and restart Domoticz. Then plugin version 1.12 is available to install, but after installation it shows up as 0.89 in Hardware list. And no devices are installed.
From Domoticz log: 2022-01-05 15:03:34.102 Error: Tibber 1.12: (Tibber) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Tibber-Domoticz/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'. 2022-01-05 15:03:34.102 Error: Tibber 1.12: (Tibber 1.12) Module Import failed, exception: 'SyntaxError' 2022-01-05 15:03:34.102 Error: Tibber 1.12: (Tibber 1.12) Import detail: File: /home/pi/domoticz/plugins/Tibber-Domoticz/plugin.py, Line: 49, offset: -1 2022-01-05 15:03:34.102 Error: Tibber 1.12: (Tibber 1.12) Error Line '"""
Please restart DZ. Did you copy the text and paste or did you download the file and replaced the file?
Restarted Domoticz, but to no change.
I copied and pasted text into the file, yes. I have limited linux skills, and the Windows tool i use for file browsing had access problems.
OK, because I think some of the text was copied/pasted in wrong way. Please try to copy the text as raw from Github or replace the file(recommended)
Ok, I copied via raw into a new file, and now 8 devices showed up. But they are all about power, and one about signal strength, and the ones I had before with min, max, and current price are no longer there. Has the plugin changed function?
Ok, prices perhaps comes only every midnight. But power updates is much rarer now, every 30 s or so. And still reports API version 0.89 in Hardware.
Ok, I copied via raw into a new file, and now 8 devices showed up. But they are all about power, and one about signal strength, and the ones I had before with min, max, and current price are no longer there. Has the plugin changed function?
Depends how old the other version was. I think I changed ID for the devices around version 0.75. Otherwise it shall give you lots of devices, if you have a Real-time sensor
Ok, prices perhaps comes only every midnight. But power updates is much rarer now, every 30 s or so. And still reports API version 0.89 in Hardware.
Did the prices came up? Yes, I changed so it will update Real-time data every 10 seconds and it will only update ~10 devices then after 10 seconds another 10 devices and so on. Restart DZ to see the correct version under Hardware. In DZ log when you start the plugin it should give 1.12
I have 17 Tibber devices, but none of them are prices. The device Tibber-power only updates every 30 seconds. In hardware still says 0.89. Under Home ID it only says Yes, no actual ID
From Domoticz log: 2022-01-07 07:20:37.795 Error: Tibber: (Tibber) 'onMessage' failed 'TypeError':''NoneType' object is not subscriptable'. 2022-01-07 07:20:37.795 Error: Tibber: (Tibber) ----> Line 500 in '/home/pi/domoticz/plugins/Tibber-Domoticz/plugin.py', function onMessage 2022-01-07 07:20:37.795 Error: Tibber: (Tibber) ----> Line 265 in '/home/pi/domoticz/plugins/Tibber-Domoticz/plugin.py', function onMessage
Strange that it still says 0.89.
Can you try to replace plugin.py again.
Check that you copy the file from Main branch on GitHub
The old plugin folder, with 0.89 is still there, and I am not able to delete it. So it seems that the plugin.py from the old folder is read, even though I select 1.12. In fact, it seems both plugin.py files are read, because in the hardware page pretty much all information is displayed twice.
Why can't you not delete it? try "sudo rm -r [folder name]"
if there is two folder with same plugin-name(inside plugin.py) it can be strange behavior
I had tried sudo rm before but -r seems to to do the trick. Now 1.12 shows up in hardware. But power updates only every 30 secs and no prices. I'll leave it until tomorrow and see then.
Thanks so far.
Restarting Domoticz: 2022-01-11 23:26:19.529 Error: Tibber: (Tibber) 'onMessage' failed 'TypeError':''NoneType' object is not subscriptable'. 2022-01-11 23:26:19.529 Error: Tibber: (Tibber) ----> Line 500 in '/home/pi/domoticz/plugins/Tibber-Domoticz/plugin.py', function onMessage 2022-01-11 23:26:19.529 Error: Tibber: (Tibber) ----> Line 265 in '/home/pi/domoticz/plugins/Tibber-Domoticz/plugin.py', function onMessage
Same situation. Still no prices, power updates every 30 secs, and most of the other devices stopped updating at different times throughout the night.
Fix is in version 1.13 that I just uploaded.
Thanks. There are now more devices, 25 in total, but still no prices. And power updates now around every 50 seconds.
I may have forgotten but do you buy electricity from Tibber? If not you will get any prices. Great that you get more devices now. Yes, every 50 second it updates power. I had to change this because of timeout when asking for data. Version 1.14 the text in DZ log will be correct. Now it still says "... every 10 seconds..."
Yes,, I buy electricity from Tibber.
Every 50 sec is not very often. Is it because downloading all the other data, like current and voltage for each phase, and other things?
I have two other persons that also use 1.13 and they get prices. Can you attach Tibber log file. What parameter/s do you want every 10 seconds? power, minPower, maxPower, powerProduction, powerReactive, powerProductionReactive, minPowerProduction, maxPowerProduction, lastMeterProduction, powerFactor, voltagePhase1, voltagePhase2, voltagePhase3, currentL1, currentL2, currentL3, signalStrength, lastMeterConsumption, accumulatedConsumption, accumulatedProduction, accumulatedConsumptionLastHour, accumulatedProductionLastHour, accumulatedCost, accumulatedReward, averagePower
I have two other persons that also use 1.13 and they get prices. Can you attach Tibber log file. What parameter/s do you want every 10 seconds? power, minPower, maxPower, powerProduction, powerReactive, powerProductionReactive, minPowerProduction, maxPowerProduction, lastMeterProduction, powerFactor, voltagePhase1, voltagePhase2, voltagePhase3, currentL1, currentL2, currentL3, signalStrength, lastMeterConsumption, accumulatedConsumption, accumulatedProduction, accumulatedConsumptionLastHour, accumulatedProductionLastHour, accumulatedCost, accumulatedReward, averagePower
Any chance you could expand to also support subscription, please? subscription{ liveMeasurement(homeId:"c70dcbe5-4485-4821-933d-a8a86452737b"){ timestamp power
maxPower } }