New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No read out for meter, and error in Home Assistant #80
Comments
The log output you attached tells me that a close/shutdown/remove event has been triggered. |
I have no reinstalled, and is now receiving data. But no entities from the AMS.
This is the output from the log. |
Hi, I have a similar issue. Looks like I'm receiving packets but no entities are created. See log below.
|
Looks like the kaifa_se packet format has changed. I will have to make a new parser. Can any of you send logs of different list types? |
Thx, that would be great! Unfortunately, I don’t see any other list_type than 7 in my logs. Looking several hours back… |
Actually, try to set meter_type to kaifa instead of kaifa_se to see if it works. |
When setting it to kaifa, the redings stop, and i get this in the log:
|
Seems to work for me after a restart! |
Yes, a restart helped here to. But why does it identify the meter as kaifa_se when it should be kaifa? |
Well, up until now, the swedish kaifa meters sent different content in the package than the Norwegian ones. It seems that they have changed that now, and transmits the same kind of packets. |
Been running now for 12 hours and everything seems to work ok except that I don't get the "ams_active_power_import..." sensor. I have 13 entities populated but I guess I should have 14? Any pointers to what could be wrong? Any logs you need? |
Ouch! I need to inspect the packages to see where the data is stored. Not the same as the norwegian ones then. |
I have the same problem as described in the initial post. It used to work, but stopped working a few weeks back, probably after a core update (or downgrade). 2022-09-22 15:56:37.577 ERROR (Thread-2 (connect)) [root] Uncaught thread exception |
@husky999 please try latest code. To see if all values are good. |
@turbokongen, everything looks ok now :-) Thx! |
I set it up in configuration.yaml |
@rogere66 @Futrax I found that I had forgotten to update the manual yaml validation at setup when I added the tcp/ip feature. |
@turbokongen Thanks, but I can still not get it working. Use latest code of HA and AMS (1.9.4) and get invalid config when rebooting: yaml config: |
I have tested the 4 latest hass-AMS versions and found this:
A major problem is that integrations page setup don't support serial port /dev/ttyS0, thus is not useful in my setup. It is also somewhat confusing that the few latest hass-AMS versions downloadable trough HACS all show version 1.9.1 in manifest.json. |
@rogere66 Regarding the serial port, I have added a debug line to the code that you can post here. It contains the available serial ports detected by the system when setting up via the integrations page. On my system /dev/ttyS0 appears in the list of selectable ports in the integrations setup. |
@turbokongen Testing was done on a rpi 4 with 4GB RAM. I used freshly installed code image "haos_rpi4-9.0.img.xz" as well as older versions and 64-bit versions. They all failed with the this error message: Logger: root Regarding the ttyS0 serial port: Since the swedish_kaifa test code wouldn't run, I copied the debug line into version 1.9.2 and got this message (a USB serial port was connected): No ttyS0 there and I think maybe it could be related to how I enabled the port. The port is disabled by default and I enabled it by uncomment "enable_uart=1" in the config.txt file in the hassos-boot sector before booting (using a PC). The ttyS0 port is enabled and works fine when using yaml setup, but is somehow not included in the port list. Is there maybe a better way of enabling the serial port? |
I have updated the code. I do not have a meter swedish meter to test with. |
@turbokongen |
@rogere66 @Futrax @husky999 |
@turbokongen |
The readouts form my AMS meter has stopped worknig, and i have an error in Home Asssitant logs.
`Logger: homeassistant.config_entries
Source: custom_components/ams/init.py:166
Integration: AMS Reader (documentation, issues)
First occurred: 18:55:40 (5 occurrences)
Last logged: 19:22:27
Error calling entry remove callback AMS Reader for ams
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 536, in async_remove
await component.async_remove_entry(hass, self)
File "/config/custom_components/ams/init.py", line 114, in async_remove_entry
await hass.async_add_executor_job(hass.data[DOMAIN].stop_serial_read)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/ams/init.py", line 166, in stop_serial_read
self._ser.close()
AttributeError: 'AmsHub' object has no attribute '_ser'`
How do I fix this?
The text was updated successfully, but these errors were encountered: