I logged onto my local emonpi this morning and the Inputs page is broken - it constantly pops up with a series of alerts (as in the window.alert() popups that interrupt everything you’re doing). The alerts say:
“emon says: There was an error creating device: nodeid=emonpi message=Device exists”
“emon says: There was an error creating device: nodeid=emontx1 message=Device exists”
“emon says: There was an error creating device: nodeid=emonth5 message=Device exists”
“emon says: There was an error creating device: nodeid=kitchen_jk message=Device exists”
“emon says: There was an error creating device: nodeid=hotwater_jk message=Device exists”
And then repeats infinitely.
I don’t think anything changed since I was in there last (maybe last week?). I’ve been into the Admin section and done a Full Upgrade (unless I missed it in the upgrade log, there was nothing to upgrade).
I havent quite got to the bottom of what’s causing this issue to arise in the first place, the cache is essentially becoming out of sync with the mysql database. Clearing the cache to force a reload sorts it for now.
I’ve noticed this error happens after every power interruption (of which we have had 3 or 4 a week here lately!). I’m not sure if you also end up with lots of invalid inputs as well assuming you can get out of the error loop. I follow @TrystanLeaadvice and remove invalid inputs followed by Redis flush. Not a cure, but now easily managed. In the interim I am putting together a UPS for the rPi…
I just had this happen after a power outage. The power outage happened just before vacation/holiday what a PITA!
Anyway, I had this issue. After doing a flush, it duplicated the input from emonhub. Unfortunately I had a bunch of processing on those inputs. I used an sql client to update the new feeds with the processing rules. However, when I started the app I had the same issue and when I flushed redis again, it created the inputs again.
I ended up using the client command to flush before restarting the redis, redis-server, apache2 and emonhub services. This time it took.
I wonder whether it would hurt to put the redis-cli flushall command in to the apache2 script prior to starting apache?
Also, I don’t know what issues it might create, but I also wondered about making the fields, name & nodeid (and maybe userid?) unique?
I find forcing a reload of the web UI works for me. It is very annoying though. What I think is that it is an error on the display page rather than an underlying issue. Flushing REDIS should not cause the inputs to be recreated.