# \[APP\]\[Pro\] Piggy Bank

**URL:** <https://community.homey.app/t/app-pro-piggy-bank/66677>\
**Category:** Apps\
**Tags:** app, tools, homey-pro\
**Created:** [July 29, 2022, 10:07pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677 "2022-07-29T22:07:19Z")\
**Posts on this page:** 20\
**Page:** 9

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [October 13, 2022, 2:55pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/162 "2022-10-13T14:55:23Z")

</div>

> [@Robert\_Schmidt](#):
>
> No, they just correspond to AC (slow home/in-car) and DC (fast/super external) chargers.

Sounds odd… how should I know which of the on options to use then?

> [@Robert\_Schmidt](#):
>
> If I were you, though, I’d focus on more general PB strengths rather than individual car brands!

Yeah, it’s a good point, but I already added the possibility for on/off devices and heaters so why not. Although I am a bit unsure how to proceed, so I sketched down a proposal at [Add support for Easee car charger and generic charging devices · Issue #4 · frodeheg/no.sparegris · GitHub](https://github.com/frodeheg/no.sparegris/issues/4) Please feel free to review and add further suggestions there.

---

<div class="post-metadata">

**Author:** ![foni](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/foni/32/47584_2.png) [@foni](https://community.homey.app/u/foni)\
**Post date:** [October 14, 2022, 4:54am UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/163 "2022-10-14T04:54:11Z")

</div>

How does the setting for price work? On compared to off if emergency. Seems like the latter never turns device on, only off if over treshold?

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [October 14, 2022, 9:52am UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/164 "2022-10-14T09:52:40Z")

</div>

Hi @foni , you can find a description for that if you click here:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/b/db6d0016dfb47a7777925edcf521489d7c1bc263.png)  
In more details:

- Off will turn the devices off when entering this price point and keep them off as long as we are within that price point even if you turn them on manually
- On will turn the devices on when entering that price point and keep them on as long as we are within that price point even if you turn them off manually
- Emergency off will only turn the devices off if it is an emergency and will not try to turn It off again if you turn it manually on unless the emergency is somehow resolved. Neither will it turn it on again when the crisis has been resolved, but for a specific reason: it should not turn lights on after you go to bed or left for work; so this option is mainly intended for lighting.

---

<div class="post-metadata">

**Author:** ![Robert\_Schmidt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robert_schmidt/32/53755_2.png) [@Robert\_Schmidt](https://community.homey.app/u/Robert_Schmidt)\
**Post date:** [October 14, 2022, 11:42am UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/165 "2022-10-14T11:42:34Z")

</div>

> [@frodeheg](#):
>
> Sounds odd… how should I know which of the on options to use then?

This is a readout value, you can’t set it.  
The Bluelink device provides flow cards for starting and stopping charging.

---

<div class="post-metadata">

**Author:** ![foni](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/foni/32/47584_2.png) [@foni](https://community.homey.app/u/foni)\
**Post date:** [October 14, 2022, 4:28pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/166 "2022-10-14T16:28:20Z")

</div>

So. Turn on/off shold be used for swtching heating, varm water etc. on/off depending on price? If on and max power limit is reached will it then be turned off and on again when there are available power? And where does the insight get the current price from? I have selcted NO1, current price dhows up as 0,82321 kr/kWh, but tibber shows current price as 225 øre.

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [October 14, 2022, 7:39pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/167 "2022-10-14T19:39:58Z")

</div>

> [@Robert\_Schmidt](#):
>
> This is a readout value, you can’t set it.

Right, it was read-only, I didn’t notice.  
But I see there is one writeable capability named “charging”, So I can use this.

However I cannot see any power-meter readings or controller, so it’s only on/off and it uses what it uses, right?

> [@foni](#):
>
> So. Turn on/off shold be used for swtching heating, varm water etc. on/off depending on price?

If it has a thermostat capability I would recommend you to turn on temperature control, this will be much more convenient for price control.

> [@foni](#):
>
> If on and max power limit is reached will it then be turned off and on again when there are available power?

Yes

> [@foni](#):
>
> And where does the insight get the current price from?

The prices are fetched from [Entsoe](https://transparency.entsoe.eu/transmission-domain/r2/dayAheadPrices/show?name=&defaultValue=true&viewType=GRAPH&areaType=BZN&atch=false&dateTime.dateTime=14.10.2022+00:00%7CCET%7CDAY&biddingZone.values=CTY%7C10YNO-0--------C!BZN%7C10YNO-1--------2&resolution.values=PT15M&resolution.values=PT30M&resolution.values=PT60M&dateTime.timezone=CET_CEST&dateTime.timezone_input=CET+(UTC+1)+/+CEST+(UTC+2)), it should be the same prices as Noordpool except in euros. I use the day to day conversion rates from Norges bank to convert to NOK. Then on top of that, VAT and grid cost is added.

However… as you speak about it… I’m not sure if I did reset the prices when you change price zone. So maybe you have discovered a bug. Let me know if the prices are still off in 24 hours.

EDIT: I checked the code and it is indeed a bug. I will fix it in the next version. You can track it [here](https://github.com/frodeheg/no.sparegris/issues/11)

---

<div class="post-metadata">

**Author:** ![Robert\_Schmidt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robert_schmidt/32/53755_2.png) [@Robert\_Schmidt](https://community.homey.app/u/Robert_Schmidt)\
**Post date:** [October 15, 2022, 10:25pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/168 "2022-10-15T22:25:36Z")

</div>

> [@frodeheg](#):
>
> However I cannot see any power-meter readings or controller, so it’s only on/off and it uses what it uses, right?

That’s right!

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [October 16, 2022, 4:13am UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/169 "2022-10-16T04:13:57Z")

</div>

Version [0.18.2](https://homey.app/a/no.sparegris/test) is now out for testing:

- Car charger support fully operational
  - New flow cards available for those with unsupported chargers (e.g. not Easee)

- added graph for planned charging.
- added support for devices of type _no.adax.smart-heater.homey-app:heater-wt_
- Future prices are now fetched when available and not at midnight
- Fixed bug not updating prices when changing price zone

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [October 16, 2022, 6:03pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/170 "2022-10-16T18:03:18Z")

</div>

Support for new devices:

Someone sent me a few device lists that I should add support for, but I need some help understanding this so some feedback would be great:

- se.husdata:H60 - This is a thermostat device without on/off. Neither does it have a mode so I do not know whether it always heats or if it works in auto mode (heating + cooling).

- com.home-connect:dryer - I will add this to the ignore-list as I see no reason for PB to control this device (neither does it appear that it is possible given the limited capabilities it has)

- com.fibaro: FGWPE-101 - Will be added

I also got the following feedback:

> target\_temperature OutOfRangeError: 39 is greater than 35 (out\_of\_range)

Can whoever sent this report mention which device this was for? Was it an experimental device? If so, then I need a device report for it… All supported devices have different min/max caps, so I need to know the device before adding it to the supported list.

Finally I got this report:

> Validate error: TypeError: Cannot read properties of null (reading ‘length’)

Please elaborate on what you did before this report was sent, that will ease my debug considerably.

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [October 16, 2022, 11:45pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/171 "2022-10-16T23:45:20Z")

</div>

Whoever is sending reports about the device

- ‘Varmtvannsbereder’ (com.aeotec:ZW078)

please note that I did add improved reliability feedback in the test version so you will get more feedback from this. Other than that Your device seem to be very unreliable and unresponsive from the log, I would like to know if this is a common thing for this device. Please get in touch so I can understand how we can improve this.

I wonder if I should make the email-field for device reports required? so I don’t have to spam all this feedback through the forum?

---

<div class="post-metadata">

**Author:** ![KarlO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/karlo/32/79886_2.png) [@KarlO](https://community.homey.app/u/KarlO)\
**Post date:** [October 17, 2022, 4:48pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/172 "2022-10-17T16:48:17Z")

</div>

App seems very promising - now I am faced with a dilemma: should I switch to this app for all my power control needs: floors and hot water, or use my already working advanced flows… One advantage with my flows is that everything is logged to PaperTrails, so I know exactly what is going on.

I ran into an odd issue after I installed Piggy Bank last night: I activated it, saw that my 4 floors (HeatIt Z-TRM3), heat pump (Sensibo) and water heater (Aeotec switch) were all added and controllable. But I did not configure anything, except hook up the output from Pulse to it.

Today I noticed that my Aeotec Heavy Duty Switch (hot water) automatically turned back on 2-10 seconds after I turned it off from Homey, or from my flows - and since nothing was logged, I somehow thought the Aeotec was not functioning right. However, once I de-activated Piggy Bank, the Aeotec would switch off and stay off as commanded. I have now re-activated Piggy Bank, but turned off the Aeotec in its options. I am sure this behavior is intended, or unavoidable. I will study the Piggy Bank configuration further and see if it can replace my flows. I am sure it can, it’s more a matter of throwing away my existing flows or not 🙂

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [October 17, 2022, 6:55pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/173 "2022-10-17T18:55:37Z")

</div>

> [@KarlO](#):
>
> I am sure this behavior is intended, or unavoidable

It’s a very self-willed pig. It doesn’t like competition 🤣

I may add more options later if someone fancy more configurability.

---

<div class="post-metadata">

**Author:** ![Torbjorn\_Melbye](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torbjorn_melbye/32/18194_2.png) [@Torbjorn\_Melbye](https://community.homey.app/u/Torbjorn_Melbye)\
**Post date:** [October 18, 2022, 12:17pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/174 "2022-10-18T12:17:00Z")

</div>

Not sure if it’s a bug or not, but I noticed some weird behavior today.

At 2pm today, a few devices was turned off. Nothing unusual in itself, but the devices that were turned off did not reflect the priority I have set up in the app.

 ![Screenshot_2022-10-18-14-05-48-80_4bbfc4a7dd885a2bb189f300112a7ed4](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/f/bfa6f580d45bed4c4537818122c1a03e928f8d57.jpeg)

The marked devices did turn off, while the rest remained on. So my top priority devices were turned off, while my lowest priority devices remained on. One of the lowest priority devices was drawing power at the time. So did my top two.  
Are there other factors taken into consideration other then priority order, when the app decides to turn a device off, or is this a bug?

---

<div class="post-metadata">

**Author:** ![Robert\_Schmidt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robert_schmidt/32/53755_2.png) [@Robert\_Schmidt](https://community.homey.app/u/Robert_Schmidt)\
**Post date:** [October 18, 2022, 6:45pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/176 "2022-10-18T18:45:08Z")

</div>

I’d really welcome a flowchart, pseudocode or something which clarifies why something is off or on. I keep seeing cases which I struggle to understand.

Or a device status option on the devices screen, which explains/logs the last few actions taken on a particular device.

Example:  
I’d like my hourly limit at 5kWh.  
Heat pump device is “always on” (top priority) + “change temp 0”.  
Total consumption is safely below 5kW.  
Why would PB keep toggling the device on and off just a few seconds apart? (I think it started happening soon after a reboot.)  
Raising limit to 10kWh stopped it.  
If it keeps happening without my supervision, I worry about wear and tear on the device.

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [October 18, 2022, 7:00pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/177 "2022-10-18T19:00:43Z")

</div>

> [@Torbjorn\_Melbye](#):
>
> Not sure if it’s a bug or not, but I noticed some weird behavior today.

This is my recipe on weird behaviour:

- If a device does not respond:

- When the prioritization logic tries to find the least priority device to turn off, it **only** search through the devices that are not marked as problematic. This is to make sure we can reduce the power the power before it is too late.

So if you see any devices in your home screen with a low reliability this could be it. If not, it could still be. You can check the reliability by going to the device reporting and generate a report because reliability is written there (e.g. reliability 0.9 = 90%)

having said that, the reliability checking is quite new so it may not be working properly. Especially the part that tries again every 5 minute is a bit untested as all my devices are 100% reliable, I need someone with unreliable devices to give me feedback 🤣

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [October 18, 2022, 7:26pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/178 "2022-10-18T19:26:50Z")

</div>

> [@Robert\_Schmidt](#):
>
> Why would PB keep toggling the device on and off just a few seconds apart? (I think it started happening soon after a reboot.)

I think you may have encountered a bug, this should not happen…  
It’s being tracked here

> <https://github.com/frodeheg/no.sparegris/issues/25>
>
> The following bug report made me wonder about two things:
> \* The frequency the d…evice "Stue" turns on is way too often considering that there has been a recent poweroff
> \* The Homey reboot was detected so close to the new hour that the time where device control was prevented went over into the new hour. Could this have affected the resetting of the hourly counter somehow?
> 
> (note that \*\*always on\*\* may also turn off in case of emergencies, although it may be that this should not have been an emergency.)
> 
> Log ID: 2022-10-18T17:53:28.462Z
> App version 0.18.6
> 
> +17:53:28.462: No state from previous shutdown? Powerloss, deactivated or forced restart.
> +17:53:28.622: Homey reboot detected. Delaying device control by 578 seconds to improve Zigbee recovery.
> +18:5:19.612: Failed to turn off device Stue, will try to turn off other devices instead. (Error: Timeout after 5000ms)
> +18:5:19.810: Failed to reduce power usage by 319W (number of forced on devices: 2)
> +18:8:35.977: Failed to turn on device Stue, will retry later
> +18:10:34.511: Failed to turn off device Stue, will try to turn off other devices instead. (Error: Timeout after 5000ms)
> +18:10:34.513: Failed to reduce power usage by 614W (number of forced on devices: 2)
> +18:10:49.694: Failed to turn on device Stue, will retry later
> +18:10:50.403: Failed to reduce power usage by 621W (number of forced on devices: 2)
> +18:11:8.062: Failed to turn off device Stue, will try to turn off other devices instead. (Error: Timeout after 5000ms)
> +18:11:8.065: Failed to reduce power usage by 49W (number of forced on devices: 2)
> +18:11:23.800: Failed to turn on device Stue, will retry later
> +18:11:24.331: Failed to reduce power usage by 33W (number of forced on devices: 1)
> +18:11:42.162: Failed to turn off device Stue, will try to turn off other devices instead. (Error: Timeout after 5000ms)
> +18:11:42.165: Failed to reduce power usage by 41W (number of forced on devices: 2)
> +18:13:36.161: Failed to turn on device Stue, will retry later
> +18:15:44.126: Failed to turn off device Stue, will try to turn off other devices instead. (Error: Timeout after 5000ms)
> +18:15:44.128: Failed to reduce power usage by 543W (number of forced on devices: 2)
> +18:15:58.899: Failed to turn on device Stue, will retry later
> +18:15:59.410: Failed to reduce power usage by 42W (number of forced on devices: 1)
> +18:16:15.061: Failed to turn off device Stue, will try to turn off other devices instead. (Error: Timeout after 5000ms)
> +18:16:15.063: Failed to reduce power usage by 14W (number of forced on devices: 2)
> +18:16:31.312: Failed to turn on device Stue, will retry later
> +18:16:31.956: Failed to reduce power usage by 6W (number of forced on devices: 1)
> +18:16:48.600: Failed to turn off device Stue, will try to turn off other devices instead. (Error: Timeout after 5000ms)
> +18:16:48.602: Failed to reduce power usage by 12W (number of forced on devices: 2)
> +18:17:4.413: Failed to turn on device Stue, will retry later
> +18:17:7.087: Failed to reduce power usage by 11W (number of forced on devices: 8)
> +18:17:9.225: Failed to turn on device Stue, will retry later
> Comment:After reboot, PB kept turning on and off my heat pump "Stue". I'm nowhere near the target (5kWh) for the hour. Pump was configured as always on. The toggling stopped after raising the ceiling to 10kWh.
> +18:23:8.262: Sending log

---

<div class="post-metadata">

**Author:** ![Torbjorn\_Melbye](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torbjorn_melbye/32/18194_2.png) [@Torbjorn\_Melbye](https://community.homey.app/u/Torbjorn_Melbye)\
**Post date:** [October 18, 2022, 9:55pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/179 "2022-10-18T21:55:07Z")

</div>

Not sure I understand what you mean here.

> [@frodeheg](#):
>
> Then reduce its reliability counter and mark it as problematic

If I create a report for the devices, they all give a reliability of 1. Guess this means 100%.

I can’t see any way to reduce this or mark a device as problematic?

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [October 18, 2022, 10:07pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/180 "2022-10-18T22:07:48Z")

</div>

Just to check, The priorities you observed, did they by any chance fit with the priorities for another mode?

---

<div class="post-metadata">

**Author:** ![Torbjorn\_Melbye](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torbjorn_melbye/32/18194_2.png) [@Torbjorn\_Melbye](https://community.homey.app/u/Torbjorn_Melbye)\
**Post date:** [October 18, 2022, 10:11pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/181 "2022-10-18T22:11:32Z")

</div>

No, same priority for all modes. Don’t use the mode function at all actually, but checked the settings for them anyway, and they are in the same order.

---

<div class="post-metadata">

**Author:** ![frodeheg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frodeheg/32/49010_2.png) [@frodeheg](https://community.homey.app/u/frodeheg)\
**Post date:** [October 18, 2022, 10:16pm UTC](https://community.homey.app/t/app-pro-piggy-bank/66677/182 "2022-10-18T22:16:07Z")

</div>

Ok. If it was related to lost signals then it could be a one time incident. If it doesn’t resolve then we probably should make a bug report at it here: [Issues · frodeheg/no.sparegris · GitHub](https://github.com/frodeheg/no.sparegris/issues)

[Previous page](https://community.homey.app/t/app-pro-piggy-bank/66677.md?page=8)

[Next page](https://community.homey.app/t/app-pro-piggy-bank/66677.md?page=10)
