First off, Im an end user with ComposerHE (yeah I know...)
So I have a Leaf LU862 HDMI matrix in my rack, connected via a Powerpak 8i. This thing runs at 150W all day long and there is no standby option / power management which is frankly a bit crap.
I started off by tying in alarm events (arming / disarming) with controlling the Powerpak Outlet for the matrix. Obviously with this approach, I have to accept that it takes 2-3 minutes for the HDMI matrix to come back online in the project and any operation of TV's before that time may be met with no picture and having to room off and on again a few minutes later.
I've also had to contend with the weekend scenario when I want a lie in and the kids want to watch TV in bed, so I've managed this with a scheduled event that powers on the socket if it's not already on at 6:55am on Saturday's and Sunday's...
So far all this has been working without issue, however, since either my wife or I am at home most of the day during the week but we're not watching the TV's, the matrix is still on from when we disarm the alarm at around 6:30am until I go to bed around 1am... So I wanted to think about ways to manage this device further.
Unfortunately, there is no power state event on the PDU port, only a Power level changed. This is a bit excessive for determining when a device is powered on or off, as it triggers every time the power consumption changes, which is constantly fluctuating. Since I don't like the idea of lots of events firing programming all the time with no purpose, my approach was to create a custom variable called HDMIMATRIX_POWER_STATE which is set to either OFFLINE / BOOTING / ONLINE.
I created two macro's to turn on and off the PDU port and remind myself to use these wherever I want to manage the HDMI matrix power rather than directly controlling the PDU port. This way, the system variable will be updated as well as the PDU port controlled.
When the Off macro is called, it sets the variable to OFFLINE and shuts down the PDU port. It also cancels the timer below if it is running.
When the On macro is called, if the PDU port power = 0W then it sets the variable to BOOTING, and starts a HDMI booting timer.
The HDMI booting timer, turns on the PDU port when the timer is started (3m 5s). When the timer expires, it sets the system variable to ONLINE.
The above effectively gives me a power state variable for the HDMI matrix, but it is dependant on the device being responsive within the timer period set (which seems a bit hit and miss).
2 questions then....
Number 1, is there a better way to determine when the HDMI matrix is online / responding to my wait for 3m 5s timer currently?
Number 2, once I have confidence in this variable, how am I going to handle watch requests when the device is not ONLINE? My thoughts on this thus far is to check the Watch button press on all rooms (bit of a pain) and if the device is not online, call the On macro, but then somehow I need to delay the Watch request until such time the device is online or use something like an announcement to tell the user that the HDMI matrix has just been started and to try again shortly?
Any better ideas?