# Emoncms app module v2.9.x (database upgrade required)

**URL:** <https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674>\
**Category:** Emoncms\
**Created:** [10 September 2024 14:13 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674 "2024-09-10T14:13:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![TrystanLea](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/trystanlea/32/31_2.png) [@TrystanLea](https://community.openenergymonitor.org/u/TrystanLea)\
**Post date:** [10 September 2024 14:13 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/1 "2024-09-10T14:13:21Z")

</div>

Version 2.9.5 of the emoncms app module is available currently on the master branch, will merge to stable in a week or so time.

This is a big update, with some exciting Heat pump app developments and also some less exciting but important database changes.

- The `app_config` table which stored all app configuration as a single json has now been replaced with a new `app` table. Each app now has a unique id (rather than being identified by it’s name and user only). This makes it easier to link apps to wider datasets such as per-processed daily heatpump app data. It also makes it a lot easier to change the menu name entry.

- When you update the app module, make sure to run Admin \> Update \> Update Database to create the new database. The module will automatically migrate your existing apps and settings to the new format.

The app name and public status can then be changed from each app’s configuration page, e.g:

![image](https://community.openenergymonitor.org/uploads/default/original/3X/0/5/0511837f343ebb318ba24137f0ab9a0de95479b5.png)

- The second more interesting part of this update is that the My Heatpump app now supports the option to show daily hot water, space heating, when running and combined stats all from the daily view. The SCOP’s also match up with those on [HeatpumpMonitor.org](http://HeatpumpMonitor.org) as it can now use the more advanced data processing pipeline that were using on [HeatpumpMonitor.org](http://HeatpumpMonitor.org).

E.g, Combined:

 ![image](https://community.openenergymonitor.org/uploads/default/original/3X/5/7/578ab9da3009acb1af3688a4512d90754807d00c.png)

Space heating only:

 ![image](https://community.openenergymonitor.org/uploads/default/original/3X/9/f/9fbcd330369a1ab3de3eb6afb06191533cb3e84e.png)

Hot water heating only:

 ![image](https://community.openenergymonitor.org/uploads/default/original/3X/9/b/9b2822d8376ec98fb50e70d8ad3252678aeec032.png)

See my dashboard here for an example: [https://emoncms.org/midterrace/app/view?name=EcodanASHP](https://emoncms.org/midterrace/app/view?name=EcodanASHP)

This option has to be enabled in the My Heatpump app config. Once enabled you may have to wait a few minutes for the daily data to be processed. Keep the browser window open while it does this.

![image](https://community.openenergymonitor.org/uploads/default/original/3X/2/4/24f16038b3f3beb719294590ae97c752b2d40674.png)

This is an initial release of this feature, I will be refining it over the next week or so, including adding:

- Nice icons to toggle between hot water and space heating modes
- CSV export options
- More detailed stats section relating to the daily data.
- Option to show average indoor temperature, % carnot and other stats on the daily view
- Use of the pre-processed daily stats for the power view when you zoom out to keep the figures on that page accurate as you zoom out.
- Option to select particular years for full year stats

---

<div class="post-metadata">

**Author:** ![TrystanLea](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/trystanlea/32/31_2.png) [@TrystanLea](https://community.openenergymonitor.org/u/TrystanLea)\
**Post date:** [10 September 2024 14:26 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/2 "2024-09-10T14:26:07Z")

</div>

When enable daily pre-processor is first enabled and you click ‘Launch App’ the app will show the following message as it does the pre-processing. I will be automatically processing the data of accounts linked to [HeatpumpMonitor.org](http://HeatpumpMonitor.org) over the next few days so you may or may not see this message depending on when you load the dashboard or try to use this feature…

 ![image](https://community.openenergymonitor.org/uploads/default/original/3X/a/4/a4c8bb9593646db8b926e8733c42f605544375d8.png)

---

<div class="post-metadata">

**Author:** ![Timbones](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/timbones/32/20308_2.png) [@Timbones](https://community.openenergymonitor.org/u/Timbones)\
**Post date:** [10 September 2024 21:48 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/3 "2024-09-10T21:48:40Z")

</div>

> [@TrystanLea](#):
>
> The second more interesting part of this update is that the My Heatpump app now supports the option to show daily hot water, space heating, when running and combined stats all from the daily view.

This feature requires **redis** support, right? (I found when debugging the error I got)

---

<div class="post-metadata">

**Author:** ![TrystanLea](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/trystanlea/32/31_2.png) [@TrystanLea](https://community.openenergymonitor.org/u/TrystanLea)\
**Post date:** [10 September 2024 22:06 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/4 "2024-09-10T22:06:10Z")

</div>

the redis part is only used to lock the process, I can disable that lock if redis is not present if you like? would just need an if redis check here [app/apps/OpenEnergyMonitor/myheatpump/myheatpump\_model.php at master · emoncms/app · GitHub](https://github.com/emoncms/app/blob/master/apps/OpenEnergyMonitor/myheatpump/myheatpump_model.php#L98)

---

<div class="post-metadata">

**Author:** ![TrystanLea](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/trystanlea/32/31_2.png) [@TrystanLea](https://community.openenergymonitor.org/u/TrystanLea)\
**Post date:** [10 September 2024 22:14 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/5 "2024-09-10T22:14:31Z")

</div>

I’ve just added these checks in to make redis optional and also pushed up some other fixes and improvements (v2.9.6).

---

<div class="post-metadata">

**Author:** ![Timbones](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/timbones/32/20308_2.png) [@Timbones](https://community.openenergymonitor.org/u/Timbones)\
**Post date:** [11 September 2024 10:35 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/6 "2024-09-11T10:35:46Z")

</div>

Working without redis now, thanks.

![image](https://community.openenergymonitor.org/uploads/default/original/3X/5/e/5ebc5733993f558f3bd6fcf4735744656648b9c1.png)

---

<div class="post-metadata">

**Author:** ![Andre\_K](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/andre_k/32/28208_2.png) [@Andre\_K](https://community.openenergymonitor.org/u/Andre_K)\
**Post date:** [11 September 2024 13:21 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/7 "2024-09-11T13:21:32Z")

</div>

This is great! Only partially related - what is the best practice for the space heating active flag? Should this be 1 when the compressor is on or also when only the pump is running. The distinction is relevant when the heat pump is cycling, which unfortunately is pretty much always for me. Whichever it is, it would be also useful to be able to further distinguish between the two space heating COPs. Compressor-on space heating COP would probably be closest to the manufacturer specs, whereas the full-cycle COP indicates the overall system efficiency.

---

<div class="post-metadata">

**Author:** ![TrystanLea](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/trystanlea/32/31_2.png) [@TrystanLea](https://community.openenergymonitor.org/u/TrystanLea)\
**Post date:** [11 September 2024 18:55 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/8 "2024-09-11T18:55:10Z")

</div>

Thanks for the app’s module pull request @Timbones, merged in!

---

<div class="post-metadata">

**Author:** ![TrystanLea](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/trystanlea/32/31_2.png) [@TrystanLea](https://community.openenergymonitor.org/u/TrystanLea)\
**Post date:** [11 September 2024 19:01 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/9 "2024-09-11T19:01:28Z")

</div>

Thanks @Andre_K, at the moment the heatpump\_ch (space heating flag) is not actually used for any of the calculations. It is purely used for changing the background during these periods on the graph.

The space heating stats are all generated based on: if the heat pump is running with electric consumption above the standby level (updated to 150W recently) AND that the heatpump\_dhw flag is zero. In that sense if your central heating pump and heatpump standby consumption is above 150W it will be included in space heating electric demand, if not it will just count towards standby consumption. Which is included in the combined stats.

I do want to make the standby power level a user configurable option. That should be quite straight forward.

---

<div class="post-metadata">

**Author:** ![Andre\_K](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/andre_k/32/28208_2.png) [@Andre\_K](https://community.openenergymonitor.org/u/Andre_K)\
**Post date:** [11 September 2024 19:11 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/10 "2024-09-11T19:11:08Z")

</div>

Having it user configurable would definitely be great. During standby (no pumps on and in sleep mode), my Vaillant uses around 12 W. This increases to around 20 W if there was any recent activity like a heating or DHW cycle. When only the circulation pump is on, I’m looking at around 60 W.

---

<div class="post-metadata">

**Author:** ![Timbones](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/timbones/32/20308_2.png) [@Timbones](https://community.openenergymonitor.org/u/Timbones)\
**Post date:** [11 September 2024 19:25 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/11 "2024-09-11T19:25:50Z")

</div>

Does standby threshold _need_ to be configurable, or just higher for all systems? Even the smallest heat pump is unlikely to be able to modulate below, say, 200W?

---

<div class="post-metadata">

**Author:** ![TrystanLea](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/trystanlea/32/31_2.png) [@TrystanLea](https://community.openenergymonitor.org/u/TrystanLea)\
**Post date:** [11 September 2024 20:50 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/12 "2024-09-11T20:50:41Z")

</div>

I’ve added a bit of an experimental option, if you enable % carnot on the power graph and then navigate back to the bar graph it shows the % carnot as points on the bargraph. Im interested in understanding why this varies from system to system and over time.

E.g Damon’s Viessmann Vitocal, why was there a dip in apparent heat pump effectiveness in March even though outside temperatures where higher than mid Jan… Why did the % carnot increase gradually at the start? The simulated carnot heat is dependent on the quality of the algorithm that I’ve written and this is also something I want to investigate in more detail.

 ![image](https://community.openenergymonitor.org/uploads/default/original/3X/3/f/3fa3f6d71b70c1d7b8a131dbb25fa9aa337f9002.png)

---

<div class="post-metadata">

**Author:** ![Andre\_K](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/andre_k/32/28208_2.png) [@Andre\_K](https://community.openenergymonitor.org/u/Andre_K)\
**Post date:** [11 September 2024 20:55 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/13 "2024-09-11T20:55:19Z")

</div>

Is the goal to include the periods where only the circulation pump is on into the CH COP or not? If my heat pump has its compressor active for 30 minutes at 1 kW electrical generating 5 kW of heat and then has the circulation pump circulating the warm water for another 60 minutes at 100 W, would you say I have a COP of 5 or 4.55?

Edit: Or in other words, is standby supposed to be compressor standby or complete standby?

---

<div class="post-metadata">

**Author:** ![Timbones](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/timbones/32/20308_2.png) [@Timbones](https://community.openenergymonitor.org/u/Timbones)\
**Post date:** [11 September 2024 22:40 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/14 "2024-09-11T22:40:14Z")

</div>

> [@Andre\_K](#):
>
> is standby supposed to be compressor standby or complete standby?

I find that when I’m looking at carnot heat estimates, setting the standby threshold too low results in it simulating heat that doesn’t exist when only the pumps are running…

 ![image](https://community.openenergymonitor.org/uploads/default/original/3X/9/b/9bd4c77d4fce28530ffacdc6d7dbc8c20fb52b89.png)

…so I set the threshold high enough for the carnot heat to better match measured heat:  
(150W for my system)

 ![image](https://community.openenergymonitor.org/uploads/default/original/3X/8/9/89e7e35fc28303cd6fb7a9ff10658b853bfde03d.png)

Remember, it’s not the _warmth_ of the flowing water that counts as “heat” but the **difference** between flow and return. So personally I would only count periods when the compressor is running as heating COP.

I don’t know if others follow this same approach; it’s the one that makes sense to me.  
At the end of the day, it’s the annual SCOP that really matters.

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [15 September 2024 09:53 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/15 "2024-09-15T09:53:23Z")

</div>

> [@TrystanLea](#):
>
> When you update the app module, make sure to run Admin \> Update \> Update Database

Can this be added as a popup prompt on update?

Equally, why can it not be triggered automatically?

---

<div class="post-metadata">

**Author:** ![TrystanLea](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/trystanlea/32/31_2.png) [@TrystanLea](https://community.openenergymonitor.org/u/TrystanLea)\
**Post date:** [20 September 2024 14:06 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/16 "2024-09-20T14:06:55Z")

</div>

> [@borpin](#):
>
> Can this be added as a popup prompt on update?
> 
> Equally, why can it not be triggered automatically?

It is highlighted in the menu bar… Yes probably could be automatic!

---

<div class="post-metadata">

**Author:** ![TrystanLea](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/trystanlea/32/31_2.png) [@TrystanLea](https://community.openenergymonitor.org/u/TrystanLea)\
**Post date:** [20 September 2024 14:11 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/17 "2024-09-20T14:11:56Z")

</div>

**App module version 2.9.8 is now available**

Changes:

- Cooling is now supported both in the power view and daily view. A feed providing a cooling flag can be used or alternative cooling can be automatically detected (if this mode is enabled, see app config). See: [Separate cooling from defrosts - #15 by TrystanLea](https://community.openenergymonitor.org/t/separate-cooling-from-defrosts/26200/15)

- Heat meter air errors are tracked in the daily statistics and are highlighted if present in the daily view. See [MyHeatpump app: Automated detection of heat meter air error - #13 by TrystanLea](https://community.openenergymonitor.org/t/myheatpump-app-automated-detection-of-heat-meter-air-error/26690/13)

- Daily view modes: Combined, When running, Space heating, Water heating and cooling now have icons, and these icons are highlighted when selected.

![image](https://community.openenergymonitor.org/uploads/default/original/3X/2/5/256da815d9661556b93cbba3943728a27a20d8e2.png)

---

<div class="post-metadata">

**Author:** ![Timbones](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/timbones/32/20308_2.png) [@Timbones](https://community.openenergymonitor.org/u/Timbones)\
**Post date:** [20 September 2024 14:34 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/18 "2024-09-20T14:34:18Z")

</div>

Where are these svg icons defined? I’m not getting them to load on [my system](https://emon.cryosphere.co.uk/ashp):

![image](https://community.openenergymonitor.org/uploads/default/original/3X/a/7/a7504ac7c595d8f2a1edf4c08364ce24e553b6b8.png)

---

<div class="post-metadata">

**Author:** ![TrystanLea](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/trystanlea/32/31_2.png) [@TrystanLea](https://community.openenergymonitor.org/u/TrystanLea)\
**Post date:** [20 September 2024 14:45 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/19 "2024-09-20T14:45:18Z")

</div>

Apologies they are in emoncms core, I forgot to mention that needs updating too

---

<div class="post-metadata">

**Author:** ![Timbones](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/timbones/32/20308_2.png) [@Timbones](https://community.openenergymonitor.org/u/Timbones)\
**Post date:** [20 September 2024 15:23 UTC](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674/20 "2024-09-20T15:23:51Z")

</div>

Okay, got that now thanks.

Next: why is the “overlay” visible with no text, making the bar chart appear faded?  
It’s as if it’s recalculating the daily stats yet it’s not.

[Next page](https://community.openenergymonitor.org/t/emoncms-app-module-v2-9-x-database-upgrade-required/26674.md?page=2)
