IGNORE: Unable to view graphs from local and getting errors

When I view any page on my emonPi, I see the following at the top:

uch file or directory in /opt/emoncms/modules/demandshaper/demandshaper-module/demandshaper_model.php on line 58

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/emoncms/modules/demandshaper/demandshaper-module/demandshaper_model.php on line 59

and I can’t see any feed graphs anymore.

I know the feeds are working because I am accessing them OK from Home Assistant.

The only changes I’ve made from the stock emonSD is that I have configured emonhub and emoncms to use HA’s MQTT server in preference to the local one.

After doing some more digging I see that there are loads of missing files (e.g. the whole of the /home/pi/data hierarchy), so I’ve restarted with a clean SD. It’s no bother because all the data is consumed by HA and stored in influxdb.