MYSQL Memory (RAM data lost on power off)

I have a Raspberry PI 4 loaded with EmonCMS Version: low-write 10.2.7
I have 4 Relay outputs using a OONO 4 SPDT 10Amp Power Relay Module.
I really don’t need to log data, but that is the only way I could use
the built in Dashboard button widget.

Has anyone successfully log to MYSQL Memory (RAM data lost on power off)??

Is there another way to use button widget without logging to feed?
MYSQL Memory1 MYSQL Memory3

Hello @dlmpryor I assume you were seeing an error when trying to create the feed, saying that something was undefined?

I’ve pushed a fix for this issue up to the emoncms master branch. What kind of system do you have are you familiar with git, pulling in changes and switching branches?

The steps in short are:

cd /var/www/emoncms
git checkout master
git pull origin master

You may need to restart the following services as well:

sudo service emoncms_mqtt restart
sudo service feedwriter restart

Hello Trystan,
Thanks for your reply.
After pushing the fix, my Emoncms PI Inputs are stuck at Loading.
No worries, it is a test PI that I setup for development and testing.

I tried to include as much information as I could think of.

I appreciate your time if you think it is important. Leaving it log to PHPFINA feed is working okay.

This was the original Error when I tried to create a Feed: “MYSQL Memory (RAM data lost on power off)”
Error before I pushed the fix :Feed could not be created.
So I could not even create the MYSQL Memory feed.
After pushing the fix, Inputs stuck at Loading

Following are the commands I ran using putty SSH:

cd /var/www/emoncms

[email protected]:/var/www/emoncms $ git checkout master
Branch ‘master’ set up to track remote branch ‘master’ from ‘origin’.
Switched to a new branch ‘master’

sudo git pull origin master
[email protected]:/var/www/emoncms $ git pull origin master
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Total 6 (delta 5), reused 6 (delta 5), pack-reused 0
Unpacking objects: 100% (6/6), done.
Intentionally removed colon from url link below to avoid extra data in this post.
From https//github.com/emoncms/emoncms

  • branch master → FETCH_HEAD
    815a630d…67880e0e master → origin/master
    Updating 815a630d…67880e0e
    Fast-forward
    Modules/feed/engine/MysqlTimeSeries.php | 7 ++±—
    1 file changed, 3 insertions(+), 4 deletions(-)

sudo service emoncms_mqtt restart

sudo service feedwriter restart

After running scripts:
The result is that Inputs disappeared and are stuck at Loading:
I also restarted the Emoncms PI. No change, stuck at Loading ??

I tried to Edit, and they are there, Node 1:relays. And Node emontx3.

Feeds still there but NULL.

Emonhub is still Publishing Data.

2021-03-01 23:58:17,441 DEBUG SerialDirect 479 NEW FRAME : 132.82 132.88 0.02 0.01 0.00 0.00 0.01 0.01 0.05 6.91 6.91 93.20 59.99 25.00 10.00 0.00 0.00 44330.00 0 0 75.43 36.43
2021-03-01 23:58:17,442 DEBUG SerialDirect 479 Timestamp : 1614643097.441472
2021-03-01 23:58:17,442 DEBUG SerialDirect 479 From Node : 8
2021-03-01 23:58:17,442 DEBUG SerialDirect 479 Values : [132.82, 132.88, 0.02, 0.01, 0, 0, 0.01, 0.01, 0.05, 6.91, 6.91, 93.2, 59.99, 25, 10, 0, 0, 44330, 0, 0, 75.43, 36.43]
2021-03-01 23:58:17,442 DEBUG SerialDirect 479 Sent to channel(start)’ : ToEmonCMS
2021-03-01 23:58:17,442 DEBUG SerialDirect 479 Sent to channel(end)’ : ToEmonCMS
2021-03-01 23:58:17,625 DEBUG MQTT Publishing: emon/emontx3/V1 132.82
2021-03-01 23:58:17,626 DEBUG MQTT Publishing: emon/emontx3/V2 132.88
2021-03-01 23:58:17,626 DEBUG MQTT Publishing: emon/emontx3/CT1 0.02
2021-03-01 23:58:17,627 DEBUG MQTT Publishing: emon/emontx3/CT2 0.01
2021-03-01 23:58:17,627 DEBUG MQTT Publishing: emon/emontx3/CT3 0
2021-03-01 23:58:17,627 DEBUG MQTT Publishing: emon/emontx3/CT4 0
2021-03-01 23:58:17,628 DEBUG MQTT Publishing: emon/emontx3/CT5 0.01
2021-03-01 23:58:17,628 DEBUG MQTT Publishing: emon/emontx3/CT6 0.01
2021-03-01 23:58:17,628 DEBUG MQTT Publishing: emon/emontx3/totI 0.05
2021-03-01 23:58:17,629 DEBUG MQTT Publishing: emon/emontx3/W 6.91
2021-03-01 23:58:17,629 DEBUG MQTT Publishing: emon/emontx3/W1 6.91
2021-03-01 23:58:17,629 DEBUG MQTT Publishing: emon/emontx3/temp1 93.2
2021-03-01 23:58:17,630 DEBUG MQTT Publishing: emon/emontx3/freq 59.99
2021-03-01 23:58:17,630 DEBUG MQTT Publishing: emon/emontx3/temp2 25
2021-03-01 23:58:17,630 DEBUG MQTT Publishing: emon/emontx3/humidity 10
2021-03-01 23:58:17,631 DEBUG MQTT Publishing: emon/emontx3/pressure 0
2021-03-01 23:58:17,631 DEBUG MQTT Publishing: emon/emontx3/gas 0
2021-03-01 23:58:17,631 DEBUG MQTT Publishing: emon/emontx3/altitude 44330
2021-03-01 23:58:17,631 DEBUG MQTT Publishing: emon/emontx3/DI1 0
2021-03-01 23:58:17,632 DEBUG MQTT Publishing: emon/emontx3/DI2 0
2021-03-01 23:58:17,632 DEBUG MQTT Publishing: emon/emontx3/temp3 75.43
2021-03-01 23:58:17,632 DEBUG MQTT Publishing: emon/emontx3/hum3 36.43
2021-03-01 23:58:17,633 INFO MQTT Publishing ‘node’ formatted msg
2021-03-01 23:58:17,633 DEBUG MQTT Publishing: emonhub/rx/8/values 132.82,132.88,0.02,0.01,0,0,0.01,0.01,0.05,6.91,6.91,93.2,59.99,25,10,0,0,44330,0,0,75.43,36.43
2021-03-01 23:58:18,352 DEBUG SerialDirect 480 NEW FRAME : 132.60 132.67 0.02 0.01 0.00 0.00 0.01 0.01 0.05 7.16 7.16

[interfacers]

This interfacer manages the RFM12Pi/RFM69Pi/emonPi module

[[SerialDirect]]
Type = EmonHubSerialInterfacer
[[[init_settings]]]
com_port = /dev/ttyAMA0
com_baud = 115200
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
nodeoffset = 8

[[8]]
nodename = emontx3
[[[rx]]]
names = V1, V2, CT1, CT2, CT3, CT4, CT5, CT6, totI, W, W1, temp1, freq, temp2, humidity, pressure, gas, altitude, DI1, DI2, temp3, hum3
datacode = 0
scales = 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
units =V,V,A,A,A,A,A,A,A,W,W,C,F,C,%,P,G,A,p,p,F,C

Thanks @dlmpryor
Could you see if any errors are returned if you run:

look at the input list api directly:

emoncms/input/list.json

The result is a screenshot as follows:

Thanks @dlmpryor the first screenshot looks fine, so must be something else. Can you check the console log in Chrome developer tools to see if there are any errors shown? The keyboard short cut is Ctrl + Shift + i

You could try deleting all of the mysql memory feeds that you originally created as well, perhaps they are tripping it up.

Thanks Trystan,

That’s was it, a Browser problem.
I usually try different browsers when troubleshooting issues, forgot this time. Thanks for the reminder.

Using Chrome 89.0.4389.72 (64-bit) stuck at Loading.
Works using Firefox 86.0 (64-bit).

Here is a partial screenshot of the Chrome Browser Errors. There are 50 errors total.
Clearing the Chrome Browser History Cleared the Errors.
All good!

1 Like

Good to know, those errors relate to a recent update, the update should have forced a cache reload but it looks like it may not have done in your case. Il double check why that may be, good to know it’s working for you now!