[Nut-upsuser] R: NUT and relay on USB

Maurizio Iacaruso maurizio.iacaruso at gmail.com
Tue Jan 20 12:43:15 UTC 2015


So, just as recap:
I connect USB A (female) to USB B (male) adapter -> HUB -> 2 USB wires male
to male,  one to raspberry and another one to my device.

Thanks a lot.
I hope that it works fine :)

Maurizio 

-----Messaggio originale-----
Da: Charles Lepple [mailto:clepple at gmail.com] 
Inviato: martedì 20 gennaio 2015 13:38
A: Maurizio
Cc: NUT List
Oggetto: Re: [Nut-upsuser] NUT and relay on USB

On Jan 20, 2015, at 4:39 AM, Maurizio <maurizio.iacaruso at gmail.com> wrote:

> Hi there,
> I have a question about a raspberry pi as NUT server and a "relay".
> I explain my situation: I have an UPS with USB port, so I connect it 
> to the rasp. The problem is that I have a device manageable only via 
> USB port.
> How can I handle this configuration?
> My assumptions are:
> 1) split the USB cable from UPS to rasp and device, but I don't know 
> if it works

As Manuel mentioned, you will need a USB hub. It will work better with an
external power supply for the hub.

However, if you don't already have a hub, you may want to consider a
Raspberry Pi Model B or B+, with 2 or 4 ports, respectively.

> 2) connect the UPS to rasp directly, so connect the rasp (by GPIO) to 
> device as a Serial port with a DIY cable.
> 
> The problem with second solution is that I don't know if (and how) I 
> can do it with NUT.
> 

I don't think anyone has tried connecting to the serial port on the RPi
expansion header, but NUT should not have a problem (as long as the driver
is not expecting flow control pins). However, the serial port is TTL levels,
so you would need a TTL-to-RS-232 level shifter chip. The USB hub would be a
lot simpler, IMHO. 

--
Charles Lepple
clepple at gmail







More information about the Nut-upsuser mailing list