[APP][Pro] Piggy Bank

Update on problematic devices
Someone sent a report with lots of device errors. There is one thing you can do now and one thing I will do in the next version:

Z-TRM3
I noticed in the log that Z-TRM3 was one of the problematic devices. Note that this device is known to lose connection with homey very often when used with encryption. This can be improved by deleting the device and adding it again with the code 0000. This will make sure the encryption is off, but then it will no longer have any issues with lost connection to homey.

Shelly / Ikea Tradfri
Not sure why these loses connection a lot but for every device that has a bad connection I will make these devices light up in the device list in Sparegris so you can clearly see that the app can not control these because the device is not behaving properly / the connection to the device was lost + a device reliability report. And for devices with known workarounds such as the Z-TRM3 the workaround will be displayed.

Hope this

1 Like

If i try to make a flow with push notificarion, inser a tag in the message, search for availible tags for piggy bank, this is the options:

Thanks for Shelly added.

I don’t think VThermo had an issue (I’m also very reliant on them), but rather the Panasonic pump. I’m still working out how best to control the pump.

The Ioniq5 device controls many car aspects, not just the charger, so is not controlled directly by Sparegris - rather, Sparegris controls a “Virtual Devices” mode for charging (just an on/off switch), linked to Ioniq5 charging via flow cards.

On this “charging” virtual device, I’ve set power consumption when off (0) and on (3500) (under advanced properties). Of course, this is based on my readouts, and does not control the actual power draw - but it looks like it should be very useful for Sparegris to make use of these values when deciding whether to try turning this device on at all. If your app can get to these numbers, that is?

I wasn’t referring to Sparegris looking to turn devices off, but rather when trying to turn them back on (like when “bumping” my virtual charging device). That decision could be guided by the configured draw of each device (if available).

I’m sure support for intelligent chargers will be great, but I’m not one of the lucky owners😋.

Thanks for some fantastic work! I’m really looking forward to what this app can do!

1 Like

I’ve added a couple of custom modes (“Hjemmekontor” and “DagUte”), and use this flow to select mode (about every 10 minutes).

However, only “Natt”, “Dag” and “DagUte” are applied correctly.
“Ferie” and “Hjemmekontor” both cause “DagUte” to be applied!
I think this started happening after adding the second custom mode (“DagUte”).

And a question:
image
Do all options take into account future prices (also for the next day) when available?
This is very valuable info for planning long, heavy loads.

Ah, ok, but that is only because you have not used a trigger from Piggy bank. When you select tags like this you only get the enum values of enum capabilities. If you want the enum text you have to use a trigger from the app instead. Please use the trigger “Price Point Changed” from the app (not the device if installed) as previously noted.

Sorry, I am unable to reproduce this. Are you sure this is a problem with “Sparegris?” and not the flow? Have you tried to right click the “Sett Sparegris driftmodus” cards and run the flow from there? (and of course disabled the flow itself while testing so the flow does not reset the mode again before you get time to look what the mode was changed to)

The “Basis for price comparison” only take into account the future price when selecting “Average today”.
However, the option “minimum cheap hours per day” and “minimum expensive hours per day” always takes into account the future price and will override the “Basis for price comparison”

That’s exactly how I was testing.
After restarting Homey, behavior changed subtly:

  1. “Hjemmekontor” worked the first time.
  2. “Natt” worked
  3. “Ferie” applied “DagUte”
  4. “Dag” worked
  5. “Hjemmekontor” again applied “DagUte”

I even removed the flow card which sets “DagUte”, and repeated the above test, with the same result.

It seems after the first application of a custom mode, some modes are erroneously mapped to the last custom mode (just guessing here). Could there be some fuzzy string matching, string-to-enum conversion, or culture/translation aspect affecting this?

Is there anything I can log or send you?

Hmm… sounds confusing :slight_smile:.
It might be more intuitive with “average of prev X and next Y hours”, and just allow user to set X ( <= available history) and Y ( <= 12). This would behave smoother across midnight.

Have you checked the log from the Sparegris Innsikt device?


(note that it only updates once every minute or so, so abrupt changes are not captured)
Could it be that you have changed the name of the modes after the flow cards were created? Because the flow cards are not automatically updated in this case (unfortunately) and there is nothing I can do about it except for telling you to delete the flow card and create it again.

Which part of this is confusing? That “average today” includes the future or that the last X days do not include the future? Not sure how I can improve that text.

Maybe I can add something similar as an additional option (I don’t want to replace the old ones because I don’t want to scare people with too much math as some people just hate numbers and this page is probably scary enough for them already) With something similar I mean that since I do not keep any history and calculate this as a running average this will not be exactly X hours in the past but weighting the price at +Y hours against the past average (single value) as if it was an array of X+Y elements.

1 Like

Hva med ü utvide funksjonaliteten til ü la appen bistü i ü holde seg under strømstøttetaket pü 5000 kWh?

Beregne en hver tids tilgjengelige daglige gjennomsnittsforbruk for gjenstĂĽende dager i mĂĽneden, basert pĂĽ forbruket til nĂĽ og gjenstĂĽende dager

AltsĂĽ 5000 - forbuk sĂĽ langt i mĂĽneden : resterende dager i mĂĽneden. Med mulighet for ĂĽ skru av soner for ĂĽ ikke overforbruke

Edit: please ignore this answer. I do understand now, good point, I will think about it…

@Bernt_Espelien This is exactly what the app does, not sure what you are suggesting. Sounds like you might not have selected enough devices for the app to control if the app can’t get you below your desired power limit. (and please keep the forum in English, Norwegian messages can still be sent directly to me if desired)

On a related note:
We have solar panels, which means that on sunny days, our midday consumption is typically negative.
@frodeheg, I’m currently feeding negative consumption into Piggy Bank as well - should I instead cap it to zero?

However, since unused solar power is sold to the grid at spot price, consuming solar power has a monetary cost (lost revenue). With “strømstøtte” (Norwegian power price relief) in the mix, consuming solar power is actually many times more expensive than grid power.

It would be amazing if Piggy Bank could somehow take this into account when computing the price point in sunny hours (at least for the amount of power reported by the inverter)!

@Bernt_Espelien refers to the monthly consumption ceiling where “strømstøtte” no longer applies, while (I think) you refer to the “nettleie” tariff ladder…?

I admit I hadn’t noticed that very useful log yet! I tried applying “Hjemmekontor” now, after recreating the flow card:
image

image

image

The part about minimum # cheap/expensive hours overriding the selected average interval - by looking into the future. :slight_smile:

The “average today” option alone does not really take future prices into account just before midnight, does it? But the override options do bring in future prices somehow. No worries about the technicalities - I’m just concerned that morning prices are taken into account the evening before.

Thank you, please do.

With cheap days every now and then, it can be tempting to use electricity instead of the fireplace, but not at the expense of busting through the 5000 kwh ceiling.

Setting a limit would be very helpful. It would be helpful even for people wanting to try and use less electricity than x kwh a month, if the target number was user selectable

Interesting, how does this play out, is it like getting -1234W from the meter reader flow card? You definitively should input the negative power to Piggybank. Allthough, this is new territory for me, so I can’t guarantee that it will work or not, but I will fix it for sure if it is not working.

I’m not sure of all the mechanics but yes the “strømstøtte” sounds to be a bit ridiculous. I suppose this odd case only accounts for hours when the grid cost is cheap though. So you can actually earn a lot of money charging the solar batteries at night when the grid cost is low and push it back on the grid in the morning when the prices are high, right, you do not have to use solar power only to charge them? Or maybe you do not have batteries in between? Do you get the full grid price back when selling or do you get inverse “strømstøtte” for this part?
If you PM me with some more details about how to calculate the cost correctly I will see what I can do. Maybe find optimal times for exporting current vs. importing current.

Ah, I think I have reproduced it now. I’ll get it fixed in the next version, thanks for reporting.

Yes, but I think this part is important as it wouldn’t be able to move power from expensive to cheap hours when there is a big drop or big increase in price from one day to another otherwise.

No, not in any case. The minimum cheap/expensive hours only look at the prices within the interval of the current date.

This would be an average of almost 7 kW every hour in the month. Isn’t this a pretty high limit? I myself only used 1457 kWh last month (without a car charger though) and I suppose this is pretty normal for a household. If so, I would consider it quite typical for cases where 5000 kWh is breached that it is the car charger alone that is responsible for the immense use. If so, it’s not much the app could do is it? except for when you’re only about to overshoot the 5000 kWh limit by a little?

Yea, sure, the limit may seem high to a lot of people. But the size and age of houses varies a lot.

The reason I got into Homey was last years electricity bill for december. 7000 kWh was 15.000 nok. On some days, consumption was over 300 kWh

I can get consumption below 5000 kWh. Possibly even down to about 4000 kWh if using a lot of firewood and making sure i set the house up for an average consumtion of 166 kWh (5000 : 30). But with the fluctuating prices, and sone days more reliant on firewood than other, it would be beneficial to automatically set this limit, as by the end of the month, your average daily consumption may be up to an increased number of kWh and IF the prices are cheap at that point, you can more easily choose to rely on electricity rather than other heating sources

Yes, I currently feed Tibber Pulse “Power” (positive means consumption from grid, negative means production to grid) to Piggy Bank:
image
So you can easily simulate solar panel production by subtracting e.g. 2500W from the “Power” readout. My panels produce max 4 kW. The Tibber app includes consumed solar power in consumption (yellow) - the Tibber Pulse readout does not.

I haven’t been monitoring PB Insight, but I haven’t noticed any adverse effects yet.
When I think about it now, if PB never checks for “Power < 0”, I guess this will throw off my accumulated hourly and monthly consumption? So production will subtract from my consumption (which I don’t think the grid company does :slight_smile:), and I risk consuming above target(?).

I don’t have batteries - they’re ridiculously expensive, but that would be a great way to pay them down :slight_smile:.

The price depends on the power supplier, but Tibber pays full spot rate. There’s no inverse “strømstøtte” for anyone (which is what makes selling lucurative). There’s also a minor grid (“nettleie”) component.

Personally, without batteries, my choice is only between consuming solar power immediately (at spot), or selling to the grid (at spot, and buying back later at spot - strømstøtte). For the record, I detest that “strømstøtte” makes me think like a grubby capitalist, but I would feel robbed if I didn’t.

I guess PB could get part of the way by detecting negative consumption, but I think you’d also need the solar production wattage to get the full picture. My Fronius inverter (installed by Otovo, so should be common in Norway) provides this to Homey in real time, so I can easily feed this to PB.

I think this is the extent of my knowledge, but happy to PM if I can help further!

That’s great news! I was worried something was corrupted, and I’d have to resort to reconfiguring PB again from scratch.

Which brings me to a request: As the PB config is quite involved, and will be a considerable asset and time investment in a Homey home, could it make sense to support backup/restore or history? In-Homey storage would be good, download/upload would be great, something “cloudy” would be fantastic.

I guess PB is covered by Homey Backup, but this is very opaque, only one snapshot (edit: last 7 days) and suitable only for disaster recovery or Homey replacement (AFAIK).

Allright, I created this ticket where you can keep track on the progress: Make sure the total consumption per month get below a given threshold ¡ Issue #1 ¡ frodeheg/no.sparegris ¡ GitHub

Ok, so I misunderstood how solar power works, I do see some more changes are required. I created this ticket where you can keep track on the progress: Add suport for electricity production ¡ Issue #2 ¡ frodeheg/no.sparegris ¡ GitHub (so for the moment you have to cap it at 0W until I have fixed it)

Indeed, let me know if you buy some so I can help you pay them down by updating the app :rofl:

Wow, yeah, sound like ‘strømstøtte’ is actually a very good incentive to install solar power. I didn’t think of it that way.

I have fixed it now (will be out for testing later this evening), however it turns out that the flow card you use ended up being corrupted. So I probably need to do this as well:

  • Add support for old corrupted flow cards so they magically works and send a comment to the timeline that a corrupted flow card is being used so it should be replaced before it gets deprecated.

If I do not then users that don’t read the forum and already created a custom mode might think it is still broken and never get it to work even after I fixed it.

History you can already download from https://my.homey.app if you created the PB insights device.
Backup/restore of the configuration may be something of interest. See Add support for backup / restore in Piggybank ¡ Issue #3 ¡ frodeheg/no.sparegris ¡ GitHub for further progress.

1 Like

Awesome! Thank you!