Emoncms v11 stable release

This update, brings together a lot of work on the emoncms feed engines and related tools, as well as improvements to menu’s & the admin interface.

I’ve put together a short video of the main changes here:

image

Visible changes to the end user:

  • Improved CSV export support to include standard fixed interval and time-zone aligned daily, weekly, monthly and annual intervals (uses new back-end implementation). Option to return result with or without averaging.

  • PHPTimeSeries averaging support

  • Feeds can now be created directly on the feeds page (via an extended version of the virtual feed creation dialog). See: https://github.com/emoncms/emoncms/pull/1751

  • New CSV import tool including interval detection available on the feeds page. Efficient import via new backend post_multiple engine method. See: https://github.com/emoncms/emoncms/pull/1752

  • New interactive feed API documentation page available from the feeds page

  • Improved support for updating existing data in PHPFina and PHPTimeseries

  • Support for averaging in rawdata, bargraph and multigraph visualisations

  • Fixed support for showing last day, week, month, year in visualisations built using delta mode option on cumulative kWh feeds (see below), while some apps implemented this already, this update provides consistent support across all visualisations.

  • Faster implementation of virtual feeds and data results that are consistent with the underlying source feed data, fixes some slightly strange behaviour seen with virtual feeds that may have arisen due to evolution of emoncms after virtual feeds were first introduced. See: https://github.com/emoncms/emoncms/pull/1748 & https://github.com/emoncms/emoncms/pull/1746

  • Wider time format support when requesting data both in terms of request parameters and format of the timestamps returned, see: https://github.com/emoncms/emoncms/pull/1767

  • Improvements to the menu system including: animations, shadows and other styling changes, top menu auto hides when scrolling down, thanks to @chaveiro

  • Admin page improvements including, additional disk stats, improved write load implementation, cpu, machine, bios and current user info, thanks to @chaveiro

  • Translation work thanks to @thib66

Back-end changes for the interest of developers

  • Large change to PHPFina, PHPTimeSeries and MysqlTimeSeries feed engine implementation providing a single method for requesting feed data with options to specify returning the result as fixed interval, timezone aligned daily, weekly, monthly, annual, with or without averaging and output formats json or csv. This reduces the amount of code duplication required to provide these outputs with separate methods. Focus is on data request behaviour consistency across all options, enabling easier cross feed comparison and data manipulation in emoncms graphs, apps and outside of emoncms via CSV export.

  • Related updates to API documentation, feed.js library, apps, dashboard and graph module.

  • Refactoring of visualisations and apps to use new feed API, feed.js and vis.helper.js, improving code reuse and reducing use of legacy code.

  • Removed deprecated graph visualisation (replaced with graph module), backwards compatibility fix included.

  • Switch to using server side calculation of kWh/d, month, year from cumulative kWh feeds (delta mode) - fixes missing current day, week, month when using delta mode across all visualisations and removes code required to otherwise achieve the same result in each app. See: https://github.com/emoncms/emoncms/pull/1761

  • Removal of feed datatype field (deprecated). See: https://github.com/emoncms/emoncms/pull/1736

  • php7.0 compatibility mode for remember me, thanks to @mabi

  • support for sendmail in email.php, thanks to @federicobriata

  • New post_multiple methods in phpfina and phptimeseries engines for more efficient csv import, these methods replace the bulk buffer prepare and save and post methods reducing duplication. Improves support for data updates for these engines. E.g can import blocks of data via new CSV import tool to replace existing data in the feed.

  • Removal of separate insert_data and update_data feed_model methods, both insert and update can now be done via post method. See: https://github.com/emoncms/emoncms/pull/1769

Thank you to everyone who helped test this release!

5 Likes

Just updated to this from the master branch. Looking forward to trying it out.

1 Like

Thanks for the update, I installed this last weekend & noticed the animations on the menu.
I had to re-create (i.e. de-select, then reselect the data points) all of my graphs, they appeared to be configured correctly however the data was not correctly displayed, it was as though there was some issue with the y axis values. One annoying side effect of this was that all of my custom line colours were deleted and I ended up with the pre-assigned colours because once a custom line colour is set, the values cannot be viewed (i.e. the RGB values are all zero).
Hopefully you can resolve this issues from my vague notes so others are not effetced.

I’ve just updated to 11.0.5 and on my dashboards, all of the “kwhperiod” visualisation are showing 0.

I tried adding a new one to the dashboard and specified a year as the period and it still shows 0. It is most definitely not zero :slight_smile:

Wondering if it is related to either:

or

I also just updated to 11.0.5 and am no longer able to load data into a feed with timestamps into the future. I use a Solcast forecast and was successfully loading a five day forecast using the feed API:

http://local_host_ip/emoncms/feed/update.json?id=xxx&time=forecast_time&value=forecast_output&apikey=local_host_write_apikey

I did have to edit the file at
/var/www/emoncms/Modules/feed/engine/PHPFina.php
to allow this.

Since I have upgraded to 11.0.5, the feeds do not appear to accept data with a timestamp that is in the future. The API call does not return any error and the Emoncms log is also silent, but no future data is visible on any graphs. Can anyone identify how to get the feeds in V11 to accept timestamps in the future?

Hello @Jaddache I cant seem to replicate the issue that you are seeing with posting data in the future here, it seems to work fine for me and I’ve been doing similar with solcast with no apparent issue.

Are you seeing this on a raspberryPi based system? are you using redis and the feedwriter service etc?
Might be worth trying a restart of the feedwriter service…

Thanks @Greebo will look into that.

@MikeB do you remember what version of emoncms you upgraded from?

I’ve updated the emoncms app module to fix an issue with dataplicity which was blocking the config.js script, see: Dataplicity Wormhole & EmonCMS Errors - #10 by TrystanLea. @MyForest this might affect your heat pump app? Just needs a filename change from config.js to appconf.js.

Tristan, it would have been the previous stable release. I know there’s not a lot of info to help you, I just accepted it as a feature and fixed my graphs. Then yesterday saw this in my weekly email topic update.

One other issue was that on this and the previous stable release I’ve had difficulty downloading a backup with the download link not working using the Edge browser. Eventually after many attempts of creating & downloading, after a backup creation I right clicked and opened in a new tab which then successfully downloaded a file, though I didn’t check to see if it was valid data because I don’t know to check.

1 Like

Thanks @MikeB

I just noticed this thread. I’ve done an update and now get this error on any displays using khwperiod values.

image

I’ve another thread I posted this morning with more info Displays failing after running EmonPI Full update - #2 by Mike_Henderson

I did a forced refresh of the page in my browser (Ctrl-F5 for Chrome) and that error went away, but my kwhperiod values are all now 0 as posted above…

1 Like

@greebo good call there. I’ve done that and can now open displays again. As you say, with values of zero.

1 Like

Thanks Il look into the kwhperiod issue

Thanks for the heads-up @TrystanLea , I’ve patched it.

1 Like

Hi @TrystanLea ,

Yes it is a raspberry pi based system using the emonSD-08May21 image.

Further investigation reveals it is only one particular feed, a daily time series that I was using to display daily solcast kWhr totals. The feed with the 30min solcast forecast is working and displaying as expected.

I probably need to go back to my actual desired outcome which is to display historical actual solar and consumption kWh totals and forecast daily solar kWh totals on a single bar chart with the bars covering the period of 00:00 - 00:00 local time. I use nodered to source and load the solcast 30min forecast into a feed out to 5 days ahead - this is still working with 11.0.5. I calculate the associated daily kWh forecast totals along the way and was loading these into a separate feed (this is the one that does not appear to be accepting new data). The historical daily totals are calculated using a Power to kWh/d input process.

I created a new feed (86400 sec interval) and used the new data import functionality to copy the values from the problematic feed (this works really well by the way). This new feed did initially accept the 4 days of future values which I graphed successfully 30 min ago but now the future values are no longer visible on a graph.

Update: Rebooted the pi, swapped to another browser and cleared out all its caches this morning and the new feed now appears to be accepting data and displaying future data in graphs. :thinking:

1 Like

@TrystanLea just about to try and update from 10.2.7 on my PVE container. This is still on Buster.

What might have changed such that a git pull of all of the repos might not fix?

Anything changed in the install scripts?

What package versions is V11 expecting (PHP etc)?

I’m guessing this might be a new Module I need to pull in. Should I delete the old vis module?

also tried stable version and master …
still tried reboot + cleaning cache
on dashboard → i still get errro as I’m using much of the period values …

and got error:


EmonCMS Error
-------------
Message: TypeError: result is null
Route: Modules/dashboard/widget/kwhperiod/kwhperiod_render.js?v=3
Line: 746
Column: 34

and if i go over … without login, then i get it but all periodkwh are empty …
if you need more infos - let me know