Announcement

Collapse
No announcement yet.

Script to turn on/off insteon device

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • canonian
    Guest replied
    Scripts control lights differently then status page?

    On my status page and can turn devices on and off no problem. I have a script that runs and when I test it turning on devices that work from the status page it does nothing? I added a one second delay between \2 and \1 thinking that might be an issue but it did not help. Again if I go to the status page and click ON for \2 or \1 the light comes on almost right away, but when the script fires nothing happens?

    Sub Main
    hs.ExecX10 "\2", "on", 0, 0
    hs.WaitSecs 1
    hs.ExecX10 "\1", "on", 0, 0
    hs.WaitSecs 300
    hs.ExecX10 "\2", "off", 0, 0
    End Sub

    I tried to shutdown homeseer (application not running as a service) and it said running shutdown script and hung there. I had to end task it, when I restarted the homeseer application and ran my script it worked. hmmm?? Homeseer also says the script is taking longer than expected, I thought wiatsecs was supposed to avoid this?

    Leave a comment:


  • canonian
    Guest replied
    Originally posted by Bill Brower View Post
    He figured it out while we were both typing.

    Good luck!
    Bill & Rupp thank you!

    Now where is the function to say if it is between 1 hour before sunset and 1 hour after sunrise turn on a light?

    I found the sunrise seunset functions but can not find a function to get the current time and compare to sunset & sunrise plus or minus an hour?

    I want to turn on the outside lights when the garage door is opened (dry contact x10) but only turn the lights on when it fits the times above?

    Leave a comment:


  • Bill Brower
    replied
    He figured it out while we were both typing.

    Good luck!

    Leave a comment:


  • Rupp
    replied
    When you added your Insteon switches it should have created devices for each item added with a device code like [1 or something similar. This is the code you use to control the device.

    Leave a comment:


  • canonian
    Guest replied
    Got it, the codes have a "\" before them..

    Leave a comment:


  • canonian
    Guest replied
    Originally posted by Bill Brower View Post
    What's the device code for your Insidious light switch?

    Check SetDeviceStatus in the HomeSeer Help.
    I am not sure how to answer this, Insteon switches are not assigned X10 codes by default. It seems as homeseer discovers them they are assigned a code like "0E.C0.75" but if I used that in a script it does not work.

    For example: hs.ExecX10 "0E.C0.75", "on", 0, 0
    Last edited by ; October 31, 2008, 08:04 PM.

    Leave a comment:


  • Bill Brower
    replied
    What's the device code for your Insidious light switch?

    Check SetDeviceStatus in the HomeSeer Help.

    Leave a comment:


  • canonian
    Guest replied
    Originally posted by Rupp View Post
    Same commands work for both.
    Ah ok, but with X10 commands you specify the device id A1, B9 etc. What do you specify for Insteon?

    Leave a comment:


  • Rupp
    replied
    Same commands work for both.

    Leave a comment:


  • canonian
    Guest started a topic Script to turn on/off insteon device

    Script to turn on/off insteon device

    I have done a few scripts and turning x10 devices on and off is a cinch, but what command do you use to turn insteon devices on and off?
Working...
X