-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[tibber] Missing channel for accumulatedReward (from Live API) #12273
Comments
@skenhall just looked at the binding and the API, this doesn't look very difficult te get into the binding. Alle the message parsing is allready in place and it looks like it is 4- lines of code or so. But, as i'm not able to use tibber myself, i need you to test my changes. Are you able to spend some time to test? |
Yes, for sure!
Best regards,
Per
…________________________________
Från: lsiepel ***@***.***>
Skickat: Tuesday, January 10, 2023 8:18:27 PM
Till: openhab/openhab-addons ***@***.***>
Kopia: Per Skenhall ***@***.***>; Mention ***@***.***>
Ämne: Re: [openhab/openhab-addons] [tibber] Missing channel for accumulatedReward (from Live API) (Issue #12273)
@skenhall<https://github.com/skenhall> just looked at the binding and the API, this doesn't look very difficult te get into the binding. Alle the message parsing is allready in place and it looks like it is 4- lines of code or so. But, as i'm not able to use tibber myself, i need you to test my changes. Are you able to spend some time to test?
—
Reply to this email directly, view it on GitHub<#12273 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADUZMPP4RRAYRGIMFL6CHALWRWYYHANCNFSM5OHFJOZQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
There you go: https://1drv.ms/u/s!AnMcxmvEeupwjqJi0lZi9bodhlkFmw?e=dpcKLL You should then be able to bind an item to the channel: accumulatedReward it is of type reward:
If you confirm the value is loaded, i'll file a PR for this change. |
That was quick!
I will test it, but it might take some days, as it’s winter and we have very grey weather in Stockholm right now so the solar panels have not produced enough power to export anything for more than a week (and therefore nothing to sell and no reward).
Let’s hope for better weather with sun!
Best regards,
Per
…________________________________
Från: lsiepel ***@***.***>
Skickat: Tuesday, January 10, 2023 9:20:15 PM
Till: openhab/openhab-addons ***@***.***>
Kopia: Per Skenhall ***@***.***>; Mention ***@***.***>
Ämne: Re: [openhab/openhab-addons] [tibber] Missing channel for accumulatedReward (from Live API) (Issue #12273)
There you go: https://1drv.ms/u/s!AnMcxmvEeupwjqJi0lZi9bodhlkFmw?e=dpcKLL
Uninstall current tibber binding, drop this file in you addons folder and it should be pciked up in seconds.
You should then be able to bind an item to the channel: accumulatedReward it is of type reward:
<channel-type id="reward">
<item-type>Number:Dimensionless</item-type>
<label>Total Reward</label>
<description>Reward at given time interval (e.g. hourly, daily, accumulated since midnight)</description>
<state pattern="%.3f"></state>
</channel-type>
If you confirm the value is loaded, i'll file a PR for this change.
—
Reply to this email directly, view it on GitHub<#12273 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADUZMPIOFBOTFPMENFP3LOTWRW777ANCNFSM5OHFJOZQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi again,
Today we had som sunshine and some energy was sold! 🙂
Tried to installed the addon, but got this error at startup:
2023-01-13 18:15:54.413 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.tibber-3.4.1-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.tibber [26]
Unresolved requirement: Import-Package: org.openhab.core.io.net.http
at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445) ~[org.eclipse.osgi-3.17.200.jar:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.7.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.7.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.7.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.7.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.7.4]
Not sure what that is about, but Tibber binding seems not to be starting...
BR,
Per
…________________________________
Från: lsiepel ***@***.***>
Skickat: den 10 januari 2023 21:20
Till: openhab/openhab-addons ***@***.***>
Kopia: Per Skenhall ***@***.***>; Mention ***@***.***>
Ämne: Re: [openhab/openhab-addons] [tibber] Missing channel for accumulatedReward (from Live API) (Issue #12273)
There you go: https://1drv.ms/u/s!AnMcxmvEeupwjqJi0lZi9bodhlkFmw?e=dpcKLL
Uninstall current tibber binding, drop this file in you addons folder and it should be pciked up in seconds.
You should then be able to bind an item to the channel: accumulatedReward it is of type reward:
<channel-type id="reward">
<item-type>Number:Dimensionless</item-type>
<label>Total Reward</label>
<description>Reward at given time interval (e.g. hourly, daily, accumulated since midnight)</description>
<state pattern="%.3f"></state>
</channel-type>
If you confirm the value is loaded, i'll file a PR for this change.
—
Reply to this email directly, view it on GitHub<#12273 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADUZMPIOFBOTFPMENFP3LOTWRW777ANCNFSM5OHFJOZQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@skenhall - is it when using the JAR file? If yes, can you try to install the Air Quality binding and then try again? |
Hi again,
Installing that other binding fixed the dependency - is this a bug in the Tibber binding, that it is not properly declaring its dependencies?
However with the snapshot version now installed without error at start up, there are still no new channels to link to (see attached screenshot):
[cid:790d6654-78be-40a1-ae2c-bfaaee5d0333]
@lsiepel: Is there perhaps more than those four line of code that need to be added for this new channel to be visible in UI?
BR,
Per
…________________________________
Från: Jacob Laursen ***@***.***>
Skickat: den 13 januari 2023 18:56
Till: openhab/openhab-addons ***@***.***>
Kopia: Per Skenhall ***@***.***>; Mention ***@***.***>
Ämne: Re: [openhab/openhab-addons] [tibber] Missing channel for accumulatedReward (from Live API) (Issue #12273)
@skenhall<https://github.com/skenhall> - is it when using the JAR file? If yes, can you try to install the Air Quality binding and then try again?
—
Reply to this email directly, view it on GitHub<#12273 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADUZMPJ5QR4JY3DFTUZEBOTWSGJL7ANCNFSM5OHFJOZQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@skenhall - no, it's a problem when manually dropping JARs in the addons directory. In this case dependent features are not automatically installed. I had the exact same problem two days ago when working on an add-on in a clean 4.0 snapshot system not having any official add-ons installed. |
You might need to re-create the thing before the new channel is shown. the screenshot seems to be missing from the post. |
Hi again,
Sorry for the delay, but I realised I need to setup a separate test environment and not mess up my production OpenHAB instance with tests 🙂
Now the new instance is up and I can confirm that I see the channel "Total Reward" - however today was again totally grey in Stockholm are, so no energy sold and no reward...
I will be back assoo as I have som actual number of reward from Tibber to report to confirm the values.
BR,
Per
…________________________________
Från: lsiepel ***@***.***>
Skickat: den 15 januari 2023 16:20
Till: openhab/openhab-addons ***@***.***>
Kopia: Per Skenhall ***@***.***>; Mention ***@***.***>
Ämne: Re: [openhab/openhab-addons] [tibber] Missing channel for accumulatedReward (from Live API) (Issue #12273)
You might need to re-create the thing before the new channel is shown. the screenshot seems to be missing from the post.
—
Reply to this email directly, view it on GitHub<#12273 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADUZMPI2EMIWB64L27GG2VDWSQIVRANCNFSM5OHFJOZQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
It will help if you enable debug logging and send the logs, also if you are able to send the related events. But i might have found the cause allready. The accumulatedReward was not yet added to the query. I thought it would be just another field that was returned, but due to your example, it came into my mind to look at the request. Two test jars, pick one depending on your test systemen 3.x or 4.x |
Success! I can now confirm that the latest addon version you provided @lsiepel worked just fine: |
Thanks, just filed the PR, now we wait for it to get merged. |
Great! Looking forward to that.
…________________________________
Från: lsiepel ***@***.***>
Skickat: Wednesday, January 25, 2023 10:24:36 PM
Till: openhab/openhab-addons ***@***.***>
Kopia: Per Skenhall ***@***.***>; Mention ***@***.***>
Ämne: Re: [openhab/openhab-addons] [tibber] Missing channel for accumulatedReward (from Live API) (Issue #12273)
Thanks, just filed the PR, now we wait for it to get merged.
—
Reply to this email directly, view it on GitHub<#12273 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADUZMPK2WW7PCJSYXCVVVCDWUGKZJANCNFSM5OHFJOZQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Your Environment
openHAB 3.2
Description
According to Tibber's API documentation for live measurements https://developer.tibber.com/docs/reference#livemeasurement
there is also data available for the earnings (reward) for sold electricity:
accumulatedReward | Float | Accumulated reward since midnight; requires active Tibber power deal
Would be super to also get this data into openHAB!
The text was updated successfully, but these errors were encountered: