I use the following lines in startup.txt and shutdown.txt to open / close respectively the comm port connected to the Yamaha receiver:
The basics for dealing with comm ports in OpenComPort were 'borrowed' from this board (Thanks!!). I've had plans to add setting virtual devices to states based on commands & responses from the receiver, but never got around 'tuit'.
Using the script alone monitors most commands and responses to and from the receiver using the HS log (this is where I would set the virtual devices...). Using another borrowed technology from the board, Frank Perricone's infrared vbs setup was modified to send serial codes to the Yamaha. (yamaha.vbs and a touchpad version yamaha_tp.vbs). These files rely on 'irs' files in html/infrared which define the button / command arrangement. I'm pretty sure I zipped up all the pieces (just don't sub your startup / shutdown scripts for mine if you've got other customizations in yours - I've renamed the ones in the zip file so you don't overwrite yours by accident).
PHP Code:
hs.run "OpenComPort.txt"
hs.run "comm_close_yamaha.txt"
Using the script alone monitors most commands and responses to and from the receiver using the HS log (this is where I would set the virtual devices...). Using another borrowed technology from the board, Frank Perricone's infrared vbs setup was modified to send serial codes to the Yamaha. (yamaha.vbs and a touchpad version yamaha_tp.vbs). These files rely on 'irs' files in html/infrared which define the button / command arrangement. I'm pretty sure I zipped up all the pieces (just don't sub your startup / shutdown scripts for mine if you've got other customizations in yours - I've renamed the ones in the zip file so you don't overwrite yours by accident).