sanderdw / hassio-addons

DSMR Reader Datalogger and Metabase Home Assistant Add-ons
https://community.home-assistant.io/search?q=%40sanderdw%20%23home-assistant-os
Other
56 stars 14 forks source link

Version 0.7.1 #26

Closed Alfagek closed 2 years ago

Alfagek commented 2 years ago

Hey Sander,

Thanks to the “auto update” function in HA, my dsmr reader addon update to 0.7.1. And I see in the changes it’s a beta (don’t update).

How can u downgrade to version 0.7.0? Because I do get a consistent error on my USB port 😢

Switched auto update off now 🤣. On all the plugins

thanks in advanced

Rocker20 commented 2 years ago

I think there is a automatic backup from before the upgrade but i don't have auto update so i don't know for sure

Alfagek commented 2 years ago

I think there is a automatic backup from before the upgrade but i don't have auto update so i don't know for sure

Normal updates you can choose if you want to make a backup. But I don’t really know that there is a backup for the plugins.

I’ll hope I can downgrade by ssh with a command

arjen-w commented 2 years ago

If you are running full backups, plugins are included and can be restored separately.

Alfagek commented 2 years ago

If you are running full backups, plugins are included and can be restored separately.

Didn’t though on that 👍🏻 Always making full backups here. Put 0.7.0 back, but still the same USB error. But i know it’s running in a container, so rebooting system now. See if that will fix it.

Edit: 😢 thanks for it. But it looks like there must be more to fix it. Still get the same error as with 0.7.1. Both on 2 different system locations

Starting DSMR Reader - datalogger... 127.0.0.1 - - [04/Jan/2022:18:06:30 +0100] "GET /about HTTP/1.1" 200 14949 "-" "curl/7.79.1" "-" Current logging level set to "ERROR". More information can be found here: https://dsmr-reader.readthedocs.io/en/latest/how-to/troubleshooting/enabling-debug-logging.html 2022-01-04 18:06:31,345 ERROR mixins run_once 103 | dsmr_datalogger.management.commands.dsmr_datalogger: [!] Exception raised. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/serial/serialposix.py", line 322, in open self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK) PermissionError: [Errno 13] Permission denied: '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AK43ODEX-if00-port0' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/dsmr_datalogger/scripts/dsmr_datalogger_api_client.py", line 34, in read_telegram serial_handle = serial.serial_for_url(url=url_or_port, timeout=MAX_READ_TIMEOUT, **serial_kwargs) File "/usr/local/lib/python3.10/site-packages/serial/__init__.py", line 90, in serial_for_url instance.open() File "/usr/local/lib/python3.10/site-packages/serial/serialposix.py", line 325, in open raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg)) serial.serialutil.SerialException: [Errno 13] could not open port /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AK43ODEX-if00-port0: [Errno 13] Permission denied: '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AK43ODEX-if00-port0' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/dsmr_backend/mixins.py", line 92, in run_once self.run(data=self.data, **options) File "/app/dsmr_datalogger/management/commands/dsmr_datalogger.py", line 29, in run telegram = next(self.telegram_generator) File "/app/dsmr_datalogger/scripts/dsmr_datalogger_api_client.py", line 36, in read_telegram raise RuntimeError('Failed to connect: {}', error) RuntimeError: ('Failed to connect: {}', SerialException(13, "could not open port /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AK43ODEX-if00-port0: [Errno 13] Permission denied: '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AK43ODEX-if00-port0'"))

arjen-w commented 2 years ago

Seems like the USB port is either locked or invalid. Do you see the USB device listed in the hardware overview of the supervisor? What happens when you unplug and replug the USB cable?

Alfagek commented 2 years ago

Seems like the USB port is either locked or invalid. Do you see the USB device listed in the hardware overview of the supervisor? What happens when you unplug and replug the USB cable?

Usb device is listed in supervisor/hardware. Working in proxmox. And there also is the usb forwarded and nothing changed.

It did happen when the system did update to dsrm 0.7.1. On my own system on 09:43 and the other system at my dads place on 09:32. If I see the stats from dsmr

Can try to replug the usb

edit: replug usb doesn’t help also 😢.

Thanks for helping!👍🏻😎

Jagermyster commented 2 years ago

Same problem here: Debug log:

Starting DSMR Reader - datalogger... Current logging level set to "ERROR". More information can be found here: https://dsmr-reader.readthedocs.io/en/latest/how-to/troubleshooting/enabling-debug-logging.html 2022-01-04 19:33:17,931 ERROR mixins run_once 103 | dsmr_datalogger.management.commands.dsmr_datalogger: [!] Exception raised. Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/serial/serialposix.py", line 322, in open self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK) PermissionError: [Errno 13] Permission denied: '/dev/ttyUSB0' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/dsmr_datalogger/scripts/dsmr_datalogger_api_client.py", line 34, in read_telegram serial_handle = serial.serial_for_url(url=url_or_port, timeout=MAX_READ_TIMEOUT, serial_kwargs) File "/usr/local/lib/python3.10/site-packages/serial/init.py", line 90, in serial_for_url instance.open() File "/usr/local/lib/python3.10/site-packages/serial/serialposix.py", line 325, in open raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg)) serial.serialutil.SerialException: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/dsmr_backend/mixins.py", line 92, in run_once self.run(data=self.data, options) File "/app/dsmr_datalogger/management/commands/dsmr_datalogger.py", line 29, in run telegram = next(self.telegram_generator) File "/app/dsmr_datalogger/scripts/dsmr_datalogger_api_client.py", line 36, in read_telegram raise RuntimeError('Failed to connect: {}', error) RuntimeError: ('Failed to connect: {}', SerialException(13, "could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'")) 127.0.0.1 - - [04/Jan/2022:19:33:20 +0100] "GET /about HTTP/1.1" 200 14950 "-" "curl/7.79.1" "-"

sanderdw commented 2 years ago

Just published 0.7.2, let me know if it works.

Jagermyster commented 2 years ago

Just published 0.7.2, let me know if it works.

It is working fine again! Thank you! Much appreciated!

Alfagek commented 2 years ago

Just published 0.7.2, let me know if it works.

@sanderdw Awesome work again Sander. Working on both systems again 👍🏻👌🏻