jkeljo / hacs-greeneye-monitor

HACS version of the Home Assistant Core greeneye_monitor component. For beta-testing and faster deployment of changes.
MIT License
6 stars 2 forks source link

Cannot See Monitor Settings or add to Energy Dashboard #23

Closed walkeritgtech closed 1 year ago

walkeritgtech commented 1 year ago

Configuration

Hi there,

New GEM owner here with a new unit, just installed. First thanks for the integrations, really appreciate how well everything works together. I started with the native integration before seeing this one on HACS, so I let it migrate my YAML config and then that portion from my configuration.yaml. So far so good, the monitors came up and data was coming in. I enabled all sensors and am excluding them all from Recorder, so they just hit Influx.

Describe the bug

I noticed two issues but wonder if they're related:

1) none of the kWH sensors are listed when I try to add them to Grid Consumption on the energy dashboard 2) When I click "configure" and "edit per-monitor options" I cannot enter the serial number of my GEM and there is nothing listed in the drop down. See attached screenshot.

2023-06-06_16-37-28

Also was wondering if maybe the migration from the built-in integration had a hiccup - so would removing and reconfiguring from scratch be worthwhile? Happy to help test whatever I can help with.

Debug log

I turned on debugging but didn't see anything of interest in the logs thus far:


2023-06-06 16:42:52.247 INFO (MainThread) [greeneye.monitor] Closing server on ('0.0.0.0', 7997)
2023-06-06 16:42:52.251 DEBUG (MainThread) [greeneye.monitor] queue consumer is getting canceled
2023-06-06 16:42:52.253 DEBUG (MainThread) [greeneye.monitor] Packet processor started
2023-06-06 16:42:52.280 INFO (MainThread) [greeneye.monitor] Server started on 0.0.0.0:7998
2023-06-06 16:42:57.353 INFO (MainThread) [greeneye.monitor] Discovered new monitor: 1234567
2023-06-06 16:42:57.523 INFO (MainThread) [greeneye.monitor] Configured 1234567 from settings API call.
2023-06-06 16:42:57.531 INFO (MainThread) [custom_components.greeneye_monitor.sensor] Set up sensors for new monitor 1234567
2023-06-06 16:42:57.532 INFO (MainThread) [custom_components.greeneye_monitor.number] Added configuration entities for new monitor 1234567
jkeljo commented 1 year ago

Thanks for the report!

Hmmm, yeah, that is weird. The serial numbers for that dropdown are pulled directly from the config entry for the integration, which would suggest that it didn't get populated correctly. Yet, the logs you show look like everything is working normally. Is that dropdown still empty if you go to it now? (FWIW, the only per-monitor options have to do with the time unit used by pulse counters to report their rate.)

For troubleshooting that part, it would be interesting to see both your old YAML config and the contents of .storage/core.config_entries, specifically the entry with "domain": "greeneye_monitor".

For the energy dashboard thing, are they still not showing up? It can take a little while for Home Assistant to recognize a new statistics-enabled entity. If they're still not appearing as options in the energy dashboard config, a look at their entries in .storage/entity_registry would be interesting.

Setting up from scratch with the HACS integration is worth a shot if things haven't sorted themselves out by now, though I'd love to see the YAML and the config entry that it created first, in case this is an issue with the migration code.

walkeritgtech commented 1 year ago

Ah, that may explain it. I don't have any pulse counters so nothing was enabled in my legacy yaml config, though it did create them. So not sure what I should be seeing here. I don't see anything odd in the files you mentioned but admittedly I'm very new to home assistant and python in general and still consider myself a beginner.

Given all that the only thing that gave me pause was in my legacy yaml config my serial number was entered with a leading zero but the integration created items do not, but I'm not sure that's germane as it might be just stripped out.

I still cannot add anything from the integration to the Energy Dashboard, they still are not showing up.

Here's the info you requested, thanks again. If nothing strikes you as being conclusive I can do a uninstall and reconfig, that seems like the next thing to try.

Original YAML

'''yaml # GEM greeneye_monitor: port: 7997 monitors:

I've attached the relevant sections from the other two files you mentioned, hoping there's something there.

Config_Entries_GEM.txt

Entity_Registry_GEM.txt

jkeljo commented 1 year ago

Okay yeah, the dropdown is empty because there are no pulse counters configured. I filed #24 to clean that up. I think that may be a quirk of the YAML migration, but by itself that's not a reason to re-setup from scratch.

Your config entries and registry both look fine, so I'm a little mystified as to what's going on with the energy dashboard. Are you seeing any sensors at all in the list? Note that the names you had in your YAML will only apply to the power sensors; the energy sensors will have names like sensor.gem_1234567_channel_1_energy until you go in and rename them in the UI.

walkeritgtech commented 1 year ago

I have about seven z-wave plug-in modules from Aeotec (Smart Switch 7 B plugs) that I see as available inputs in the energy dashboard for grid consumption and individual devices. I am tracking water consumption from a Moen Flo that appears to be working, so from what I can see it appears everything is copacetic on that front.

Here's the entity_registry for one of them fwiw, I realize this is probably too much and the kWH is going to be the most relevant but just in the interest of thoroughness:

''' { "aliases": [], "area_id": null, "capabilities": null, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": null, "entity_category": null, "entity_id": "switch.christmas_tree", "hidden_by": null, "icon": "phu:christmas-tree", "id": "703a7e6603826b561c11640245e87312", "has_entity_name": true, "name": "Christmas Tree", "options": { "conversation": { "should_expose": true }, "cloud.alexa": { "should_expose": true }, "cloud.google_assistant": { "should_expose": true } }, "original_device_class": null, "original_icon": null, "original_name": "", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-37-0-currentValue", "unit_of_measurement": null }, { "aliases": [], "area_id": null, "capabilities": { "supported_color_modes": [ "hs" ] }, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": null, "entity_category": null, "entity_id": "light.christmas_tree", "hidden_by": null, "icon": null, "id": "23f16e23f09c1ab0d265f6f1ba293ddf", "has_entity_name": true, "name": "Christmas Tree", "options": { "conversation": { "should_expose": true }, "cloud.alexa": { "should_expose": true }, "cloud.google_assistant": { "should_expose": true } }, "original_device_class": null, "original_icon": null, "original_name": "", "platform": "zwave_js", "supported_features": 32, "translation_key": null, "unique_id": "3475804637.11-38-0-currentValue", "unit_of_measurement": null }, { "aliases": [], "area_id": null, "capabilities": { "state_class": "measurement" }, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": null, "entity_category": null, "entity_id": "sensor.christmas_tree_electric_consumption_a", "hidden_by": null, "icon": null, "id": "cdc25b5d7526c0aa2933c001831690a4", "has_entity_name": true, "name": "Christmas Tree Electric Consumption [A]", "options": { "conversation": { "should_expose": false }, "cloud.alexa": { "should_expose": false }, "cloud.google_assistant": { "should_expose": false } }, "original_device_class": "current", "original_icon": null, "original_name": "Electric Consumption [A]", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-50-0-value-66817", "unit_of_measurement": "A" }, { "aliases": [], "area_id": null, "capabilities": { "state_class": "total_increasing" }, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": null, "entity_category": null, "entity_id": "sensor.christmas_tree_electric_consumption_kwh", "hidden_by": null, "icon": null, "id": "8432c88e3cd24ae4f86be138558ce318", "has_entity_name": true, "name": "Christmas Tree Electric Consumption [kWh]", "options": { "conversation": { "should_expose": false }, "cloud.alexa": { "should_expose": false }, "cloud.google_assistant": { "should_expose": false } }, "original_device_class": "energy", "original_icon": null, "original_name": "Electric Consumption [kWh]", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-50-0-value-65537", "unit_of_measurement": "kWh" }, { "aliases": [], "area_id": null, "capabilities": { "state_class": "measurement" }, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": null, "entity_category": null, "entity_id": "sensor.christmas_tree_electric_consumption_v", "hidden_by": null, "icon": null, "id": "3faf2e3c6edd5ecec8ed9c6d3d252fc6", "has_entity_name": true, "name": "Christmas Tree Electric Consumption [V]", "options": { "conversation": { "should_expose": false }, "cloud.alexa": { "should_expose": false }, "cloud.google_assistant": { "should_expose": false } }, "original_device_class": "voltage", "original_icon": null, "original_name": "Electric Consumption [V]", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-50-0-value-66561", "unit_of_measurement": "V" }, { "aliases": [], "area_id": null, "capabilities": { "state_class": "measurement" }, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": null, "entity_category": null, "entity_id": "sensor.christmas_tree_electric_consumption_w", "hidden_by": null, "icon": null, "id": "28c1299baeadd8808b5c1d5c476ec70d", "has_entity_name": true, "name": "Christmas Tree Electric Consumption [W]", "options": { "conversation": { "should_expose": false }, "cloud.alexa": { "should_expose": false }, "cloud.google_assistant": { "should_expose": false } }, "original_device_class": "power", "original_icon": null, "original_name": "Electric Consumption [W]", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-50-0-value-66049", "unit_of_measurement": "W" }, { "aliases": [], "area_id": null, "capabilities": null, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": null, "entity_category": "config", "entity_id": "update.christmas_tree_firmware_2", "hidden_by": null, "icon": null, "id": "34ec4d0a266c7e8c298f238b7e472922", "has_entity_name": true, "name": "Christmas Tree Firmware", "options": { "conversation": { "should_expose": false }, "cloud.alexa": { "should_expose": false }, "cloud.google_assistant": { "should_expose": false } }, "original_device_class": "firmware", "original_icon": null, "original_name": "Firmware", "platform": "zwave_js", "supported_features": 21, "translation_key": null, "unique_id": "3475804637.11.firmware_update", "unit_of_measurement": null }, { "aliases": [], "area_id": null, "capabilities": null, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": null, "entity_category": "diagnostic", "entity_id": "binary_sensor.christmas_tree_over_current_detected", "hidden_by": null, "icon": null, "id": "4fda26596db24f8a5ffda8f4e3022c9c", "has_entity_name": true, "name": "Christmas Tree Over-current detected", "options": { "conversation": { "should_expose": false }, "cloud.alexa": { "should_expose": false }, "cloud.google_assistant": { "should_expose": false } }, "original_device_class": "safety", "original_icon": null, "original_name": "Over-current detected", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-113-0-Power Management-Over-current status.6", "unit_of_measurement": null }, { "aliases": [], "area_id": null, "capabilities": null, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": null, "entity_category": "diagnostic", "entity_id": "binary_sensor.christmas_tree_over_load_detected", "hidden_by": null, "icon": null, "id": "cf44249bc480600352390b2696458d80", "has_entity_name": true, "name": "Christmas Tree Over-load detected", "options": { "conversation": { "should_expose": false }, "cloud.alexa": { "should_expose": false }, "cloud.google_assistant": { "should_expose": false } }, "original_device_class": "safety", "original_icon": null, "original_name": "Over-load detected", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-113-0-Power Management-Over-load status.8", "unit_of_measurement": null }, { "aliases": [], "area_id": null, "capabilities": null, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": null, "entity_category": "diagnostic", "entity_id": "binary_sensor.christmas_tree_over_voltage_detected", "hidden_by": null, "icon": null, "id": "5b5ea4e31ce92cbefd0d3242220edada", "has_entity_name": true, "name": "Christmas Tree Over-voltage detected", "options": { "conversation": { "should_expose": false }, "cloud.alexa": { "should_expose": false }, "cloud.google_assistant": { "should_expose": false } }, "original_device_class": "safety", "original_icon": null, "original_name": "Over-voltage detected", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-113-0-Power Management-Over-voltage status.7", "unit_of_measurement": null }, { "aliases": [], "area_id": null, "capabilities": null, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": "integration", "entity_category": null, "entity_id": "sensor.christmas_tree_alarm_level", "hidden_by": null, "icon": null, "id": "b6a2e6de3de03a393987f22b3e996eae", "has_entity_name": true, "name": null, "options": { "conversation": { "should_expose": false } }, "original_device_class": null, "original_icon": null, "original_name": "Alarm Level", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-113-0-alarmLevel", "unit_of_measurement": null }, { "aliases": [], "area_id": null, "capabilities": null, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": "integration", "entity_category": null, "entity_id": "sensor.christmas_tree_alarm_type", "hidden_by": null, "icon": null, "id": "f183292cb0bee4291f875b7daf23aa64", "has_entity_name": true, "name": null, "options": { "conversation": { "should_expose": false } }, "original_device_class": null, "original_icon": null, "original_name": "Alarm Type", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-113-0-alarmType", "unit_of_measurement": null }, { "aliases": [], "area_id": null, "capabilities": null, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": "integration", "entity_category": null, "entity_id": "sensor.christmas_tree_indicator_value", "hidden_by": null, "icon": null, "id": "8f423b4db3a12604d6eb2f0c47117a30", "has_entity_name": true, "name": null, "options": { "conversation": { "should_expose": false } }, "original_device_class": null, "original_icon": null, "original_name": "Indicator value", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-135-0-value", "unit_of_measurement": null }, { "aliases": [], "area_id": null, "capabilities": null, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": "integration", "entity_category": null, "entity_id": "sensor.christmas_tree_node_identify_on_off_cycle_count", "hidden_by": null, "icon": null, "id": "086c19f038f7e4662c08797cb5deae55", "has_entity_name": true, "name": null, "options": { "conversation": { "should_expose": false } }, "original_device_class": null, "original_icon": null, "original_name": "Node Identify - On/Off Cycle Count", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-135-0-80-4", "unit_of_measurement": null }, { "aliases": [], "area_id": null, "capabilities": null, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": "integration", "entity_category": null, "entity_id": "sensor.christmas_tree_node_identify_on_off_period_duration", "hidden_by": null, "icon": null, "id": "e99ba38bd763df1a77b44d59ad021aa4", "has_entity_name": true, "name": null, "options": { "conversation": { "should_expose": false } }, "original_device_class": null, "original_icon": null, "original_name": "Node Identify - On/Off Period: Duration", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-135-0-80-3", "unit_of_measurement": null }, { "aliases": [], "area_id": null, "capabilities": null, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": "integration", "entity_category": null, "entity_id": "sensor.christmas_tree_node_identify_on_off_period_on_time", "hidden_by": null, "icon": null, "id": "7afd80a6317fbbe2ccf2d268458e6a7b", "has_entity_name": true, "name": null, "options": { "conversation": { "should_expose": false } }, "original_device_class": null, "original_icon": null, "original_name": "Node Identify - On/Off Period: On time", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-135-0-80-5", "unit_of_measurement": null }, { "aliases": [], "area_id": null, "capabilities": null, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": "integration", "entity_category": null, "entity_id": "sensor.christmas_tree_over_current_status", "hidden_by": null, "icon": null, "id": "898dfeb84526fd571e82fb3b63cee94c", "has_entity_name": true, "name": null, "options": { "conversation": { "should_expose": false } }, "original_device_class": null, "original_icon": null, "original_name": "Over-current status", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-113-0-Power Management-Over-current status", "unit_of_measurement": null }, { "aliases": [], "area_id": null, "capabilities": null, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": "integration", "entity_category": null, "entity_id": "sensor.christmas_tree_over_load_status", "hidden_by": null, "icon": null, "id": "3d7ddb8fa75ce9e4bc528864def5335d", "has_entity_name": true, "name": null, "options": { "conversation": { "should_expose": false } }, "original_device_class": null, "original_icon": null, "original_name": "Over-load status", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-113-0-Power Management-Over-load status", "unit_of_measurement": null }, { "aliases": [], "area_id": null, "capabilities": null, "config_entry_id": "391daea9adbfe03d11d50e62bdba9566", "device_class": null, "device_id": "4e6d0a93d589e6f5ec7698cb21a66796", "disabled_by": "integration", "entity_category": null, "entity_id": "sensor.christmas_tree_over_voltage_status", "hidden_by": null, "icon": null, "id": "63082a1f3ebdea88abc56f1d4a549c68", "has_entity_name": true, "name": null, "options": { "conversation": { "should_expose": false } }, "original_device_class": null, "original_icon": null, "original_name": "Over-voltage status", "platform": "zwave_js", "supported_features": 0, "translation_key": null, "unique_id": "3475804637.11-113-0-Power Management-Over-voltage status", "unit_of_measurement": null },

'''

walkeritgtech commented 1 year ago

I removed the config and let the integration reconfigure from scratch.

I now have a drop-down with my GEM serial number when I do edit per-monitor options, even though I don't have any pulse counters configured I can still pull them up. So it looks like the reconfiguration did help with something.

I'll give it a few hours to see if I can add channels to the Energy Dashboard.

jkeljo commented 1 year ago

Did the energy dashboard start working after this?

walkeritgtech commented 1 year ago

After leaving it alone for a few days, no change. None of the sensors are listed as choices to add as grid or individual consumption.Multiple Z-Wave Plugs do show up however, along with a virtual meter on a v3 SmartThings Hub tied in through the native integration. I will try to pull new logs today when I time if that will be useful.

Dropdown for per monitor is still working fine even without any pulse counters so the from scratch reload did seem to take care of that piece.

walkeritgtech commented 1 year ago

Here are the files, had a few other projects call for attention. Let me know if there's anything else I can provide, from what I can tell other than the nothing on the GEM showing up as available consumption on the energy dashboard everything else appears to be working great. Happy to assist though I'm very much still learning python.

core.entity_registry_gem_19Jun2023.txt core.config_entries_gem_19Jun2023.txt

jkeljo commented 1 year ago

I had a thought about this. You started with the YAML setup, right? Did you also do the part about setting up InfluxDB and excluding GEM sensors from recorder? If so, you'll want to un-exclude the energy sensors that you want to use with the energy dashboard. E.g. here's what my recorder config looks like in the YAML; I exclude all of the sensors by default, and then add back the ones I care about:

# Use MariaDB instead of SQLite for basic state logging (much faster)
recorder:
  db_url: !secret mariadb_url
  exclude:
    domains:
      - sensor
  include:
    entities:
      - sensor.total_current_energy
      - sensor.solar_panels_current_energy
      - sensor.sprinklers_water_usage_count
jkeljo commented 1 year ago

I've just pushed up a new version that checks for energy monitor entities being excluded from logbook/recorder and displays a repair in Settings. Let me know if that warning appears for your case!

walkeritgtech commented 1 year ago

Thanks, been a bit tied up here with some home repairs but I appreciate the follow-up, and I think that's the issue. I did have the sensors disabled per the old integration. I just turned them on, I'll give it a few hours to filter in, I do see history now for the GEM devices so that's looking good. I also see the new version, I will also update and restart. After it has some time to settle I'll report back, but I'm feeling like you have gotten to the root of it, thanks.

walkeritgtech commented 1 year ago

Data (and energy meters) are now flowing into the Dashboard, thanks again for the insight, and of course the integration.