Hello,
i need help to get current power from the tibber api every “x” minutes to check, if the bridge has a connection to tibber.
The current power should be set as a variable. If the value isn’t true (no connection), the value should be “0”.
I have connection to tibber with the HomeyScript (i know my Token and my Home-ID):
const accessToken = “zyx”;
But I only have a connection for price info, name, location … but no connection for current power and I’m not able (at the moment) to set the value as a variable…
The tibber API-Explorer gives me this at GraphiQL:
subscription{
liveMeasurement(homeId:“xyz”){
timestamp power
accumulatedConsumption
accumulatedCost
currency
minPower
averagePower
maxPower
}
}
How can i get the power as a variable?
Is it possible to get this information with the logik-card “Make a ‘Method’ …”
Hi @Ostys ,
I have no clue, how to get it via tibber api - I use the Tibber App and created two devices, the tibber device and the pulse device.
The actual power and consumption since midnight I get from the pulse device.
My problem is that the bridge lost the connection 2 time within 7 days and i had to pay for the high-price-hours …
Do you have an idea how to monitor the bridge connection?
You may check the error in any advanced flow and do a push notification or other message to you.
I lost my Pulse once. And it is bad enough that you need to amend all cards referring to the Pulse and to check carefully about the parameters.
Same at the consumption… the consumption ist standing still:
I thought that homey is getting these values directly from the pulse and not over the bridge from the tibber backend / tibber API.
But that’s the basis to get the solution …
I’ll set a variable every time and do a comparison to the value at the moment … if it’s different, everything is fine. Are both values the same, the brigde is offline.
I’ll create a flow now, will test it and post it here (if it works).
See you later!
Osty
@DirkH : Besten Dank nochmals für den Ansatz und viel Grüße aus dem Münsterland Hab Deine Flow-Cards in deutsch gesehen.
Hi @Ostys ,
What do you think of this solution? Usually Pulse delivers another power value several times every minute. So when there is no change for some time, either you have a blackout (battery backup works) or you lost somewhere the connection to Pulse, either by tibber or by Homey. I had these chart on my tibber smartphone app for some time, but when the connection was re-established the charts in the tibber smarthome app were corrected. So it may be an issue in between tibber and not between tibber and homey.
Hi @DirkH ,
i also don’t know what the chronograph is doing.
With your solution you only start the flow if the consumption changed. But i need an action if the consumption didn’t change. And you can only use this card to start a flow, not as an “AND” - card.
The flow is also running several times a minute. It starts every time, the consumption and the power-variable changed. I’m trying to reduce the CPU load as much as possible. It’s not needed at the moment but who knows what is coming the next years …
My flow is still working fine. Yesterday another test was positiv.
@DirkH , you have given me the starting point for the solution that I am happy with. Thanks a lot for your help.
I’ll close my question in a few hours. Have a good day and stay healthy.
Hi @Ostys ,
My flow starts, when the consumption changes, but does nothing else but setting the timer to ring after 3 minutes. If there is a new change in consumption the timer will be restarted and nothing happens. Only when there is no change for 3 minutes, the timer expires and the second part gives me a hint to watch.
I guess that is exactly what you want.