Skip to content
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

Hot insert of Sonoff Plus E dongle into Raspberry PI with HA Core crashes half HA #160

Open
w-Oeps opened this issue Dec 6, 2024 · 1 comment

Comments

@w-Oeps
Copy link

w-Oeps commented Dec 6, 2024

Hi,
I have some strange issues with adding a brandnew Sonoff dongle E v2.
Some context, I have two HA systems:

  1. HAtest on an X86 system using Proxmox with HA core 2024.11.3, OS 14
  2. HAprod on a RPI4 using a original RPI power adapter with HA core 2024.11.3, OS 14

I'm moving from Domoticz/Deconz to HA/SonoffE/M2Z
First I flashed the ember firmware to the dongle (ncp-uart-hw-v7.4.5.0-zbdonglee-115200.gbl).

The good
Hotplugged the Sonoff to HAtest and could easily setup a new mini Zigbee network (used ZHA, but decided to go for Z2M when the first 2 exotic sensors were not recognized :-)

The bad

  • Installed Zigbee2MQTT on my HAprod but did not yet configure.
  • Hotplugged the adapter to HAProd and the issues began.
  • HA became unresponsive and some HA pages did not work.
  • Removed power and attached a monitor to the RPI4 to see what was happening. As soon as the Sonoff was plugged The following messages appeared (many times repeated). sda3 is an OS mount and it switched between sda3 and sda5 when OS upgrades are performed.
    The errors:
    First time :
erofs: (device sda5): erofs_read_inode: failed to get inode (nid: 3103888) page, err -5
Buffer I/O error on sda5, logical block 24305, async page read.

(The nid and block vary)

Upgraded HAOS and a few days tried again:

erofs: (device sda3): erofs_read_inode: failed to get inode (nid: 3099719) page, err -5
Buffer I/O error on sda5, logical block 24212, async page read.

(The nid and block vary)

  • Removing the adapter made HA responsive again but with some strange errors:
    • Developer tools - configuration.yaml not found
    • 1 repair - Multiple data disks detected (could not click further to repair)
  • Removed power from RPI4. Restart, everything OK again without the Sonoff adapter! pffff
  • No logging available in HA. During that time frame nothing was logged. Also no logging found around that time in the system.journal in /var/log

Shutting down the raspberry PI, inserting the Sonoff dongle, starting HA goes without an issue.

Is hotplug USB supported?

@darkxst
Copy link
Owner

darkxst commented Dec 8, 2024

Generally hotplug USB should not be an issue. You would just restart Z2M addon afterwards and all is good.

  • sda3 is an OS mount and it switched between sda3 and sda5 when OS upgrades are performed.

This is expected HA uses an A/B boot system so there are dual rootfs partitions, they get switched on each HAOS upgrade, but also automatically after 3 failed boot attempts as a recovery tool.

I dont see how inserting sonoff dongle could trigger filesystem errors, what storage are you using for HA drive? There could be something else going on here, such as faulty SD Card or SSD.

There was however a comment elsewhere I noticed relating to power settings on rpi.
home-assistant/core#132124 (comment)

Dongle-E does not use much power in the context of USB devices, mostly it should be under 100mA, but can peak at maximum ~200mA when transmitting at 20dBm. Weird things happen if it doesnt get enough power (strange Zigbee issues etc) but it shouldnt impact the host system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants