Announcement

Collapse
No announcement yet.

Status does not seem to work in VB Script

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

    Status does not seem to work in VB Script

    I am using a EZIO2X4 for monitoring my Pool Cover and another for my Alarm System. I have the SimpleHomeNet Plugin 1.0.2.0 with HS2 software.

    If I set up events for "Device Status Change" the EZIO devices work with Homeseer Events for triggers or as a relay output.

    If I use the following VB code with a Smarthome I/OLinc 2450 (or any other X10, Zwave, Insteon interface) I get the proper status.

    If I use the VB code below with the SimpleHomeNet EZIO2x4 and SimpleHomeNet Plugin, I do not get proper status.

    VB Code ->

    hs.speak ("The Office Test Input Status is ")
    hs.speak (hs.devicestatus("'11"))

    hs.speak ("The Office Test Input Value is ")
    hs.speak (hs.devicevalue("'11"))

    or if added as an Event Action of "Speak" ->

    The Pool Cover Opened Status is $$DV:'11
    The Pool Cover Closed Status is $$DV:'12

    I can't get status and I need it for If, Then, Else coding.

    Just a thought - could this be because all of my SimpleHomeNet Codes begin with the ' character which means "comment follows" in VB?

    Thanks,

    Doug Hurrell

    #2
    Doug,

    It sounds like this is an issue with HomeSeer and not the SimpleHomeNet plugin. The hs.devicestatus, hs.devicevalue, and hs.speak commands all interact directly with HS and not the plugin. I am guessing that the ' is causing the problem. You may want to try using "chr(39)" instead of ' and see if that fixes the problem.

    Adam

    Originally posted by Camguy52 View Post
    I am using a EZIO2X4 for monitoring my Pool Cover and another for my Alarm System. I have the SimpleHomeNet Plugin 1.0.2.0 with HS2 software.

    If I set up events for "Device Status Change" the EZIO devices work with Homeseer Events for triggers or as a relay output.

    If I use the following VB code with a Smarthome I/OLinc 2450 (or any other X10, Zwave, Insteon interface) I get the proper status.

    If I use the VB code below with the SimpleHomeNet EZIO2x4 and SimpleHomeNet Plugin, I do not get proper status.

    VB Code ->

    hs.speak ("The Office Test Input Status is ")
    hs.speak (hs.devicestatus("'11"))

    hs.speak ("The Office Test Input Value is ")
    hs.speak (hs.devicevalue("'11"))

    or if added as an Event Action of "Speak" ->

    The Pool Cover Opened Status is $$DV:'11
    The Pool Cover Closed Status is $$DV:'12

    I can't get status and I need it for If, Then, Else coding.

    Just a thought - could this be because all of my SimpleHomeNet Codes begin with the ' character which means "comment follows" in VB?

    Thanks,

    Doug Hurrell

    Comment


      #3
      Cannot change Base Code on SimpleHomeNet from ' to anything else

      If I try to change the Base Code in the SimpleHomeNet.ini file, I get an error message on boot and it resets the Base Code to blank.

      It won'r let me change the base code.

      Comment


        #4
        I think Adam was asking you to try the following VB code:

        hs.speak ("The Office Test Input Status is ")
        hs.speak (hs.devicestatus(chr(39) & "11"))

        hs.speak ("The Office Test Input Value is ")
        hs.speak (hs.devicevalue(chr(39) & "11"))
        Jon

        Comment


          #5
          Still no Status !!!

          When I try to run with the code below I get:

          hs.speak ("The Office Test Status is ")
          hs.speak (hs.devicestatus(chr(39) & "7"))

          hs.speak ("The Office Test Input Value is ")
          hs.speak (hs.devicevalue(chr(39) & "7"))

          Result:

          The Office Test Status is 17

          The Office Test Input Value is 0

          ...regardless of the input state of the EXIO2x4.

          Status does change from ON to OFF on the Status Screen with Code '7 but I cannot externally access the device's status via script.

          Comment


            #6
            Do you have HS2 Pro?

            If so you can look at the actual values of a device by clicking on the name link for '7 on the status page and then selecting the 'Additional Information' button.
            Jon

            Comment


              #7
              The SimpleHomeNet Plugin Does Not Support Status !!!!!

              Thank you jon00. I never realized I could check this screen for Additional Plugin Information.

              The SimpleHomeNet Plugin with the EZIO4x2 has "Supports Status" listed as "False"!! It will only trigger an event based on an input change, you can't make decisions on the status at a later time or if that input status change is missed.

              I do not understand how an I/O Module Plugin can be sold that does not "Support Status". I've spent many frustration hours getting to this point with SimpleHomeNet.

              The Insteon Plugin by Mark Sanders with the I/O Linc 2450 does support status which means you can write script around it.

              Until the author of the SimpleHomeNet plugin addresses this issue, I'd recommend against this plugin.

              Doug

              Comment


                #8
                Doug,

                According to the HS documentation, the Support Status was for X10 devices so it was not enabled for this plugin. I will however release an update that will enable the Support Status to see if that solves this issue.

                Adam

                Originally posted by Camguy52 View Post
                Thank you jon00. I never realized I could check this screen for Additional Plugin Information.

                The SimpleHomeNet Plugin with the EZIO4x2 has "Supports Status" listed as "False"!! It will only trigger an event based on an input change, you can't make decisions on the status at a later time or if that input status change is missed.

                I do not understand how an I/O Module Plugin can be sold that does not "Support Status". I've spent many frustration hours getting to this point with SimpleHomeNet.

                The Insteon Plugin by Mark Sanders with the I/O Linc 2450 does support status which means you can write script around it.

                Until the author of the SimpleHomeNet plugin addresses this issue, I'd recommend against this plugin.

                Doug

                Comment


                  #9
                  I have attached an update that enables the status_support option. I tested the update and using it appears to be compatible with your VB script.

                  To install do the following:
                  1. Shutdown Homeseer
                  2. Unzip the file from the attachment
                  3. Copy the unzipped file to your HomeSeer directory
                  4. Restart Homeseer
                  You will need to delete all SimpleHomeNet devices using the SimpleHomeNet Configuration menu and then re-add them in order for this change to take effect.

                  Let me know if you have any questions,

                  Adam
                  Attached Files

                  Comment


                    #10
                    Status Still Does Not Work

                    I updated my HSPI_SIMPLEHOMENET.dll file to 1.0.2.3 you just released and restarted Homeseer.

                    The EZIO4x2 is registered with the plugin and reporting accurate status (on input 2 & 4 which are closed) as outlined in the attached jpg (SimpleHomeNet Status 3.jpg).

                    I wrote the following code to check each of the 4 Input Status and Values:

                    hs.speak ("The SimpleHomeNet Input 1 status is ")
                    hs.speak (hs.devicestatus(chr(39) & "4"))
                    hs.speak ("The SimpleHomeNet Input 2 status is ")
                    hs.speak (hs.devicestatus(chr(39) & "5"))
                    hs.speak ("The SimpleHomeNet Input 3 status is ")
                    hs.speak (hs.devicestatus(chr(39) & "6"))
                    hs.speak ("The SimpleHomeNet Input 4 status is ")
                    hs.speak (hs.devicestatus(chr(39) & "7"))

                    hs.speak ("The SimpleHomeNet Input 1 value is ")
                    hs.speak (hs.devicevalue(chr(39) & "4"))
                    hs.speak ("The SimpleHomeNet Input 2 value is ")
                    hs.speak (hs.devicevalue(chr(39) & "5"))
                    hs.speak ("The SimpleHomeNet Input 3 value is ")
                    hs.speak (hs.devicevalue(chr(39) & "6"))
                    hs.speak ("The SimpleHomeNet Input 4 value is ")
                    hs.speak (hs.devicevalue(chr(39) & "7"))

                    You can see the actual status below in the attached jpg labeled "Actual VB Status 3.jpg".

                    Needless to say, the new plugin is not working. I have already sent back 1 of my 2 EXIO4x2s for credit and switched over to the I/O Linc 2450s for monitoring my pool status.

                    I will spend another hour checking out a new release, but unfortunately, this has got to be my last go around.

                    Doug
                    Attached Files

                    Comment


                      #11
                      Doug,

                      Did you delete the EZIO2X4 device using the SimpleHomeNet configuration page? The device needs to be deleted and readded using the configuration page for the status_support field to change to true. Once this is done, the VB script should work properly.

                      Adam

                      Originally posted by Camguy52 View Post
                      I updated my HSPI_SIMPLEHOMENET.dll file to 1.0.2.3 you just released and restarted Homeseer.

                      The EZIO4x2 is registered with the plugin and reporting accurate status (on input 2 & 4 which are closed) as outlined in the attached jpg (SimpleHomeNet Status 3.jpg).

                      I wrote the following code to check each of the 4 Input Status and Values:

                      hs.speak ("The SimpleHomeNet Input 1 status is ")
                      hs.speak (hs.devicestatus(chr(39) & "4"))
                      hs.speak ("The SimpleHomeNet Input 2 status is ")
                      hs.speak (hs.devicestatus(chr(39) & "5"))
                      hs.speak ("The SimpleHomeNet Input 3 status is ")
                      hs.speak (hs.devicestatus(chr(39) & "6"))
                      hs.speak ("The SimpleHomeNet Input 4 status is ")
                      hs.speak (hs.devicestatus(chr(39) & "7"))

                      hs.speak ("The SimpleHomeNet Input 1 value is ")
                      hs.speak (hs.devicevalue(chr(39) & "4"))
                      hs.speak ("The SimpleHomeNet Input 2 value is ")
                      hs.speak (hs.devicevalue(chr(39) & "5"))
                      hs.speak ("The SimpleHomeNet Input 3 value is ")
                      hs.speak (hs.devicevalue(chr(39) & "6"))
                      hs.speak ("The SimpleHomeNet Input 4 value is ")
                      hs.speak (hs.devicevalue(chr(39) & "7"))

                      You can see the actual status below in the attached jpg labeled "Actual VB Status 3.jpg".

                      Needless to say, the new plugin is not working. I have already sent back 1 of my 2 EXIO4x2s for credit and switched over to the I/O Linc 2450s for monitoring my pool status.

                      I will spend another hour checking out a new release, but unfortunately, this has got to be my last go around.

                      Doug

                      Comment


                        #12
                        Status still doesn't work

                        I think you still have a bug in your code.

                        I tried once again to delete the EZIO2x4 from the Simplehomenet configuration page and "Added a New Interface" on that same page.

                        This time it gave new Codes to the interface from "'2" thru "'5" instead of the previous "'4" thru "'7".

                        First, the status is still bad - see below.

                        And more importantly, I checked your "SimpleHomeNet.ini file" (see below) and the time/date stamp was correct (i.e. it had just been written) but the device addresses were still the old values !!!!

                        Doug
                        Attached Files

                        Comment


                          #13
                          When the EZIO2X4 is added there should be a total of 7 devices (root, output1, output2, opto-isolated input1, opto-isolated input2, digital/analog input1 and digital/analog input2). As long as you have no other EZIO devices, these should take up device codes 1 through 7. I just ran several tests of deleting the devices and adding them back and it is working correctly on my machine. I also ran your script and it correctly read status changes. The value is 0 since the inputs in digital mode do not change the device value only the status.

                          The ini file you posted looks correct so you may want to try deleting the device from the SimpleHomeNet Configuration page, then go back to the Status page and make sure that all EZIO devices are deleted. After you do that, then shut down HomeSeer and make sure that the [DEVICE1] section of the INI file is blank. Restart HomeSeer and this will force the SimpleHomeNet plugin to release the housecode since no devices are registered to the plugin. Then after doing this you can add the EZIO device back using the configuration page.

                          The status of "17" you are receiving is correct if the device was just added. 17 is an unknown status and the devices won't show a 2 or 3 status until the device has been polled. You can either manually poll from the status page or setup a timed poll in the configuration page. After the device has been polled, the status will update and you should be able to see the status changes using your script.

                          Adam

                          Originally posted by Camguy52 View Post
                          I think you still have a bug in your code.

                          I tried once again to delete the EZIO2x4 from the Simplehomenet configuration page and "Added a New Interface" on that same page.

                          This time it gave new Codes to the interface from "'2" thru "'5" instead of the previous "'4" thru "'7".

                          First, the status is still bad - see below.

                          And more importantly, I checked your "SimpleHomeNet.ini file" (see below) and the time/date stamp was correct (i.e. it had just been written) but the device addresses were still the old values !!!!

                          Doug

                          Comment

                          Working...
                          X