This topic is about the new Piggy Bank app.
It is being developed at GitHub - frodeheg/no.sparegris: Saves money by adjusting when to use electricity
The main purpose of this app is to make sure the power usage for every hour is within the targeted power tariff in Norway (now also Belgium - if someone can confirm I did it right).
New features are being added continuously.
1. When will my device be supported
If your device is not supported, Please send me a device report and I will add support for your device as soon as possible.
2. How to send a device report
- Go to the app settings and
- Click the “Help” menu
- Select the menu choice “The app cannot find my device”
- Click “Report a problem”
- Click “Select report” and select “Experimental unit is working” (or another report type if applicable)
- Click “Select unit” and select the Philips Hue device / other unsupported devices
- Click “Generate report”
- Click “Send”
Once I get the device report I will add the device type to the list of supported devices and, if applicable, fix any problems controlling the devices.
The first version is now live at Piggy Bank App for Homey | Homey
This looks an interesting app, but my first question (without having installed the app yet) is whether the app will only turn off/on devices to achieve the desired power reduction? Reason for asking is that when for example charging a car using a charger where it is possible to adjust the max charging power/current (e.g Easee) from within Homey, it is desirable to just reduce the power enough to get below the limit, instead of turning it completely off.
My plan was to use Homeyscript to ensure I stay below my desired limit, but this app might be a better choice, so I’ll take a look at it when I have some time to do so.
Firstly, as I do not have a car charger myself I have made some assumptions that may or may not be true when developing this app, but I will be happy to make adjustments if any of the assumptions are wrong or if you have better suggestions.
As of now the app only turns the device on and off, but there are made some limitations that will prevent the app from turning a device on and off excessively. As the app does not know how much power a device will draw then it will make sure that no devices are turned on again the next 5 minutes after a device has been powered off.
Still, if the device it is trying to turn on has a very high load then you might end up in a situation where it will be turned on and off every 5 minutes until the end of the hour where the amount of free power within the power-tariff is so high that it exceeds the max power of the car charger.
To battle this I assumed that all car chargers have an adjustable power draw and that you can set this to a value similar to your desired power tariff. This will reduce the number of on/offs but not completely.
If this is not good enough then:
- You can get the amount of available power (in the number of Watts you can use for devices outside of the apps control for the rest of the hour before the power tariff will be exceeded) at any given moment from the device for this app, or
- I can add an option to let you set the expected power draw for each device in the device setting and as such will delay the on/off actions until there is sufficient power and as such end up with only one on/off action every hour (as more power becomes available at the end of the hour if you saved power in the beginning).
The app also gives you the option to avoid charging when the electricity price is high.
Some significant stability improvements are ready and have been pushed for certification. Hopefully, it will be available shortly.
A new test version is now available at Piggy Bank | Homey if anyone wants to sneak a peek.
This version features
- Some significant bug fixes
- Improved support for car chargers
- Ability to set the max power tariff to any value (as not all companies are using the standard power tariffs
- Fetching electricity prices from no.almli.utilityprice if it is installed
- Added ability to use internal price point control so this doesn’t have to be flow controlled
- New device capabilities that show various price statistics including money saved by moving energy usage between hours.
- Fixed when next day / month is detected as this was 2 hours off (it was using UTC, not local time)
- Improved translations
It has been pushed for review and should overwrite the stable version as soon as Athom has reviewed it…
Thank you for the app. Testing it now, and I have a few questions.
In the test version you say you have added the ability to fetch prices from no.almli.utilityprice. assuming this is the Norwegian Utility Bill app or at the API behind it? I have it installed but I can’t see any prices fetched from there? How is this handled? Do I still have to set up flows to tell your app about the price level?
If it is done automatically, what prices are considered low, normal and high?
And another thing in the price settings. Is the Delta temperature setting either + or - from the originally set temperature?
Yes, it is fetching the prices from the API behind the Norwegian Utility bill app named “Strømregning”. This means that for it to fetch prices this app must be installed.
You don’t have to set up flows to fetch the prices.
So, I just implemented some simple formulas to decide whether or not the price is high or low. You can see the formulas if you click on the information icons behind all the new settings in the price tab, but first you have to show the new settings by selecting the internal mode for price evaluation in the price tab. If you want to take a look at the actual numbers you have to install the “Piggybank insight” device. Some of the numbers will not be shown unless you first enabled them in the device settings.
If you prefer to use other formulas to decide if a price is high or low then I guess it will be better to just do it outside of the app and input whether the price is high or low with flows.
The delta temperature is a delta from the setpoint temperature at the currently running mode (day/night/holiday…)
Ok, so I have to select the internal control setting for it to fetch the prices. To be honest, my math skills are not the best, so I don’t really understand what the formulas are trying to accomplish. Looks like they are based on averages and not the actual hourly price?
Guess I better just use flows for this.
Edit: changed the setting to internal control. This hour is the second lowest for the day (11 am), and the price point is still set to normal.
Anyway. Thank you for clarifying.
Yeah, using the internal setting to evaluate for high/low prices might require some adjustment to make it optimal for your preferences, so if you don’t get what you expect from them flows are probably better. When I think about it the internal setting is not a good way to control charging, so that should probably be avoided. I suppose I will have to do some adjustments to the formulas.
I’ll just use flows, no problem. Wouldn’t know about car charging as I don’t have an electric car. Just figured I’d try the automatic temp adjustments on my heated floors based on price, and that will require feeding hourly prices to the app.
I think I will change to this method for detecting high/low prices, what do you think?
- The n cheapest hours today or when the price is x% below the average price today then it is considered low
- The n most expensive hours today or when the price is y% above the average price today then it is considered high
Does it sound better?
Yeah, I guess that sounds good. Since there are three price points, the logical thing would be to use the 8 lowest prices for low, the 8 highest for high, and the remaining 8 for normal. Not sure what % above/below average would provide in addition to that, but perhaps I’m looking at it wrong?
The idea was that you don’t know how many expensive hours there are, so if you just divide it into three parts of 8 hours, you might get 4 hours registered as cheap when they were actually expensive or vice versa.
I’ve updated the test version now so you’ll probably get an automatic update pretty soon.
(Thank you very much for installing the test version and giving me feedback, I think it will be better for everyone else with this new change )
EDIT: Translated to english
That’s true. Guess your solution will be good then.
The new version became live this morning. If you find any bugs or have suggestions for improvements please share and I will do my best to improve the app. Although progress might slow down now since my summer holiday is over so I have less time available for improvements.
Otherwise, a list of future improvements can be found on GitHub: no.sparegris/README.md at main · frodeheg/no.sparegris · GitHub
A new test version is now available at Piggy Bank | Homey
The new version will become available for everyone soon if it passes the testing.
The new features are:
- Added new price point for extreme prices that let you further power down your house if the prices go haywire.
- Added emergency off action that can be used to ignore the state of a device up until you are unable to meet the power tariff, in which case it will power the device off. This is intended for non-essential lighting and other less important devices at low price points and more important devices at higher price points.
- Added ignore action that can be used to ignore the state of a device completely. This is intended for essential lighting and other important devices at low price points.
- Splitting of device names that were too wide in order to prevent the setup page to display incorrectly.
- Non-essential fixes such as translations/setup page help/app API changes/Improved visibility in the app store.
Installed v 0.8.13 and after a short time I got this error message:
Then I tried to install the test version v0.10.1 and still i get the same error message.
Then I tried to uninstall and reinstall the app v0.10.1, it worked again.
Just wanted to let you know.
Thanks a lot for the report. I have fixed this in version 0.10.3
Apparently, this bug (I assume) only occurred if a device had been removed from or re-paired with Homey after the settings were saved in this app the first time. Thus it is unlikely that I would have discovered this on my own. Your report is greatly appreciated.