Integrations with EmonCMS energy data, not quite working

I am having some issues with energy monitoring/display within HomeAssistant…
my HA config.yaml ( extract is as follows )

sensor:
  - platform: emoncms
    api_key: !secret emoncms_api_key
    url: http://192.168.3.156/emoncms
    scan_interval: 30
    id: 1
    unit_of_measurement: "kWh"
    include_only_feed_id:
      - 21
      - 22
      - 48
      - 53
    sensor_names:
      21: "Primary Supp"
      22: "Salon Supp"
      48: "House Supp"
      53: "Car Charge"

Now the House supply and Car supply Kwh usage both work fine and make for interesting reading…
But the Primary and Salon Kwh supplies I cannot get to work.
when I try to select the sensor entities for house and salon,… they are not present,…

I have a sensor entry for salon, as follows:-

sensor.emoncms_salon_supply_kwh

but when I try to select it, I get the following error

Entity not defined

Check the integration or your configuration that provides:

* sensor.emoncms_salon_supply_kwh
* sensor.emoncms_primary_supply_kwh

Now, for information,… when I first installed the HA addon for emoncms,… I added ALL sensors,… I soon realised this was ‘overkill’ in what useful data was being shared so I pruned the list down to only those I required. Also there are many more sensors than the four I have actually listed being displayed within the HA energy setup form…

But even with the trimmed list,… I cannot select two of the energy sources I was hoping to track and display within HA.
Does anyone have any understanding of what my error maybe,… I have checked my feed ID’s and they are correct,… and display within Emoncms without any issues… its just it does not seem to get to HA,…

As Additional information,…
For added information,… these are some of the ‘additional sensors’ I am seeing, which do not work,… that I would like to remove,…
Screenshot from 2023-07-18 11-16-44

If I view ‘sensors’ from the HA settings menu…
I only get the following list

But if I go to add a consumption entry,… my list is as follows… ( not all enreies shown)
Screenshot from 2023-07-18 11-16-44

Screenshot from 2023-07-18 11-17-11

Is it possible to clear all emoncms entries and start again,… or is that a wipe dBase and start again job??
Many Tx to all

To delete sensors that came from EmonCMS integration from your ‘all sensor’ beginning and ‘start again’ …
I would comment out the above EmonCMS sensor block of code, and restart HomeAssistant. Once HA restarts and figures that some sensors are no longer associated with an integration, you should be able to delete any references to them in Developer/Statistics ‘Fix Item’ etc
Then re-activate the emoncms code block with the specific 'include_only_feed_id’s and restart HA?
… is my suggestion

MuzzaM,… Many tx for your suggestion…
Yes commented out all the EmonCMS feeds,… and deleted some 60 or so emon feeds…
This left me with 4 or so energy totals used within the energy dash board,… so removed these from dashboard, another restart,… and via developer setting menus, then deleted these entries to…
Another reboot,… and all ‘old’ EmonCMS entries have been removed,… another reboot.
Re-enabled Configure.xml entries for EmonCMS… another restart…
Waited a couple of hours… and YES!!!,… meaningful data does seem to be arriving and being displayed.
Many Tx for your help and suggestion…

1 Like