[APP][Pro] Piggy Bank

I did understand you in your answer that it isn’t possible to have one unit ON in X hours, in Y tariff? I know you can add the Hotwater Tank to ex go on only when “cheap”, but can you limit it to only go on in X hours during “cheap” price?

It is possible, but not necessarily reliable. The reliability depends on how far you are from the power tariff you want to stay within. If you know that you will be very far away from the limit anyway or you have sufficient other heating sources to turn off to be within the tariff then it’s probably safe, but if you try to squeeze the max out of the power tariff then I would consider such a 4-hour limitation very unreliable.

So… if you want to use this app to force only 4 hours cheap then you can fake it by pretending that your water heater is a car-charger:
This is because there is a flow to enable car chargers in the cheapest X hours only. I can help you to set it up if you want to try, but it will be a hack as it’s not really intended for water heaters :wink:

However, I am thinking of adding this functionality to the time schedules as well in version 0.21 of the app, so if you check by later then it is a great chance that the functionality you want will be present. Time schedules can be reviewed from the Advanced->Time schedules menu option, but it is currently under development so not completely ready yet.

Super thx!! I will try to wait until v0.21 is out.

Someone sent me a diagnostics report stating that the app wouldn’t start. I would appreciate it if the affected user(s?) can send me a personal message to help with debugging. Does this affect new users or old users?

Sound good to me. I guess what I want is more weight to recent values, which seems to be met with the smoothing factor of 2. It would be nice if you could print the final solution somehow (maybe as information in the app), because then I could play around and understand how the gliding average is calculated for different input.

Whoever reported that Z-Trm3 does not work after the last update.
This is not related to this app. It’s related to how unstable the Heatit driver is when encryption is enabled. One way to solve the reliability issue is to disconnect the Z-Trm3 from Homey and connect it again with code 0000.

New version 0.20.7 out for testing


PLEASE READ and give feedback where requested.

It has been a while, but this new version turned out to be a real pain to debug and verify although I thought it would be smooth as butter. Nevertheless, it seems like I finally got it in a working state so here are the news:

  • Major predictability improvements
    • What does this mean?
      There are two factors here that are equally important

    • Added support for using the meter readings as input to the energy estimation
      Previously the app has only predicted the energy usage from the reported power. Now it will also let you input the meter reading. This is important because if the power was not reported for a while then a delayed meter reading will correct the inaccuracies in the estimated energy usage. Now, for the tricky part. Different meter readers report the meter reading at different intervals and some reset the value from time to time to give you daily consumption for example. Power and Meter readings may also come at different times and with different precision. The app will support all this different behaviour, but for best result the meter reader that report at highest granularity should be used - and it must have sufficient precision to be relevant.
      I have selected some defaults for the following meter readers and think they should be ok:

      • Eva meter reader (confirmed)
      • Tibber pulse (confirmed)
      • Homewizzard P1 (confirmed)
      • MQTT device (please somebody confirm that the app still work) :point_left: :exclamation:
      • Easee equalizer (please somebody confirm that the app still work) :point_left: :exclamation:

      For those using flow inputs they can set up a flow to input the meter reading if they want to improve reliability, but it is not required. (nevertheless, if you have an unsupported reader please report it so I can add support for it anyway)

    • Handling of Unreliable meter readers
      If the meter reader does not report any power for a long time due to a bad connection with Homey or whatever other reasons then the app now have a built in feature that will make sure you do not cross your power limit even when no signal is received. This an important feature because a rare incident would easily have messed up your power budget for the whole month before. The new feature works by letting you specify a maximum amount of time that the app will cut the power consumption in case no power is reported. Then, if the incident occurs the app will start by turning off all devices, but only as long as you let it. This will ensure that you still have power even though the app is clueless about the actual usage and tries to limit the power. The threshold has been set to 50% by default, you may need to change it if your meter reader is unreliable.


I have a lot of limitations of power. Haven’t really touched it in quite a while, but I’ve seen the warning for a few weeks.

Pulse as meter reader, using test version

What to do

These are just informative messages I added, it’s perfectly normal as it shows that the app is working as it should. However, I wonder if I should remove them from the timeline as they clutter the timeline a lot and is a source of confusion. It was never intended to go into the timeline in the first place, only to the “alarm”.

Apart from that, is the app still working as it did earlier in the week? The change I needed to confirm (for Pulse meter readers) was applied yesterday evening.

I was just wondering about why the alarm goes off so frequently. The screenshot was just so you could see it. I never go on the timeline here otherwise. But I do see the alarm (orange exclamation point) quite a bit

I think everything works as it should :person_shrugging:

There are several limiters in the app now that can all trigger this alarm. If any of them trigger then this alarm would be set.

  • One is the maximum hourly limit. If your hourly usage is close to this limit it will most likely trigger the alarm several times every hour.
  • One is the maximum monthly limit. If your usage is close to this limit it will also trigger the alarm. (the purpose of this limiter is to not go above the limit where you get “strømstøtte”)
  • The newest one is the safety guard for unreliable meter readers. If your meter reader loses connection with homey very frequently then the app will go into safety guard mode to make sure you don’t exceed the hourly limit. You can see if your meter reader is unpredictable by looking at the graphs in the piggy settings. If all bars are green then you’re all good. If some are read then click on them to see how many % of that hour the meter reader did not report power. (in the hourly view).

You can enable and disable the different limiters from the app settings.

1 Like

Not sure if this is a configurable setting ? - but it looks like my PB sometimes limits the 5 first minuts into an hour. I have seen it during several charging sessions that it has an Log entry with Limit message “Strømmen blir begrenset!”. I use the charge X kWh before YY, and PB spreads the charging out on various hours correctly based on the pricing.

During my Easee charger session, it starts example: 04.00 to limit (and turns off things), and it last until 04.05, with the log entry: “Ingen begrensning” - On the charge plan it says that it should charge 02.00-04.00
An observation “live” yesterday, charging was working on the hour between16-17 - During this time I see that the charger is brought down from 6,8kW down to 1,8-2kW before it ends charging 17.05 and limit is removed.

A couple of days ago I switched to a lower grid tariff limit (2-5 kWh). This worked.

Now I wanted to adjust it up again (5-10 kWh), but it doesn’t stick. Immediately after acknowledging the increased cost warning and saving settings, the Home page shows “10”, but after closing settings and reopening again, it’s back on “5”.

If I turn limiting off, then adjust it, then turn it on again, it seems to save properly - so I’m not stuck :sunglasses:

Seems like some logic is wrong around the increased tariff cost warning… (0.20.8)

I think this may be caused by the long delay it takes to control the Easee chargers. So:

  1. First the app detect that it need to reduce the power
  2. Then it instruct Easee to reduce the power
  3. Then it waits a little while
  4. Then it check the power again. If it still is too high it will jump to step 2.

The problem here is likely to be in step 3. If the waiting time is too short then step 4 may detect the old power and as such think that it still needs a reduction even though there still is a pending one… This will eventually result in a complete shutdown of the charger.

You can try to increase the waiting time by entering the App setup. Click the Advanced menu → Charging → Increase the value of the minimum waiting time and save.

If this helps then please let me know and I can try to change the default value. If it doesn’t please let me know again and I can see if there is some other things we can do (remember that I don’t have an Easee charger myself so I am completely dependent on your feedback to create the optimal experience.

Oh, damn, you’re right. I created this ticket to fix it: Impossible to increase power tariff · Issue #209 · frodeheg/no.sparegris · GitHub
Thanks for spotting. This might explain why there has been a large drop in new users after the new year. New users just see that it’s broken and leave the app without giving feedback. I will fix this tonight and make it part of the test version and push it to stable as soon as possible.

2 Likes

I just pushed version 0.20.9 to live, In addition to the above-mentioned changes I did the following changes:

  • Fixed the bug where the power limiter was impossible to increase.
  • Added support for the Homewizzard P1 Meter Reader
  • Added basic support for solar power (it only low-clamps the power input to 0 so no negative input will disturb the input.)
  • Added handling of AC devices so any mode (heating/cooling/etc.) is now supported
    • Note that the default option is to auto-detect the mode and then just invert the sign of the delta temperatures in case the mode is set to cooling.
    • It is also possible to set the mode through piggy. This will be baked into the time schedules later so you can change the modes throughout the day… Though, since time schedules are not complete yet I temporarily added it as a global option for now, available from the “Controllable devices” sub-menu.
    • AC Devices of type Virtual switches and Daikin airairhp need to use this global mode in order to put the AC Device into cooling mode for now due to limitations with the implementation; All other devices will be automatically supported. I will make it more user-friendly for these special case devices in a future version… Meanwhile, sorry for the inconvenience…
    • As part of this rewrite it is no longer possible to input negative delta temperatures for cheap modes and no longer possible to input positive delta temperatures for expensive modes. I know this may not be explained very well in the app right now, but it will become clearer when the time schedules are complete.
  • Delta temperatures that are smaller than the granularity of the devices are no longer supported.
  • Minor English translation fixes
  • Removed power limitations from the device timeline to reduce clutter
  • Removed error logging for missing “Strømregning” app when it is not needed
  • Attempted to fix an issue on the new HP2023, though I don’t have a HP2023 so I am not sure if it worked.

After the PB was auto update on my homey to v0.20.10 I started to receive alot of red alarms on limiting in “PB Insights” device… Looking at Tibber Pulse config, it was set with default value on update interval for 30s, so probably others with this setting. Value is configurable in step of 5 in range from 5-3600seconds.

If I understand the new limit correct, it starts to shutdown without meter after 1 minut? In worst case that is 1 or 2 missed/delayed poll with default setting?
(I updated Pulse to update very 10s, and no Alarm yet, but I expect a glitch now and then).

Ok, sounds like Tibber Pulse has a lot of cases where the signal is updated more seldom than 30s but more recent than 60s. If this is indeed the case I have noted an improvement ticket for cases where power is reported seldom, so hopefully this would improve in a little while.

What is your observation on the general time it takes for Tibber Pulse to update the Power and Meter value?

Also, I would be interested if you could check if the memory and CPU usage for the app increased a lot after the update. I have an Eva meter reader, which is not that much affected by the changes, so I would be happy if this did not increase significantly for Tibber Pulse either, did it?

Not sure if the Graph in PB config is changed with the update. However changing Pulse to 10s and/or update removed all the 50% occourance of Red Bars I had earlier. Now all is green, without any Loss.
Still, I see that the Limiter was enabled a few times, not sure how often.

In PB diagnostic log, that is set to “Only errors.” is writing at random frequency.
“The reported power time was from the past. This should only happen when the clock is adjusted.”
Is this realated?

Impression is that the APP in homey is slower to update than their own app, so for “realtime” I normaly uses their own app. But Resolution is most likely more than enough for my usage. - Saying that, not sure if Homey app updates their icons/app or, or if the pulse data is slow or missing “polls”. - As long as thing is based on “feelings” and not concrete messages in logs with timers it is hard do describe and pinpoint vallid info.

Not sure if I can find longer trends, hower at a snapshot.
SpareGris is today using, 52.9MB - I think it is around the same as yesterday, cpu is 0
Tibber is 33.4MB - I think it is around the same as yesterday, cpu is 0

(For your question earlier regarding easee charging timeout by the end of hour. Not answerered you on that as I need more concrete issues that I somehow can recreate before I starts to adjust timeout, so will come back if I find any trends and have enough charging sessions)

That is very odd… It means that the tibber Pulse app is not updating the meter reading and power reading in order… e.g we get a power reading and then we get a meter reading from the past. I am not sure how much it is reordered as I don’t have this device, but it’s probably never more than a few milliseconds I hope… anyway I will attempt to adjust the code to handle such cases a little bit better. See this ticket for details.

Ok, it can occasionally be that high, but it should fall down to around 35 MB after 12 hours or so. If it stays at that height it is wrong, and I am a little bit worried that Tibber Pulse might cause it to stay that high due to the way I read Power/Meter values. Please let me know if it never goes down, then I need to optimize memory usage for Tibber Pulse.

Thanks

This evening around 23:15 it is at 53.8 MB, -about 10 hours since i wrote 52.9MB
If it should decrease gradualy or the 12 hour is from last reboot of app/homey we can say it stays high. I restarted Homey yesterday 24H ago.