uhubctl works fine on my Pi.

pi@raspberrypi4:/home/weewx $ sudo ./powercycleusb

Current status for hub 1-1 [0424:9514, USB 2.00, 5 ports]
  Port 2: 0100 power
Sent power off request
New status for hub 1-1 [0424:9514, USB 2.00, 5 ports]
  Port 2: 0000 off
Current status for hub 1-1 [0424:9514, USB 2.00, 5 ports]
  Port 2: 0000 off
Sent power on request
New status for hub 1-1 [0424:9514, USB 2.00, 5 ports]
  Port 2: 0100 power


My current command line is:

# <path-to>/uhubctl -d 15 -a cycle -p 2

And the O/S is

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"

pi@raspberrypi4:/home/weewx $ uname -a
Linux raspberrypi4 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019
armv7l GNU/Linux


This Pi is a 3-B v1.2 (quad core).

Bear in mind that you must not have any other power source for the
WeatherStation.  You must take the batteries out and/or disconnect any
wall-wart; thus powering the Station ~only~ from the Pi's USB port.

Dave, G1OGY


On Mon, 15 Jul 2019 at 14:08, HoracioDos <[email protected]> wrote:

> Hello Dave.
>
> Did uhubctl work for you? Which raspberry pi model do you have? Are you
> using a usb hub?
> uhubctl can disable port 2 but it still provide power to the weather
> station.so it can reset the WS.
>
> Any hint will be welcome.
> Thanks in advance!
>
>
> On Monday, July 15, 2019 at 7:06:46 AM UTC-3, Dave (G1OGY) wrote:
>>
>> Good news, Johannes!
>> I'm pleased it helps.
>>
>>
>> On Mon, 15 Jul 2019, 10:54 'Johannes Ebner' via weewx-user, <
>> [email protected]> wrote:
>>
>>> Thanks, works perfectly for me!
>>>
>>> Br,
>>> Johannes
>>>
>>> Am Sonntag, 23. Juni 2019 10:06:18 UTC+2 schrieb Dave, G1OGY:
>>>>
>>>>
>>>>
>>>> On Sunday, 23 June 2019 07:30:53 UTC+1, Johannes Ebner wrote:
>>>>>
>>>>> How is this script working?
>>>>>
>>>>> Do you run it once and it stays in the background? Or do you run it
>>>>> via crontab?
>>>>>
>>>>>
>>>>>>
>>>> ATM it is running from the command line as I did not want to reboot the
>>>> Pi:
>>>>
>>>>      /home/weewx/monitorlockup &
>>>>
>>>> I have also added that command line to /etc/rc.local so that the script
>>>> will start on reboot.
>>>>
>>>> The monitoring script sits in the background waiting for a log print.
>>>> When weewx writes to the log file the script wakes up and checks the new
>>>> log line(s) for "Errno 110".  If the string is absent the script goes back
>>>> to waiting for the next log print.  If the print is an error line then it
>>>> fires off the second script to powercycle the relevant USB port.
>>>> You can watch it come alive every 5 minutes with `top(1)`.
>>>>
>>>> Obviously, you will need to have acquired and built the source of
>>>> `uhubctrl` in advance.
>>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "weewx-user" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/weewx-user/owhSpmklNlc/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/weewx-user/3ad78732-5dd1-4d75-94f3-f1a8caef38d0%40googlegroups.com
>>> <https://groups.google.com/d/msgid/weewx-user/3ad78732-5dd1-4d75-94f3-f1a8caef38d0%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/weewx-user/owhSpmklNlc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/51dc66c7-d2ca-4e85-bb11-5e44f657fb63%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/51dc66c7-d2ca-4e85-bb11-5e44f657fb63%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAKOSXUE_UTm2DohZPOjQwsG51P-OT%3DVqLRSiAO7dzw2cZPr6qA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to