home-assistant / addons

:heavy_plus_sign: Docker add-ons for Home Assistant
https://home-assistant.io/hassio/
Apache License 2.0
1.52k stars 1.47k forks source link

Silicon Labs Multiprotocol 2.4.5 CPCd version conflict #3630

Closed magickarle closed 2 months ago

magickarle commented 3 months ago

Describe the issue you are experiencing

[12:16:09:634370] Info : Connecting to Secondary... [12:16:09:752000] Info : RX capability is 256 bytes [12:16:09:752009] Info : Connected to Secondary [12:16:09:755746] Info : Secondary Protocol v5 [12:16:09:755750] ASSERT : FATAL in function 'protocol_version_check' in file /usr/src/cpc-daemon/server_core/server_core.c at line #729 : Secondary Protocol v5 doesn't match CPCd Protocol v4 [12:16:10:756182] Info : Daemon exiting with status EXIT_FAILURE Logger buffer size = 28672, highwater mark = 2439 : 8.51%. Lost logs : 0 [12:16:10] INFO: CPC ended with exit code 1 (signal 0)...

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Which add-on are you reporting an issue with?

Silicon Labs Multiprotocol

What is the version of the add-on?

2.4.5

Steps to reproduce the issue

  1. flashed firmware of z-station to release date 2024.04.22 Multiprotocole version on ubuntu

  2. tested comm with sudo ./zme_cpc info -d /dev/ttyUSB1 -k my_binding_key

  3. received: Openning port .............................. OK BINDING KEY: MY_BINDING_KEY VERSION PROTOCOL: 5.0 VERSION CPC: 4.4.2 VERSION CPC APP: UNDEFINED SECURITY: TRUE ENDPOINT: NCP ZIGBEE RCP OPEN TRED ...

  4. unpluged and pluged to proxmox server (usb is pass-through using vendor/devince ID)

  5. installed homeassistant addon Silicon Labs Multiprotocol

  6. Confugured addon yaml with device: >- /dev/serial/by-id/usb-Silicon_Labs_CP2105_Dual_USB_to_UART_Bridge_Controller_012B7A55-if01-port0 baudrate: "115200" flow_control: false autoflash_firmware: false cpcd_trace: false otbr_enable: false otbr_log_level: notice otbr_firewall: false binding_key: my_binding_key

  7. Got error in log.

  8. Tested by reconfiguring zigbee radio (new serial port shows socket://core-silabs-multiprotocol:9999 - Multiprotocol add-on - Nabu Casa)

  9. received "Unknown error occurred"

System Health information

System Information

version core-2024.6.0
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.6.29-haos
arch x86_64
timezone America/Toronto
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.34.0 Stage | running Available Repositories | 1393 Downloaded Repositories | 15 HACS Data | ok
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | January 24, 2025 at 7:00 PM relayer_connected | true relayer_region | us-east-1 remote_enabled | true remote_connected | true alexa_enabled | false google_enabled | true remote_server | us-east-1-2.ui.nabu.casa certificate_status | ready instance_id | 7a33b81086bf4e0cb0e5898d6b9efe43 can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.3 -- | -- update_channel | stable supervisor_version | supervisor-2024.06.0 agent_version | 1.6.0 docker_version | 25.0.5 disk_total | 30.8 GB disk_used | 18.5 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | kvm board | ova supervisor_api | ok version_api | ok installed_addons | Home Assistant Google Drive Backup (0.112.1), Z-Wave JS UI (3.7.1), flicd (2.0.3), Studio Code Server (5.15.0), Node-RED (17.0.13), Network UPS Tools (0.13.0), RPC Shutdown (2.5), ESPHome (2024.5.5), Terminal & SSH (9.14.0), eWeLink Smart Home (1.4.3), SQLite Web (4.1.2), Z-Wave.Me Add-on (v4.1.3), Silicon Labs Multiprotocol (2.4.5)
Dashboards dashboards | 2 -- | -- resources | 6 views | 13 mode | storage
Recorder oldest_recorder_run | May 27, 2024 at 1:44 PM -- | -- current_recorder_run | June 6, 2024 at 10:44 AM estimated_db_size | 445.68 MiB database_engine | sqlite database_version | 3.44.2

Anything in the Supervisor logs that might be useful for us?

2024-06-06 12:04:52.646 INFO (MainThread) [supervisor.hardware.monitor] Detecting remove hardware /dev/bus/usb/002/004 - None
2024-06-06 12:05:02.259 INFO (SyncWorker_0) [supervisor.docker.manager] Cleaning addon_core_silabs_multiprotocol application
2024-06-06 12:05:02.302 ERROR (MainThread) [supervisor.addons.addon] Add-on core_silabs_multiprotocol has invalid options: Device '/dev/serial/by-id/usb-Silicon_Labs_CP2105_Dual_USB_to_UART_Bridge_Controller_012B7A55-if01-port0' does not exist in Silicon Labs Multiprotocol (core_silabs_multiprotocol). Got {'device': '/dev/serial/by-id/usb-Silicon_Labs_CP2105_Dual_USB_to_UART_Bridge_Controller_012B7A55-if01-port0', 'baudrate': '115200', 'flow_control': False, 'autoflash_firmware': False, 'cpcd_trace': False, 'otbr_enable': False, 'otbr_log_level': 'notice', 'otbr_firewall': False, 'binding_key': 'my_binding_key'}
2024-06-06 12:05:02.302 ERROR (MainThread) [supervisor.addons.addon] Watchdog restart of addon Silicon Labs Multiprotocol failed!
2024-06-06 12:05:23.272 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon Z-Wave JS UI is failed, restarting...

Anything in the add-on logs that might be useful for us?

[12:28:54:307845] Info :   rlimit_nofile = 2000
[12:28:54:307845] Info : ENCRYPTION IS DISABLED 
[12:28:54:307846] Info : Starting daemon in normal mode
[12:28:54:319190] Info : Connecting to Secondary...
[12:28:54:437206] Info : RX capability is 256 bytes
[12:28:54:437220] Info : Connected to Secondary
[12:28:54:440852] Info : Secondary Protocol v5
[12:28:54:440856] *** ASSERT *** : FATAL in function 'protocol_version_check' in file /usr/src/cpc-daemon/server_core/server_core.c at line #729 : Secondary Protocol v5 doesn't match CPCd Protocol v4
[12:28:55:441533] Info : Daemon exiting with status EXIT_FAILURE
Logger buffer size = 28672, highwater mark = 2439 : 8.51%. Lost logs : 0
[12:28:55] INFO: CPC ended with exit code 1 (signal 0)...
[12:28:56] INFO: Starting cpcd...
WARNING in function 'main' in file /usr/src/cpc-daemon/main.c at line #186 : Running CPCd as 'root' is not recommended. Proceed at your own risk.
FATAL in function 'protocol_version_check' in file /usr/src/cpc-daemon/server_core/server_core.c at line #729 : Secondary Protocol v5 doesn't match CPCd Protocol v4
[12:28:56:501148] Info : [CPCd v4.3.1.0] [Library API v3] [RCP Protocol v4]
[12:28:56:501174] Info : Git commit: 133b29678b3d0bc7578e098d2f46b4d5bcd2ebb4 / branch: 
[12:28:56:501175] Info : Sources hash: ff8300587e7e4ab1def7a89a272c0baef32f9eb3bff9b0ba06b94e655d652367
[12:28:56:501178] WARNING : In function 'main' in file /usr/src/cpc-daemon/main.c at line #186 : Running CPCd as 'root' is not recommended. Proceed at your own risk.
[12:28:56:501271] Info : Reading cli arguments
[12:28:56:501274] Info : /usr/local/bin/cpcd 
[12:28:56:512906] Info : Reading configuration
[12:28:56:512908] Info :   file_path = /usr/local/etc/cpcd.conf
[12:28:56:512909] Info :   instance_name = cpcd_0
[12:28:56:512909] Info :   socket_folder = /dev/shm
[12:28:56:512910] Info :   operation_mode = MODE_NORMAL
[12:28:56:512911] Info :   use_encryption = false
[12:28:56:512911] Info :   binding_key_file = /etc/binding-key.key
[12:28:56:512912] Info :   stdout_tracing = false
[12:28:56:512912] Info :   file_tracing = false
[12:28:56:512913] Info :   lttng_tracing = false
[12:28:56:512913] Info :   enable_frame_trace = false
[12:28:56:512914] Info :   traces_folder = /dev/shm/cpcd-traces
[12:28:56:512914] Info :   bus = UART
[12:28:56:512915] Info :   uart_baudrate = 115200
[12:28:56:512915] Info :   uart_hardflow = false
[12:28:56:512916] Info :   uart_file = /dev/ttyUSB1
[12:28:56:512916] Info :   fu_recovery_pins_enabled = false
[12:28:56:512917] Info :   fu_connect_to_bootloader = false
[12:28:56:512917] Info :   fu_enter_bootloader = false
[12:28:56:512918] Info :   restart_cpcd = false
[12:28:56:512918] Info :   application_version_validation = false
[12:28:56:512919] Info :   print_secondary_versions_and_exit = false
[12:28:56:512919] Info :   use_noop_keep_alive = false
[12:28:56:512920] Info :   reset_sequence = true
[12:28:56:512920] Info :   stats_interval = 0
[12:28:56:512921] Info :   rlimit_nofile = 2000
[12:28:56:512922] Info : ENCRYPTION IS DISABLED 
[12:28:56:512922] Info : Starting daemon in normal mode
[12:28:56:524077] Info : Connecting to Secondary...
[12:28:56:641887] Info : RX capability is 256 bytes
[12:28:56:641901] Info : Connected to Secondary
[12:28:56:645545] Info : Secondary Protocol v5
[12:28:56:645549] *** ASSERT *** : FATAL in function 'protocol_version_check' in file /usr/src/cpc-daemon/server_core/server_core.c at line #729 : Secondary Protocol v5 doesn't match CPCd Protocol v4
[12:28:57:646054] Info : Daemon exiting with status EXIT_FAILURE
Logger buffer size = 28672, highwater mark = 2439 : 8.51%. Lost logs : 0
[12:28:57] INFO: CPC ended with exit code 1 (signal 0)...
[12:28:58] INFO: Starting cpcd...
WARNING in function 'main' in file /usr/src/cpc-daemon/main.c at line #186 : Running CPCd as 'root' is not recommended. Proceed at your own risk.
FATAL in function 'protocol_version_check' in file /usr/src/cpc-daemon/server_core/server_core.c at line #729 : Secondary Protocol v5 doesn't match CPCd Protocol v4
[12:28:58:683302] Info : [CPCd v4.3.1.0] [Library API v3] [RCP Protocol v4]
[12:28:58:683325] Info : Git commit: 133b29678b3d0bc7578e098d2f46b4d5bcd2ebb4 / branch: 
[12:28:58:683326] Info : Sources hash: ff8300587e7e4ab1def7a89a272c0baef32f9eb3bff9b0ba06b94e655d652367
[12:28:58:683328] WARNING : In function 'main' in file /usr/src/cpc-daemon/main.c at line #186 : Running CPCd as 'root' is not recommended. Proceed at your own risk.
[12:28:58:683394] Info : Reading cli arguments
[12:28:58:683397] Info : /usr/local/bin/cpcd 
[12:28:58:694929] Info : Reading configuration
[12:28:58:694932] Info :   file_path = /usr/local/etc/cpcd.conf
[12:28:58:694932] Info :   instance_name = cpcd_0
[12:28:58:694933] Info :   socket_folder = /dev/shm
[12:28:58:694934] Info :   operation_mode = MODE_NORMAL
[12:28:58:694934] Info :   use_encryption = false
[12:28:58:694935] Info :   binding_key_file = /etc/binding-key.key
[12:28:58:694936] Info :   stdout_tracing = false
[12:28:58:694936] Info :   file_tracing = false
[12:28:58:694936] Info :   lttng_tracing = false
[12:28:58:694937] Info :   enable_frame_trace = false
[12:28:58:694937] Info :   traces_folder = /dev/shm/cpcd-traces
[12:28:58:694938] Info :   bus = UART
[12:28:58:694938] Info :   uart_baudrate = 115200
[12:28:58:694939] Info :   uart_hardflow = false
[12:28:58:694940] Info :   uart_file = /dev/ttyUSB1
[12:28:58:694940] Info :   fu_recovery_pins_enabled = false
[12:28:58:694941] Info :   fu_connect_to_bootloader = false
[12:28:58:694941] Info :   fu_enter_bootloader = false
[12:28:58:694942] Info :   restart_cpcd = false
[12:28:58:694942] Info :   application_version_validation = false
[12:28:58:694943] Info :   print_secondary_versions_and_exit = false
[12:28:58:694943] Info :   use_noop_keep_alive = false
[12:28:58:694944] Info :   reset_sequence = true
[12:28:58:694944] Info :   stats_interval = 0
[12:28:58:694945] Info :   rlimit_nofile = 2000
[12:28:58:694945] Info : ENCRYPTION IS DISABLED 
[12:28:58:694946] Info : Starting daemon in normal mode
[12:28:58:706152] Info : Connecting to Secondary...
[12:28:58:823573] Info : RX capability is 256 bytes
[12:28:58:823581] Info : Connected to Secondary
[12:28:58:827262] Info : Secondary Protocol v5
[12:28:58:827266] *** ASSERT *** : FATAL in function 'protocol_version_check' in file /usr/src/cpc-daemon/server_core/server_core.c at line #729 : Secondary Protocol v5 doesn't match CPCd Protocol v4
[12:28:59:827932] Info : Daemon exiting with status EXIT_FAILURE
Logger buffer size = 28672, highwater mark = 2439 : 8.51%. Lost logs : 0
[12:28:59] INFO: CPC ended with exit code 1 (signal 0)...

Additional information

I seem to have a conflit on the protocole version. As well, can't find where i can put my UART binding key (as per log it says /etc/binding-key.key. My guess this is the path within the addon through docker)

magickarle commented 3 months ago

sorry you can merge with https://github.com/home-assistant/addons/issues/3623. seem to be the same issue

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.