Emoncms v11.9.8 stable release

Emoncms v11.9.8 stable release is now available with updates to both Emoncms core and associated modules.

There are quite a few new features, improvements and security fixes in this release, see posts below for more details.

Emoncms.org is also mostly running these versions now as well.

Previous release: Emoncms stable release v11.7.4

3 Likes

Emoncms core 11.9.8:

List of commits: Release 11.9.8 · emoncms/emoncms · GitHub

:shield: Security Fixes


:rocket: Key Features

Translation System Enhancements: New JSON file based translation system, removal of Gettext dependency. This makes it quite a bit easier to use the different translations created for emoncms. Please see documentation here: emoncms/scripts/translation/readme.md at master · emoncms/emoncms · GitHub and issue here New JSON-based i18n system, Ongoing work · Issue #1931 · emoncms/emoncms · GitHub for more details. Thanks to @alexandrecuer for his work on the French translation.

See My Account > Language, to try this feature:

Process List Editor Enhancements: The process list editor has been refactored and improved, with a new Vue.js-based UI that supports group selection, copying, pasting of input processes. Thanks to @nchaveiro for the initial implementation which I then converted to Vue.js.

Support for input and feed processes with multiple arguments, e.g Power to kWh / custom minutes, which writes kWh per custom period such as half hourly. Thanks to @nchaveiro again for the initial work on this.

image

Feed Data Verification: A new feature to return the sha256sum of feed data for replication, ensuring data integrity. Used mostly to verify integrity of Emoncms.org replication and backups so far.

Email: The SwiftMailer dependency has been removed and replaced with a new native SMTP email class.

DevContainer Integration: The repository now includes .devcontainer files to simplify the development environment setup, thanks to @alexandrecuer


:sparkles: Improvements & Bug Fixes

  • PHP 8 & Deprecation Fixes: Fixes for PHP 8+ compatibility. Better handling of null values in input processing etc.

  • Code Formatting & Standards: Partial application (so far) of PSR2/12 coding standards for improved code consistency and readability.

3 Likes

Device module 2.3.3

Release: https://github.com/emoncms/device/releases/tag/2.3.3.

New feature to generate device templates from existing configurations and then import these custom templates to provision new devices:

Could this be used to generate daily max/min/average temperature feeds (i.e. a feed that is the daily maximum)? Could it be done as a post process?

It is probably best done as a post process. There are already max and min daily value input processors for input processors .. but not post processed I guess.

Oh, I’d missed those :frowning: Could they be added as a Post Process?

I’ve pushed a couple more features today to help with input management:

Simple button to clean inactive & un-configured inputs and devices: useful for clearing lots of spurious inputs, click on the leaf icon button on the top-right of the inputs page (this button only appears if there are inactive and un-configured inputs present):

Option to disable further input creation: Great for stopping continuous creation of spurious inputs and devices - if this issue is present. Button to disable further input creation can be found below the input list. Input creation can then be enabled easily by clicking on the ‘Enable Input Creation’ button.

1 Like

Technically yes with a bit of development work, and I agree it would be nice to have that option. Cant say when I might get to that though just yet.

1 Like

@Trystan - I did the update from the admin page from the previous release and sadly now get

Fatal error: Uncaught Error: Call to undefined function tr() in /var/www/emoncms/Modules/app/app_menu.php:70 Stack trace: #0 /var/www/emoncms/core.php(284): require() #1 /var/www/emoncms/index.php(384): load_menu() #2 {main} thrown in /var/www/emoncms/Modules/app/app_menu.php on line 70

Any ideas?

Hello @Bramco it sounds like the app module did not update to the latest version. Is there a chance that you had local changes that blocked the update of that module?

To resolve via SSH:

cd /var/www/emoncms/Modules/app
git status

If it’s stable do (alternatively git pull origin master).

git pull origin stable

If there are local changes you may need to remove them with:

git checkout .

@TrystanLea hi,

No local changes, can’t remember now if I built it using the instructions, or just downloaded the image.

I’m already on stable, so the git pull stable tells me I’m already on stable and doesn’t do anything. So I still get the error.

pi@emonpi:/var/www/emoncms/Modules/app $ git status
On branch stable
Your branch is up to date with 'origin/stable'.

nothing to commit, working tree clean
pi@emonpi:/var/www/emoncms/Modules/app $ git pull origin stable
From https://github.com/emoncms/app
 * branch            stable     -> FETCH_HEAD
Already up to date.

Simon

PS Apologies for the slow response, we’ve family here this weekend - so a little busy.

@TrystanLea

Trystan, any further thoughts on this? I could do with either fixing it or doing a rebuild - which obviously I’m not keen on doing again….

Simon

EDIT -

Not sure if this helps but here is something that an AI assistant had to say about the tr() function on line 70.

The `tr()` function is not a part of PHP; it is actually a function used in the Qt framework for internationalization, allowing applications to support multiple languages. In PHP, there is no built-in `tr()` function for this purpose.
emonSD version: emonSD-10Nov22

I’m seeing an OS update error.

Running apt-get update
Get:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease [15.0 kB]
Get:2 http://archive.raspberrypi.org/debian bullseye InRelease [39.0 kB]
Get:3 https://download.docker.com/linux/raspbian bullseye InRelease [26.6 kB]
Get:4 https://packages.sury.org/php bullseye InRelease [7,551 B]
Get:5 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf Packages [13.2 MB]
Get:6 http://archive.raspberrypi.org/debian bullseye/main armhf Packages [330 kB]
Get:7 https://download.docker.com/linux/raspbian bullseye/stable armhf Packages [59.8 kB]
Err:4 https://packages.sury.org/php bullseye InRelease
  The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <[email protected]>
Fetched 13.7 MB in 15s (887 kB/s)
Reading package lists...
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org/php bullseye InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <[email protected]>
W: Failed to fetch https://packages.sury.org/php/dists/bullseye/InRelease  The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <[email protected]>
W: Some index files failed to download. They have been ignored, or old ones used instead.

tr() function on line 70 is, after a bit of searching, to do with the new language version support.

But after a lot of checking updates etc. and checking the version with git, it still throws the error on line 70.

@TrystanLea would really appreciate some help on this…..

Simon

1 Like

Hello @Bramco

What do you see on the Admin > Components page for Emoncms core and the Apps module? It should look like this:

I think it might be that it’s Emoncms core that has not updated on your system @Bramco

Can’t see anything - all I get is the error the fatal error as above

Fatal error: Uncaught Error: Call to undefined function tr() in /var/www/emoncms/Modules/app/app_menu.php:70 Stack trace: #0 /var/www/emoncms/core.php(284): require() #1 /var/www/emoncms/index.php(384): load_menu() #2 {main} thrown in /var/www/emoncms/Modules/app/app_menu.php on line 70

So can’t see any pages at all.

Simon

If so, what can I do to update just the core?

try via SSH:

cd /var/www/emoncms
git status
git pull origin stable

OK So I get this….

pi@emonpi:/var/www/emoncms $ git status
On branch stable
Your branch is up to date with 'origin/stable'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   default-settings.ini

no changes added to commit (use "git add" and/or "git commit -a")
pi@emonpi:/var/www/emoncms $ git pull origin stable
remote: Enumerating objects: 1455, done.
remote: Counting objects: 100% (293/293), done.
remote: Compressing objects: 100% (107/107), done.
remote: Total 1455 (delta 200), reused 186 (delta 186), pack-reused 1162 (from 4)
Receiving objects: 100% (1455/1455), 1.37 MiB | 1.53 MiB/s, done.
Resolving deltas: 100% (920/920), completed with 30 local objects.
From https://github.com/emoncms/emoncms
 * branch              stable     -> FETCH_HEAD
   efcf93c3..995555e1  stable     -> origin/stable
Updating efcf93c3..995555e1
error: Your local changes to the following files would be overwritten by merge:
        default-settings.ini
Please commit your changes or stash them before you merge.
Aborting

Is it a problem with default settings?

Simon

PS Thanks for the help so far

EDIT - think we may begetting somewhere…..

I wanted to use the email functionality and put in a default email address. As far as I remember, I followed the instructions on the pop up for the email process.