Coder Social home page Coder Social logo

jkeljo / hacs-greeneye-monitor Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 276 KB

HACS version of the Home Assistant Core greeneye_monitor component. For beta-testing and faster deployment of changes.

License: MIT License

Python 99.76% Shell 0.24%
greeneye-monitor hacs hacs-integration home-assistant home-assistant-component home-assistant-custom-component home-assistant-integration homeassistant homeassistant-component homeassistant-integration

hacs-greeneye-monitor's People

Contributors

jkeljo avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sarahmva

hacs-greeneye-monitor's Issues

DashBox Communication

I've installed the integration and I am trying to see the forwarded packets from the Dashbox instead of the GEM. I understood from Brultech support that it may be possible with this version. I installed on port 8000 and configured the DB to forward on 8000 but cannot see the packets. Is this possible? THanks

Unable to configure integration through UI

Describe the bug

I tried migrating from the built-in integration to this one. After installing it through HACS and restarting, it shows up in the list of available integrations, but when I try to add it, it tells me "This device cannot be added from the UI. You can add this device by adding it to your 'configuration.yaml'. See the documentation for more information."

I tried commenting out the existing configuration in configuration.yaml, to no effect.

Diagnostics

Drag and drop your downloaded diagnostics file here:

No diagnostics file available since I am unable to set up the integration.

Debug Logs

Drag and drop your downloaded log file here:

Same as above.

I am running Home Assistant via Home Assistant OS. Version info:
Home Assistant 2023.9.1
Supervisor 2023.08.3
Operating System 10.5
Frontend 20230908.0 - latest

Unable to reconfigure integration

Describe the bug

When attempting to edit per-monitor options in order to add a new channel, the dropdown does not list my GEM's serial number (it is entirely empty), so I am unable to configure the new channel and add it as a sensor.

My configuration was automatically migrated from the old yaml configuration.

image

Diagnostics

config_entry-greeneye_monitor-d704fb1bd20ee77833d33e7432c5b815.json.txt

Debug Logs

home-assistant_greeneye_monitor_2023-12-15T15-59-13.113Z.log

Support for legacy serial interface on ECM-1240

Add support for ECM-1240 serial communications

I have three ECM-1240 devices monitoring 20 circuits plus main (21 channels total) in my circuit panel. I have a custom solution using a tweaked version of Matt Wall's btmon.py sending MQTT values into HA & InfluxDB. I have an ugly Excel spreadsheet which generates the Homeassistant MQTT discovery messages for the 21 channels. These btmon.py scripts run on an RPi with a quad USB-to-serial cable that plugs into the three ECM-1240 (one serial port is used) and the RPi sends the power metrics to HA. All these scrips are stared automatically using Systemd.

I would love to move to a more officially supported solution, such as this HACS repository, but none of my ECM-1240s are "on the network" and cannot dump values to a TCP listener.

Can you think of a way to use your HACS solution in my case?

Thanks

Initial Config Failure

So I truly feel like an idiot but I have a an Ethernet Only GEM (GEM-E) which I have recently installed. I can connect via the Network Utility, access the browser set up, and I can access live data from GEM NU but I can't figure out for the life of me how to get the integration to detect my GEM. I looked on the Brultech forums but they seem to reference the old integration so I don't know if I am supposed to make a yaml entry or not.

When I try to hit configure in the integration I receive the following error:

Config flow could not be loaded: {"message":"Handler does not support user"}

So all I have is the hub but no discovery. What am I doing wrong? Did I miss documentation somewhere? Should I be creating that initial yaml entry, posts seem to suggest not but I am lost at this point?

Depricate HA core integration

While integrating my 2 GEM's into my HA install, I ran into issues as the documentation still points to using the HA core Green Eyed Monitor integration (https://www.home-assistant.io/integrations/greeneye_monitor).
Which sadly as I have learned... Is broken, after a few hours of trying to figure out why things were not working.

It would be highly beneficial if either the core integration was deprecated, or at least some additional information that points new users over to the HACS version.

Configure Default Display Resolution or add configuration to set default

With the display values of the properties brought over set to default, some seem to be a little odd, watts normally are 1-2 places but seem too often jump to 10-12 places or more to the right of zero and kWa seem to be displayed 14-16 places.

Could the integration be configured to display reasonable resolution or allow user configured display resolution at the integration level, like this?
Watts 0.0
Amps 0.00
kWh 0.000

Stopped Receiving Energy Updates with HA 2023.8.1

Home Assistant version: 2023.8.1

HACS version: 1.32.1

hacs-greeneye-monitor version: 2023.8.6

After upgrading HA to 2023.8.1, I stopped receiving energy readings. I saw the issue initially with hacs-greeneye-monitor 2023.5.30 and it persisted after upgrading to hacs-greeneye-monitor 2023.8.6. I hadn't touched any of my configuration settings on the GEM or HA configuration and I am receiving voltage, power and current readings without issue. I did try resetting my counters on the GEM with no change.

image image

Energy Monitor on 240V loads with single CT only half of what is expected

Home Assistant version: 2023.7.3

HACS version: 1.32.1

hacs-greeneye-monitor version: 2023.5.30

Configuration

image

Add your logs here.

Describe the bug

I have one channel monitoring a symetric 240V load (Car Charger). GEM Is configured accordingly:

image

The Car Charger is pulling 20 Amps, about 4,700 Watts.

After 1:15 minutes, the energy measured is half of what I expected:

image

I compared with the app for the charger which says 5.6 kwh.

Not sure if this is a GEM issue or a issue of the monitor component.

home-assistant_greeneye_monitor_2023-08-03T04-10-53.129Z.log

First boot issue without previous yaml

Version of the custom_component

2023-05-30

Configuration

Describe the bug

First time loading the component i got the following error
2023-06-04T13:20:12.587529761Z 2023-06-04 14:20:12.585 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration greeneye_monitor: cannot import name 'MonitorType' from 'greeneye.monitor' (/usr/lib/python3.10/site-packages/greeneye/monitor.py)
When trying to reboot from within HA i got
2023-06-04T13:21:52.587369312Z 2023-06-04 14:21:52.585 ERROR (MainThread) [homeassistant.components.homeassistant] The system cannot restart because the configuration is not valid: Component error: greeneye_monitor - cannot import name 'MonitorType' from 'greeneye.monitor' (/usr/lib/python3.10/site-packages/greeneye/monitor.py)

A note, i already had my yaml commented out (my bad) but this seems like maybe if someone is starting from scratch the component may not load? After a reboot with the yaml for old GEM uncommented everything went smoothly.

Debug log

2023-06-04T13:21:52.599984775Z 2023-06-04 14:21:52.593 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547585842320] The system cannot restart because the configuration is not valid: Component error: greeneye_monitor - cannot import name 'MonitorType' from 'greeneye.monitor' (/usr/lib/python3.10/site-packages/greeneye/monitor.py)

2023-06-04T13:21:52.600096719Z Traceback (most recent call last):

2023-06-04T13:21:52.600120979Z   File "/usr/lib/python3.10/site-packages/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service

2023-06-04T13:21:52.600140571Z     await hass.services.async_call(

2023-06-04T13:21:52.600158442Z   File "/usr/lib/python3.10/site-packages/homeassistant/core.py", line 1849, in async_call

2023-06-04T13:21:52.600176942Z     task.result()

2023-06-04T13:21:52.600194182Z   File "/usr/lib/python3.10/site-packages/homeassistant/core.py", line 1889, in _execute_service

2023-06-04T13:21:52.600249812Z     await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(

2023-06-04T13:21:52.600271682Z   File "/usr/lib/python3.10/site-packages/homeassistant/helpers/service.py", line 874, in admin_handler

2023-06-04T13:21:52.600289108Z     await result

2023-06-04T13:21:52.600306608Z   File "/usr/lib/python3.10/site-packages/homeassistant/components/homeassistant/__init__.py", line 181, in async_handle_core_service

2023-06-04T13:21:52.600324349Z     raise HomeAssistantError(

2023-06-04T13:21:52.600341479Z homeassistant.exceptions.HomeAssistantError: The system cannot restart because the configuration is not valid: Component error: greeneye_monitor - cannot import name 'MonitorType' from 'greeneye.monitor' (/usr/lib/python3.10/site-packages/greeneye/monitor.py)



Cannot See Monitor Settings or add to Energy Dashboard

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

Ignore invalid readings from the temperature sensors

Version: 2023.9.4

First, I would like to thank you for creating this plugin that allows to integrate GEM with Home Assistant. I've been using it for several years to monitor power consumption and temperatures through the house, and found it to be very helpful.

Now let me report the problem. I have few temperature probes connected to GEM, and periodically getting a temperature of 256F which completely sets off the graphs (I guess, once in a while, when it fails to read the sensor). Those values should be treated as "n/a" or "unknown". Same story applies to the temperature channel that doesn't have any probe on it ("Unused" on the second screenshot).

Please add a logic to ignore invalid temperature readings. Thanks!

I am attaching two graphs as an example:
image
image

Please let me know if you need any further information.

Support Bin48Net -time packets

Currently as far as I can tell this only supports the Bin32Net packets. Is there a way we could support the BIN48NET - TIME packets? The reason for the ask is I use the BTMON python script to retrieve data from my GEM device and then save the parsed data to influxdb. This script works as a client and requests data from the GEM, It can only work with the BIN48 format. I know people will save why don't I just save from HA to influxdb, but I mess around with my installation to much and the BTMON method works better for long term archival purposes.

So the problem is I can't have BTMON and HA getting data at the same time as I can only set one packet format.

Allow changing pulse counter configuration after creation

Is your feature request related to a problem? Please describe.
If someone connects a new pulse counter to their GEM after setting it up in Home Assistant, the only way to set unit and device class for the pulse counter today is via the YAML.

Describe the solution you'd like
There should be a way in the UI somewhere to re-configure the pulse counter.

Don't show per-monitor options if there aren't any

If you have a monitor without any pulse counters, today we just show an empty dropdown in the per-monitor options flow. We ideally shouldn't show the per-monitor flow at all, or should make it clearer that it's pulse counter options, or something.

Configuration is lost, and I cannot re-add it.

The integration lost track of my gem controller. I can still log into the GEM interface and see all the data, but the integration is saying that everything is unavailable. The device serial number is not in the configure per-monitor options list is empty.

I've tried reloading the integration, but it had no effect. I now have one hub that has nothing in it and cannot be edited.

Looking at the diagnostic, the entities seem to have been deleted but still exist in the "deleted_entities" category. I've tried removing the integration, and starting over, but I've had no luck. I even re-entered the old style gem configuration in homes that this integration would find it and reload the data. No luck.

Drag and drop your downloaded diagnostics file here:

Debug Logs

config_entry-greeneye_monitor-62aea2d9cfb20eae29060abac08e45c1.json.txt

Drag and drop your downloaded log file here:
home-assistant_greeneye_monitor_2023-09-04T17-48-40.984Z.log

Cannot add serial to intergration

I have an issue with a new install. If I can go to configure, edit per monitor options, I cannot add a serial. Uninstall and reinstall does not help. Is their a way to add the serial to a config file somewhere?

GreenEye Monitor component delays restart of Home Assistant after 2024.2.1

Describe the bug

This custom component seems to blocks/delays a clean restart of Home Assistant. I don't think this happened in 2024.1.x, I skipped 2024.2.0 and it does appear to happen in 2024.2.1.

On restart I see these warnings:

2024-02-10 23:17:19.705 WARNING (MainThread) [homeassistant.core] Shutdown stage 'stop integrations': still running: <Task pending name='Task-100718' coro=<async_setup_entry.<locals>.close_monitors() running at /config/custom_components/greeneye_monitor/__init__.py:148> wait_for=<Future pending cb=[Task.task
_wakeup()]> cb=[set.remove()]>
2024-02-10 23:18:19.708 WARNING (MainThread) [homeassistant.core] Timed out waiting for final writes to complete, the shutdown will continue
2024-02-10 23:18:19.708 WARNING (MainThread) [homeassistant.core] Shutdown stage 'final write': still running: <Task pending name='Task-100718' coro=<async_setup_entry.<locals>.close_monitors() running at /config/custom_components/greeneye_monitor/__init__.py:148> wait_for=<Future pending cb=[Task.task_wakeu
p()]> cb=[set.remove()]>
2024-02-10 23:18:49.711 WARNING (MainThread) [homeassistant.core] Timed out waiting for close event to be processed, the shutdown will continue
2024-02-10 23:18:49.711 WARNING (MainThread) [homeassistant.core] Shutdown stage 'close': still running: <Task pending name='Task-100718' coro=<async_setup_entry.<locals>.close_monitors() running at /config/custom_components/greeneye_monitor/__init__.py:148> wait_for=<Future pending cb=[Task.task_wakeup()]> 
cb=[set.remove()]>

Diagnostics

I'll grab these shortly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.