USB reset / power cycle

Hi,

There should be an interface and entities to reset an usb dongle, and worse but sometimes necessary power cycle-it.
Sometimes my bluetooth dongle crashes, and I need to physically unplug it if near, otherwise do a complete HA powercycle.
Sometimes my z-wave dongle becomes non-responsive also.

Some links:
Ubuntu package usbreset, redhat usb-reset,…
USBPower /GitHub - mvp/uhubctl: uhubctl - USB hub per-port power control

don’t forget to vote your own request :wink:

I also would love to push a button to hard reset my USB devices, if possible. Especially, if my remote location has a problem, so I would not need to travel :slight_smile:

Though I see value in it, I do ask if that Bluetooth dongle maybe needs a firmware update to keep it from crashing to fix the problem rather than produce a work-around.

1 Like

I have the same problem with my z-wave dongle whenever I reboot my RPi. I’ve started using these: SONOFF Micro USB Smart WiFi Adaptor 5V (https://www.amazon.com/Adaptor-Devices-Compatible-Assistant-Required/dp/B087LTP9KN/ref=sr_1_1?crid=1WYF18DYM6DSX&keywords=SONOFF+Micro+USB+Smart+WiFi+Adaptor+5V&qid=1695849260&s=books&sprefix=sonoff+micro+usb+smart+wifi+adaptor+5v%2Cstripbooks%2C86&sr=1-1)

I created an automation that waits until the reboot is done then turns the z-wave adapter off for 10 seconds then restarts. Seems to work.

That’s too easy…

Some Zwave sticks need to be reset sometimes, but the same sticks run endlessly on other platforms.
It could be the drivers, the addons, Linux, whatever.

But if the problem does not get solved, where it needs to be solved, and a single mouse click does the trick, COME HERE with that mouse click :slight_smile:

2 Likes

An automation is better than nothing :stuck_out_tongue:
Everything can crash once in a while

1 Like

Can you gently share your automation?
I have the same problem with skyconnect, after reboot my zigbee devices are not recognised.

Thank you in advance

First off is hardware: I use this: SONOFF Micro USB Smart WiFi Adaptor 5V Smart Switch for Type A USB Devices (Amazon:
https://www.amazon.com/Micro-USB-Smart-Adaptor-Compatible/dp/B083BKBKW5

Then automation:

alias: Reboot Z-Wave Hub
description: ""
trigger:
  - platform: template
    value_template: >
      {{ (as_timestamp(now()) - as_timestamp(states('sensor.last_boot')))|int(0)
      > 180  }}
condition: []
action:
  - service: scene.turn_on
    target:
      entity_id: scene.micro_1_off
    metadata: {}
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - service: scene.turn_on
    target:
      entity_id: scene.micro_1_on
    metadata: {}
  - service: input_text.set_value
    data:
      value: "{{now().timestamp()| timestamp_custom('%I:%M:%S %p %a', default = 0) }}"
    target:
      entity_id: input_text.z_hub
mode: single


There are two scenes one with the microswitch on & one off.

I imagine there are more efficient ways of doing this.   It was from last August & I experimented with different ways & for some reason this is what I came up with.

I hope it helps.

--Nat

type or paste code here

I have the same issue and recently bought the same sonoff micro however, I do not seem to be getting any data connectivity. Did anyone have the same issue? Could I flash with different firmware?