Demandshaper service not running

Hi,

I’ve been looking through but can’t see what i’ve got wrong, i don’t even know when it broke, am sure i updated and it was fine and then just noticed it not working as scheduling wasn’t correct.

If i manually run the demandshaper_run.php i get this below, which is the errors put in the log file.

The demand shaper UI works to extent but doesn’t look to be setting the timer on the OpenEVSE, no errors from it but no time change.

PHP Fatal error: Uncaught ErrorException: Undefined variable: userid in /opt/emoncms/demandshaper/devices/openevse.php:157
Stack trace:
#0 /opt/emoncms/demandshaper/devices/openevse.php(157): exceptions_error_handler()
#1 /opt/emoncms/demandshaper/demandshaper_run.php(243): openevse->auto_update_timeleft()
#2 {main}
thrown in /opt/emoncms/demandshaper/devices/openevse.php on line 157

Fatal error: Uncaught ErrorException: Undefined variable: userid in /opt/emoncms/demandshaper/devices/openevse.php:157
Stack trace:
#0 /opt/emoncms/demandshaper/devices/openevse.php(157): exceptions_error_handler()
#1 /opt/emoncms/demandshaper/demandshaper_run.php(243): openevse->auto_update_timeleft()
#2 {main}
thrown in /opt/emoncms/demandshaper/devices/openevse.php on line 157

Any ideas?