PDA

View Full Version : Power down a USB port when user puts box in Standby?



clivejo
25-05-19, 16:58
I have a power saving device which plugs into a USB port and switches on the power extension bar when it sees power on the USB port. Also when the USB port is unplugged or powered down the extension bar shuts down too. This worked great with old equipment as is powered off the TV, DVD and other peripherals when the satellite box was put in standby.

Is there any way to do this with the Zgemma H7S? Id like some way to put the TV in standby or powered off when the Zgemma H7S has been.

twol
25-05-19, 17:07
What happens when you put it into deep standby?

clivejo
25-05-19, 20:31
But I don't want it powering up the TV, DVD, side lights, and other peripherals when the satellite receiver wakes to process a timer.

cactikid
25-05-19, 20:41
Never heard of that one before but asking how long did you wait to see if it shuts down on standby?

clivejo
26-05-19, 20:25
It doesn't seem to switch off at all when the box is in standby, maybe this is because I have a lot of timers keeping the box awake. Putting the box into deep standby does work, but then the box wakes up to process a timer it also seems to power up the USB ports, which in turn turns the power on to the TV, DVD, lights, etc

ronand
26-05-19, 22:06
ON and STANDBY modes are almost identical except there is no display output when in standby. In deep standby almost all of the receiver is switched off except for the timer.

birdman
27-05-19, 00:55
It doesn't seem to switch off at all when the box is in standby,As noted elsewhere, this is to be expected. The box is still running - you can login to for a start.
So the USB ports will be powered up, And they will power up as soon as the box is powered up from any state in which they are not powered up (which is just Deep Standby or Off - as in no power to the box at all.

What event would be like to power up the USB port?

PS. It might be easier just to switch the TV on/off yourself...along with any auto-off functionality they have.

clivejo
27-05-19, 18:45
I was wondering if I could unbind the USB port when the standby button is pressed on the remote.

/sys/bus/usb/drivers/usb/unbind

and then bind it again when the remote brings the receiver back from standby.

twol
27-05-19, 19:49
The only way is to try it....
//https://lwn.net/Articles/143397/

.... but probably easier to use Birdmans suggestion!

birdman
28-05-19, 01:17
I was wondering if I could unbind the USB port when the standby button is pressed on the remoteWhich will be of no help when the system wakes up from a Deep Standby.

birdman
28-05-19, 01:21
I was wondering if I could unbind the USB port when the standby button is pressed on the remote.

/sys/bus/usb/drivers/usb/unbind

and then bind it again when the remote brings the receiver back from standby.I'd expect the power to be provided (by default) by the hardware rather than any software driver.

clivejo
28-05-19, 19:51
It depends on the hub, some can control it on a port by port bases. This is a utility I have used on a RaspberryPi - https://github.com/mvp/uhubctl

birdman
29-05-19, 01:00
It depends on the hub, some can control it on a port by port bases. This is a utility I have used on a RaspberryPi - https://github.com/mvp/uhubctlBut the box has to power up first, and when it does that the port will be active and have power.
I can't see it being able to boot up from scratch knowing not to power anything up....

clivejo
29-05-19, 16:54
But the box has to power up first, and when it does that the port will be active and have power.
I can't see it being able to boot up from scratch knowing not to power anything up....

Yes, that is fine. The energy saver extension block needs to sense power at the USB port to switch on the rest of the sockets. What I wanted to do was to kill the power to the USB ports when the box goes into standby, therefore turning off the power to the other devices.

ccs
29-05-19, 16:59
… trouble is, usb tuners and usb drives need to be on in standby, so it all gets very complicated.

Why not power everything off when you're not using them? That's what I've done for hundreds of years, and think of the extra power you'll be saving.

clivejo
29-05-19, 17:20
Why not power everything off when you're not using them? That's what I've done for hundreds of years, and think of the extra power you'll be saving.

That defeats the point of having the box. The main purpose of purchasing this box is to record programmes for watching later, therefore it needs to be able to power up and react to timers whenever needed. It also eliminates the need to have multiple remote controls to turn on and off other devices (ie the TV, speakers, DVD, lighting) as they all turn off when the box turns off power to the USB port.

ccs
29-05-19, 18:32
My "box" wakes up from deep standby and records everything I want to watch at a later date.

It records in standby. I switch on the telly if I want to watch something, and switch on the lighting when it gets dark.

And if I (very rarely) need the dvd player, I switch it on.

And I use a harmony remote to control everything, although I still tell it everything is already powered on so it doesn't need to get involved at all.

Maybe connect your power saving device to the tv instead, it might get closer to what you want to achieve.

Sorry, it's been a long day...….

clivejo
30-05-19, 19:12
So I ended up purchasing a Ecotek Standby Saver 6-Way Socket and programmed it to turn on/off the power when it detects when I press the standby button. Seems to be working and lets me away with using one remote to control everything.

abu baniaz
30-05-19, 20:21
Is you receiver connected to this socket?
If so, does it shut down (deep standby) properly before power is cut?

clivejo
31-05-19, 12:23
There are two "special" sockets and four regular. The two have switches on them allowing you to choose always on or switched. I have the ZGemma plugged into one and have it always powered.

Now when I press the power/standby on the remote it also toggles the power to the other devices (TV, DVD, lights, and other stuff only used when the TV is on).

Seems to do the job nicely and only need one remote.