Community
OpenEnergyMonitor

Community

Errors on reboot following update ... Undefined index: nodeid in /var/www/emoncms/Modules/input/input_model.php:206

Hi

I recently changed to a new Pi and switched to emonSD-17Oct19 (Stable) image
Old data came across without any problem using USB sd card reader.
This morning I updated from admin to make sure all up to date and have some errors in log file

log entries

LAST ENTRIES ON THE LOG FILE
2020-05-22 08:32:24.600|ERROR|index.php|Not Authenticated|dashboard/view
2020-05-22 08:32:25.226|ERROR|index.php|Not Authenticated|input/view
2020-05-22 08:32:25.510|ERROR|index.php|Not Authenticated|feed/view
2020-05-22 08:33:26.187|ERROR|index.php|Not Authenticated|vis/list
2020-05-22 08:33:26.450|ERROR|index.php|Not Authenticated|config
2020-05-22 08:33:26.732|ERROR|index.php|Not Authenticated|postprocess
2020-05-22 08:34:26.933|ERROR|index.php|Not Authenticated|schedule/view
2020-05-22 08:36:28.369|ERROR|index.php|Not Authenticated|wifi
2020-05-22 08:36:28.484|ERROR|index.php|Not Admin|admin/view
2020-05-22 08:41:34.143|ERROR|index.php|Not Authenticated|dashboard
2020-05-22 08:41:34.680|ERROR|index.php|Not Admin|admin
2020-05-22 10:54:34.957|ERROR|index.php|Not Authenticated|feed/list
2020-05-22 11:14:38.149|WARN|emoncms_mqtt.php|Not connected, retrying connection
2020-05-22 11:14:38.173|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0
2020-05-22 11:17:09.196|ERROR|index.php|Not Admin|admin/view
2020-05-22 11:17:09.257|WARN|emoncms_mqtt.php|Not connected, retrying connection
2020-05-22 11:17:09.297|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0
2020-05-22 11:17:09.395|ERROR|emoncms_mqtt.php|ErrorException: Undefined index: nodeid in /var/www/emoncms/Modules/input/input_model.php:206
Stack trace:
#0 /var/www/emoncms/Modules/input/input_model.php(206): exceptions_error_handler(8, 'Undefined index...', '/var/www/emoncm...', 206, Array)
#1 /var/www/emoncms/Modules/input/input_model.php(183): Input->redis_get_inputs(1)
#2 /var/www/emoncms/scripts/services/emoncms_mqtt/emoncms_mqtt.php(312): Input->get_inputs(1)
#3 [internal function]: message(Object(Mosquitto\Message))
#4 /var/www/emoncms/scripts/services/emoncms_mqtt/emoncms_mqtt.php(142): Mosquitto\Client->loop()
#5 {main}

Don’t worry about the authentication errors, this is just you viewing pages when not logged in.

The error quoted above is interesting - does it occur once or every connection?

What is your setup? emonPi, emonBase? Do you have any non-emoncms MQTT inputs?

for reference

@Gwil @TrystanLea

[edit]
Should the test be isset()?

I remember adding that line in, and it fixed the issue that it was designed to fix at the time, though I cant remember the exact reasoning, it was to do with the duplicate inputs issue I believe, in @ian’s case yes it looks like an isset check is needed.

@ian is this a reoccurring error?

I have just checked log.

It is not a reoccurring issue.

2 Likes

Good to hear, the missing nodeid will likely have been set now later in the script, avoiding further errors.