I’ve used WeeWX to capture data from my weather station for many years, a couple of years ago I found the Weewx-emoncms plugin for WeeWX that sends the weather data over to EmonCMS using a http call. This has worked great for years, until sometime last week. When it broke without me noticing. Not sure what’s causing it, but it seems that EmonCMS is rejecting (or erroring on) the http call,
Feb 15 22:30:36 server7 python3[633267]: weewx[633267] DEBUG weewx.restx: EmonCMS: Failed upload attempt 2: Server returned ‘ notice: undefined variable: jsondatalc in /var/www/emoncms/modules/input/input_methods.php on line 60
ok’
Feb 15 22:30:42 server7 python3[633267]: weewx[633267] DEBUG weewx.restx: EmonCMS: Failed upload attempt 3: Server returned ‘ notice: undefined variable: jsondatalc in /var/www/emoncms/modules/input/input_methods.php on line 60
ok’
Feb 15 22:30:42 server7 python3[633267]: weewx[633267] ERROR weewx.restx: EmonCMS: Failed to publish record 2021-02-15 22:30:00 GMT (1613428200): Failed upload after 3 tries
Line 60 in the input_methods.php looks like this - unset($jsondataLC[‘time’]);
I can’t see jsondataLC mentioned anywhere else, but then I’m no Python expert!
The http call being made from the WeeWX server looks like this -
I have the same setup where weewx sends my VantagePro data to emoncms (15 minute archive).
For several weeks, maybe longer, I have noticed in the weewx log three failed attempts to send data from weewx to emoncms:
DEBUG weewx.restx: EmonCMS: Failed upload attempt 1: Server returned ‘ #012Notice: Undefined variable: jsondataLC in /var/www/emoncms/Modules/input/input_methods.php on line 60 #012ok’
But in spite of this message, the data is still being sent correctly and on time. So, I haven’t worried about this until I saw this post.
I am not a programmer so I need some help on how to fix this. I can comment out the line but don’t understand what is meant by “You will need to revert the change before you can do an update though.” Does this mean that a full update will replace the modified version with the old one?
Sorry for the ignorant question but I want to be sure what I’m doing.
Thanks for the excellent graphing capabilities in emoncms–that’s why I export my weewx data to it.
No, I think @borpin is saying we will need to add the line back in before running an EmonCMS update, otherwise the update may break or not work correctly.