I need some guidance on setting up a virtual device in HS4. I am only using X10 at this point, and want to setup a virtual device for use as an status indicator only (i.e. not controlling a physical device). I want to be able to interrogate the status of the device as either ON or OFF. I don't want it assigned to an X10 housecode/device code in order to save available codes.
I've setup the device and can switch it ON/OFF, but when I interrogate it using the following script, it says it's always OFF regardless of the visual status. I know that I have something wrong in the simple setup. I don't understand the various setup elements. (see image for setup)
Here's the script snippet.
DevRef = hs.GetDeviceRefByName("F17")
hs.Speak "Device Ref is " & DevRef
if hs.ison(DevRef) then
hs.Speak "F17 is on."
else
hs.speak "F17 is OFF."
end if
This script snippet works if the device is setup through the X10 plug-in as an X10 device, but not in the attached device setup.
Why does this always return that it's OFF?
I've setup the device and can switch it ON/OFF, but when I interrogate it using the following script, it says it's always OFF regardless of the visual status. I know that I have something wrong in the simple setup. I don't understand the various setup elements. (see image for setup)
Here's the script snippet.
DevRef = hs.GetDeviceRefByName("F17")
hs.Speak "Device Ref is " & DevRef
if hs.ison(DevRef) then
hs.Speak "F17 is on."
else
hs.speak "F17 is OFF."
end if
This script snippet works if the device is setup through the X10 plug-in as an X10 device, but not in the attached device setup.
Why does this always return that it's OFF?
Comment