Hi John,
Glad you got it working!
Cheers
Al
Announcement
Collapse
No announcement yet.
HS3 Upgrade - scripting not working - Solved!
Collapse
X
-
YES!!!! Thank you. That got me in the right direction. The information in this thread I came across was extremely useful too when trying to understand the CAPIControl object model: http://board.homeseer.com/showthread.php?t=161009
Power on for the receiver turned out to be HS.CapiControlHandler(HS.CapiGetSingleControl(190,True,"On", False,False))
Thanks,
John.
Leave a comment:
-
You likely need to use a CAPI control command. Here's one that sets a dim command to a light switch:
Code:hs.CAPIControlHandler(hs.CAPIGetSingleControl(targetDev,false,targetDim,false,true))
Cheers
Al
Leave a comment:
-
If it helps, with debug logging turned on. If the receiver is powered on and executing &hs.SetDeviceValue(190,1) from the immediate window
08/07/2014 21:58:26...Debug~~!~~Data '' sent by Pioneer AVR device '192.168.200.82:23'.
08/07/2014 21:58:26...Debug~~!~~Sending command '?P' to Pioneer AVR device '192.168.200.82:23', waiting for response 'PWR'.
08/07/2014 21:58:26...Debug~~!~~Sending command '?P' to Pioneer AVR device '192.168.200.82:23', attempt #1.
08/07/2014 21:58:26...Debug~~!~~Entered SendToPAVR() function.
08/07/2014 21:58:26...Debug~~!~~Sending '' to Pioneer AVR device '192.168.200.82:23' via Ethernet.
08/07/2014 21:58:26...Debug~~!~~Data 'R' sent by Pioneer AVR device '192.168.200.82:23'.
08/07/2014 21:58:26...Debug~~!~~Entered SendToPAVR() function.
08/07/2014 21:58:26...Debug~~!~~Sending '?P' to Pioneer AVR device '192.168.200.82:23' via Ethernet.
08/07/2014 21:58:26...Debug~~!~~Waiting for the Pioneer AVR device '192.168.200.82:23' to respond with 'PWR [Power]' for up to 1.5 seconds...
08/07/2014 21:58:26...Debug~~!~~Data 'R' sent by Pioneer AVR device '192.168.200.82:23'.
08/07/2014 21:58:26...Debug~~!~~Data 'PWR0' sent by Pioneer AVR device '192.168.200.82:23'.
08/07/2014 21:58:26...Debug~~!~~Entered ProcessCommand() function.
08/07/2014 21:58:26...Debug~~!~~Expected command response 'PWR [Power]' received from Pioneer AVR device '192.168.200.82:23'.
08/07/2014 21:58:26...Debug~~!~~PAVR1_main-power->0
08/07/2014 21:58:26...Debug~~!~~Device address PAVR1_main-power was found.
08/07/2014 21:58:26...Debug~~!~~Pioneer AVR device '192.168.200.82:23' Power=On
08/07/2014 21:58:26...Debug~~!~~Waited 207 milliseconds for the command response '?P' from Pioneer AVR device '192.168.200.82:23'.
And running &hs.SetDeviceValue(190,0) with the receiver on
08/07/2014 22:00:27...Debug~~!~~Data '' sent by Pioneer AVR device '192.168.200.82:23'.
08/07/2014 22:00:27...Debug~~!~~Watchdog Timer indicates a response from the Pioneer AVR device '192.168.200.82:23' was received at 08/07/2014 21:59:57.
08/07/2014 22:00:27...Debug~~!~~Watchdog Timer indicates a response from the Pioneer AVR device '192.168.200.82:23' was received 30 seconds ago.
08/07/2014 22:00:27...Debug~~!~~Checking if the Pioneer AVR device '192.168.200.82:23' is powered on ...
08/07/2014 22:00:27...Debug~~!~~Sending command '?P' to Pioneer AVR device '192.168.200.82:23', waiting for response 'PWR'.
08/07/2014 22:00:27...Debug~~!~~Sending command '?P' to Pioneer AVR device '192.168.200.82:23', attempt #1.
08/07/2014 22:00:27...Debug~~!~~Entered SendToPAVR() function.
08/07/2014 22:00:27...Debug~~!~~Sending '' to Pioneer AVR device '192.168.200.82:23' via Ethernet.
08/07/2014 22:00:27...Debug~~!~~Data 'R' sent by Pioneer AVR device '192.168.200.82:23'.
08/07/2014 22:00:27...Debug~~!~~Entered SendToPAVR() function.
08/07/2014 22:00:27...Debug~~!~~Sending '?P' to Pioneer AVR device '192.168.200.82:23' via Ethernet.
08/07/2014 22:00:27...Debug~~!~~Waiting for the Pioneer AVR device '192.168.200.82:23' to respond with 'PWR [Power]' for up to 1.5 seconds...
08/07/2014 22:00:27...Debug~~!~~Data 'R' sent by Pioneer AVR device '192.168.200.82:23'.
08/07/2014 22:00:27...Debug~~!~~Data 'PWR0' sent by Pioneer AVR device '192.168.200.82:23'.
08/07/2014 22:00:27...Debug~~!~~Entered ProcessCommand() function.
08/07/2014 22:00:28...Debug~~!~~Expected command response 'PWR [Power]' received from Pioneer AVR device '192.168.200.82:23'.
08/07/2014 22:00:28...Debug~~!~~PAVR1_main-power->0
08/07/2014 22:00:28...Debug~~!~~Device address PAVR1_main-power was found.
08/07/2014 22:00:28...Debug~~!~~Pioneer AVR device '192.168.200.82:23' Power=On
08/07/2014 22:00:28...Debug~~!~~The Pioneer AVR device '192.168.200.82:23' is powered on.
08/07/2014 22:00:28...Debug~~!~~Watchdog Timer thread for the Pioneer AVR device '192.168.200.82:23' sleeping for 30000.
08/07/2014 22:00:28...Debug~~!~~Waited 208 milliseconds for the command response '?P' from Pioneer AVR device '192.168.200.82:23'.
So this looks like a plugin problem from what I can diagnose and looking at the RS232/Ethernet Pioneer protocol documentation. It doesn't appear the plugin ever sends the command to change the power state (P0 in this case to power off)
Leave a comment:
-
Anyone? I know the "ByName" value is correct as hs.WriteLog("Test",hs.GetDeviceRefByName("Receiver PAVR1 Power")) returns the right number (190 in my case) which I supply as n to SetDeviceValue. Just nothing ever happens - whether passing 0, 1 or -1 as 'x'. This is my last stumbling block on the way to full-on HS3 migration. Can't figure out what I might be doing wrong, or whether there's a HS3 or UltraPioneerAVR bug stopping this working.
Thanks,
John.
Leave a comment:
-
HS3 Upgrade - scripting not working - Solved!
In HS2 .vb script, I used
hs.SetDeviceValue(szAmplifierPowerDeviceCode, iAmplifierNewPowerState)
to turn the receiver on which has worked great for a year or more.
In HS3, I'm trying the same using both the command/immediate (prefixed with &) and in a .VB script, and just nothing happens on the receiver.
I've used SetDeviceValueByName("Receiver PAVR1 Power", x) where x is 0 or 1 and SetDeviceValue(n,x) where n is the reference id shown when selecting the PAVR1 Power device in the advanced tab. HS doesn't balk, it just seems to silently ignore it (and obviously nothing changes on the receiver).
Should I be doing something different to invoke this in the HS3 version of the plugin? The receiver works great under control from device management. Just not from script.
(I need to control other functions such as inputs, other zone power, volume too... - if I can get one to work, I'm sure I can work out the rest).
Thanks,
John.Tags: None
Leave a comment: