NaN for emonpi power2

I was debugging a different issue with Paul B and came across this. My Value for power2 disappeared but just on the webpage.

The emonpi power1pluspower2 looks correct. And the Power2 looks correct in the emonhub.log:

Clearing cache or changing browsers doesn’t help. Tried reboot the emonPi. The most current update was to fix: Issue logging input to feed: “Error could not save process list Undefined” #541

Any thoughts?

The NaN value is due to that input not updating since a restart, hence the n/a. It appears the t1 input is the same too. It looks a lot like the issue when the inputs get duplicated following a reboot, I don’t suppose you have any additional inputs as well do you?

Are you able to subscribe to that topic via the commandline

mosquitto_sub -v -u ‘emonpi’ -P ‘emonpimqtt2016’ -t ‘emon/emonpi/power2’

(or can you see it node-red or openhab etc?)

Yes, that seems to be fine.

pi@emonpi(ro):~$ mosquitto_sub -v -u 'emonpi' -P 'emonpimqtt2016' -t 'emon/emonpi/power2'
emon/emonpi/power2 332
emon/emonpi/power2 322
emon/emonpi/power2 318
emon/emonpi/power2 323
emon/emonpi/power2 709

 

I’m not sure what this means. I wasn’t aware inputs were duplicated.
 

The t1 disappeared a few months ago. I stupidly assumed the sensor went bad. But I see a second t1 a few lines down.

And there is a second power2 also. How is this fixed?!?

Emoncms - input view (20161211).pdf (141.1 KB)

It has been reported a lot ever since since MQTT was used to post direct to emoncms, even with the old Nodes module, eg see Phantom Duplicated MQTT Topics after reboot

According to that thread you need to recreate all your processing in the new input and use that instead of the old one, So I hope it doesn’t happen too frequently, that could get real annoying real fast!

EDIT - Maybe stopping the data (stop mosquitto or emonhub) delete the new input, flush redis and restart the data again might revive it. Or if you do need to swap to the new input, you may be able to use the input api’s to fetch the old processlist and then post it to the new input, I haven’t tried it but it might be possible.

EDIT2 - Beware flushing redis can have unwanted effects on some feeds.

Once I started reading this thread it sounded familiar. I’ll keep reading!
 

I’ll say!

I’ll try (separately):

  1. recreate all your processing in the new input
  2. stopping the data (stop mosquitto or emonhub) delete the new input, flush redis and restart the data again might revive it
  3. Or if you do need to swap to the new input, you may be able to use the input api’s to fetch the old processlist and then post it to the new input

keep those fingers crossed!

All I did is copy the processing steps from the NaN Input to the Duplicate Input and all worked as expected. I deleted the NaN Input. All seems A-OK. Thank you @pb66 ! :slight_smile: