kdeyev / eyeonwater

HACS repository for EyeOnWater integration
MIT License
26 stars 6 forks source link

Does not appear to pulling data. #8

Closed andrewchumchal closed 2 years ago

andrewchumchal commented 2 years ago

I just install the integration today and this is what I'm getting in my error log.

image

Here is my device setting

image

kdeyev commented 2 years ago

I've just pushed a fix. Please update and verify if it works now.

andrewchumchal commented 2 years ago

It appears to be working now

andrewchumchal commented 2 years ago

It appears the calculation is off. It's like it's times it 100

image

and i think it needs to / by 100 image

kdeyev commented 2 years ago

Everything looks correct: 149.242 (100 GAL) is equal to 14924.2 (GAL). Home assistant does not understand "100 GAL" measurement unit, I think EOW invention :-)

andrewchumchal commented 2 years ago

I summited a PR that fix the issue on my side. I don't believe there needs to be any math involved. The meter that is install is brand new and I'm sure there not 14,000 gallons though it

image

kdeyev commented 2 years ago

I don't mind to approve the PR if everything works for you and I see your point. But I think that the problem is in the EOW side: they report the measurement unit is "100 GAL". Could you please double check that the numbers on your meter are in gallons and not in hundreds of gallons?

kdeyev commented 2 years ago

@andrewchumchal The simplest way to check it - take a look at your daily water consumption. It cannot be 2-4 gallons per day :-)

johnwarne commented 2 years ago

I get a similar error after updating to the most recent version in HACS.


Logger: homeassistant
Source: custom_components/eyeonwater/eow.py:152 
Integration: EyeOnWater (documentation) 
First occurred: 7:03:35 PM (2 occurrences) 
Last logged: 7:08:35 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 182, in async_refresh
    await self._async_refresh(log_failures=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 110, in async_update_listeners
    update_callback()
  File "/config/custom_components/eyeonwater/sensor.py", line 85, in _state_update
    self._state = self.meter.reading
  File "/config/custom_components/eyeonwater/eow.py", line 152, in reading
    raise EyeOnWaterAPIError(f"Unsupported measurement unit: {read_unit}")
custom_components.eyeonwater.eow.EyeOnWaterAPIError: Unsupported measurement unit: KGAL

I'm in the US and it's been working with I believe the GAL unit until this update.

kdeyev commented 2 years ago

@johnwarne It was a stupid bug I introduced today. I just fixed it. Please update once again. And thank you for reporting the issue

andrewchumchal commented 2 years ago

I think you're right. I guess I have already used 14000 gals of water. Please disregard my PR

johnwarne commented 2 years ago

Fixed! Thanks for the super quick resolution. I've been looking to integrate EOW with HA for a while now, and I really appreciate the work you've done here.

kdeyev commented 2 years ago

Thank you! The integration has one unresolved issue - #2 . I still have not idea how to solve it in the current HA architecture. I you have any idea - please cooperate.

caliKev commented 2 years ago

Thanks so much for this integration. I almost have it working. Sorry I can’t help you on issue #2. I have a very similar error to the one described above with the exception the unit CCF.

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 182, in async_refresh await self._async_refresh(log_failures=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 110, in async_update_listeners update_callback() File "/config/custom_components/eyeonwater/sensor.py", line 85, in _state_update self._state = self.meter.reading File "/config/custom_components/eyeonwater/eow.py", line 152, in reading raise EyeOnWaterAPIError(f"Unsupported measurement unit: {read_unit}") custom_components.eyeonwater.eow.EyeOnWaterAPIError: Unsupported measurement unit: CCF

kdeyev commented 2 years ago

@caliKev I've just added support for CCF, it will be converted to gallons. Please update and verify.

caliKev commented 2 years ago

@kdeyev Thanks so much for the quick fix. The sensor has a value now. My system only uploads one reading daily, hopefully energy meter starts working once there is a second reading.