Emoncms not receiving data

Yes I’d read it which made me think of it. The JSON format for MQTT or the input API works well for me. Hopefully it will go into the next stable which must be due soon.

I had a similar ‘glitch’ where I had duplicate feeds (rather than inputs as in the screenshot above) after a reboot after a power outage. It occurred originally on v9.8.7, and the issue persisted through to v9.8.27 “low write” when I appear to have fixed it. I was never sure how it occurred, but after every reboot the annoying duplicate feeds names came back. I’m posting in this thread in case it helps anyone else…. the symptoms are the same, the apps and dashboards fail to work because they are linked to feeds that don’t get updated.
With the original issue I deleted the feeds in the GUI, but could not recreate them as the system said they 'already existed’. The solution to this was

  • login to mysql with ‘mysql –p –u emoncms’, then ‘use emoncms’ then ‘select * from feeds’ and delete the offending ones
  • delete all files under /var/lib/phpXXXX for those feeds
  • recreate the feeds on the GUI, and point any dashboards to the new feeds (which will now have different IDs

After every reboot, the system still failed to work because the old deleted feed-ids seemed to come back (even though they weren’t in the SQL database and the inputs were being updated using names rather than ids). I discovered that on every reboot if I went into the administration page and pressed the ‘flush redis keys’ button, then the correct feed-ids were restored. Even after a ‘redis-cli FLUSHALL’ the issue still reoccurred after a reboot. The eventual solution that worked for me was to delete /var/lib/redis/dump.rdb.
I’ve now got a battery backup system based on a couple of 18650 cells from an old laptop, I hope that will avoid power outages in the future.