Sorry if this is a silly question …
What’s the best way to replace sensors in emoncms?
Specifically, I have a bunch of Govee T&H sensors that I pick up in Home Assistant and forward to emoncms. One sensor recently failed and has been replaced by Govee under warranty. The names I’ve used for the sensors (and inputs in emoncms) include part of the MAC address since it’s unique. But my feeds have functional names like Living_Room_Temperature. So I want to replace the physical sensor associated with the functional feed. And ideally keep the history intact.
Presumably you’re using EmonCMS history to send the data from Home Assistant to EmonCMS.
If you can make the Home Assistant name of the new sensor to be the same as the old one then you don’t need to do anything else.
If that isn’t possible then all you need do is add a log function to the new input to log to the original feed.
The name of the HA sensors includes part of the MAC address to make them unique, as I said. So that isn’t possible.
OK this sounds doable. Before I create a new log function from the new input, I presumably need to stop the old log function from the old input logging to the feed? (It’s still there, just producing the wrong values).
I feel very stupid because I can’t see how to do that? Presumably I need to go to ‘Configure Input processing’ but I can’t see what to do then?
Yes, you do want to stop the old sensor from logging.
To do that go to setup/inputs. Find the old sensor in the list, click on the spanner at the right hand end of the relevant input. That will show you what processes are happening on that input (probably just the one logging), then delete the log process. It’s not irreversible; you can recreate it if you delete the wrong one.
OK I did that and the feed stops updating. Then I go to the new input and try to create a new Log_to_feed process but it says “ERROR: Feed could not be created, feed already exists”. So I’m stuck again, I’m afraid.
Edit: Never mind. I discovered I can select a specific feed from a list.