Announcement

Collapse
No announcement yet.

Here is my beta script to support Insteon Thermostat Adapters

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #76
    Originally posted by jgodman View Post
    Do you mean you want to have separate HS devices listed for each of those items? So, a given thermostat would have four (or more) devices listed in HS?

    Interesting. I just took a look at one of the ELK-M1 plug-ins and that is what they do with the ELK thermostats (although I don't have any, it created the devices automatically). Strangely, I went to a great deal of trouble to avoid just that -- when I first wrote the script I wanted all the information about the thermostat to be included in one HS "device." In order to keep persistent data about those four vaiables in HS, I had to basically split out the four-byte "DeviceValue" and use one byte for each. It would have been much easier to do this with separate HS devices, but I thought that one physical device (the thermostat) should appear as one device in HS.

    Not a big deal to separate though. Maybe I can do it in a future version.

    Just curious, why do you want these to show up as separate HS devices? Is there something you can do with them that way that you couldn't if they were all kept in one device?

    -John
    Hey John.

    I actually want them separated so I could display each one appropriately and take action on each one independently. For example, on a main status page, I would show the temperature of the two different parts of the house and compare it to the temperature outside. If the house is cooler than the temperature outside, Homeseer could recommend opening some windows instead of running the heat. I use the devices variables since I guess I am use to working with devices instead of parsing information inside the devices.

    Not unlike how the three components of a motion sensor is broken into three devices to use them in events, etc. (motion, lighting, low battery).
    Last edited by leerogers; April 8, 2010, 11:32 AM.

    Comment


      #77
      Separate HS devices for temp, mode, coolset, heatset

      Originally posted by leerogers View Post
      Hey John.

      I actually want them separated so I could display each one appropriately and take action on each one independently. For example, on a main status page, I would show the temperature of the two different parts of the house and compare it to the temperature outside. If the house is cooler than the temperature outside, Homeseer could recommend opening some windows instead of running the heat. I use the devices variables since I guess I am use to working with devices instead of parsing information inside the devices.

      Not unlike how the three components of a motion sensor is broken into three devices to use them in events, etc. (motion, lighting, low battery).
      That makes sense -- I get it now, you could write custom HS events based on the separate devices/values. OK, I'll take a shot at it when I get some time. It may be a few weeks but I'll try and get to it.

      -John

      Comment


        #78
        Originally posted by jgodman View Post
        That makes sense -- I get it now, you could write custom HS events based on the separate devices/values. OK, I'll take a shot at it when I get some time. It may be a few weeks but I'll try and get to it.

        -John
        Thanks John, look forward to it. Even if you point to the approprate sections of code, I can take a look.

        Comment


          #79
          Hey John... until you have a chance to update the script, I actually modified the script to only update the HS device with the temp. Adding the ability to populate several devices proved more difficult for me. Works well with the exception of not being able to see the status of the other parameters like mode and setpoints.

          Comment


            #80
            Originally posted by leerogers View Post
            Hey John... until you have a chance to update the script, I actually modified the script to only update the HS device with the temp. Adding the ability to populate several devices proved more difficult for me. Works well with the exception of not being able to see the status of the other parameters like mode and setpoints.
            Hi Lee -- please post your modified script, maybe I can use your code! Sorry I haven't gotten around to this yet; I've kind-of been hoping some good samaritan will send me the command tables ...

            -John

            Comment


              #81
              John, I actually just butchered your code enough the strip out everything in the string that wasn't "temp". Nothing your skills would find useful, I guarantee :-)

              Code:
              ' build the device string
              NewDeviceString = (TTemp / 2).ToString
              'NewDeviceString = "Mode:&nbsp;" & TStatModeArray(TMode) & "<BR>" & "Temp:&nbsp;" & (TTemp / 2).ToString & "<BR>"
              I am much more comfortable with vbscript than VB.NET but I am guessing it would just require a couple of steps:

              <li>Instead of creating one device for each thermostat, create four each... ie:T+1, T+5, T+9, t+13 and T+2, T+6, T+10, T+14, etc. which would house "temp", "mode", "heatsetpoint", "coolsetpoint" for up to four tstats.</li>
              <li>When updating the string, take each value and enter it into each device individually instead of mashing it together into one devicestring.</li>

              I may be over simplifying, but I think that's the jist. If I was more of a VB.NET developer, I would certainly pitch in but not quite to that level. Not sure if it helps either but Homeseer does have some kind of thermostat API... but probably not applicable here :-(

              If you don't have time, my next step personally would be to take the device string you currently have implemented and run a separate script on device change to parse the device string and break it out into the separate devices outside of your script.

              Comment


                #82
                New Version 1.4

                I have been taking a look at the HomeSeer evaluation and have decided to order it. I need support for my insteon thermostat and have taken a look at this script. I decided yesterday to make a few changes and have uploaded them here for anyone who would like to try it. I've done some basic testing, (everything I am using it for seems to be working), but have not tested all combinations. If you decide to give it a try and find a bug, please post it. Please keep a copy of your old script in case you want to go back. I have taken some of the documentation from this thread and added it to the beginning of the script file. Here are a few notes on the changes for this version...

                • Split out the termostat into separate devices so that it makes it easier to grab individual values for display in, for instance, HSTouch. The original functionality was broken into separate devices for Mode, Temperatue, Cool Setpoint and Heat Setpoint. These show their respective values as well as the status string. This various control buttons are put on the appropriate device.

                • Added additional devices for Fan and Humidity. Note that there are now 6 devices for each thermostat. These are created sequentionally. Note also that you will need to delete you previous devices and let the script recreate the new devices. I don't have a humidity module in my tstat yet, so this has not been tested. The poll request is commented out at this point until I can verify that it's ACK will not mess up any other ACK processing.

                • Added support to read the values sent by the v2 thermostat. These are sent in response to changes made directly on the thermostat. This eliminates the need for polling. I have left that functionality in for people that don't have the v2 and because it uses these to try to capture the intial values at startup.

                • I have changed the way buttons work. They will now both send the command to change the thermostat as well as update the device. I primarily did this so that the UI would update immediately so the user could see the affect. This also seems necessary because with the v2 tstat the polling will likely no be enabled and, therefore, the device values would not get updated.

                • I had problems controlling the tstat via the buttons. I made a few tweaks to get that going.


                - Tom

                ------------------------------
                HSPro, Insteon PLM, HomeVision
                Attached Files
                - Tom

                HSPro/Insteon
                Web Site
                YouTube Channel

                Comment


                  #83
                  Tom, this version looks great. The enhancements you have made are fantastic. I see two things that may be issues? I have two tstats, polling is turned off.

                  * When I set the tstats to "Cool" mode, within a minute or two, Homeseer will then show it in "Heat" mode even though the tstat is still in "Cool".
                  * Same thing happens in put into "Heat" mode, after a couple of minutes, will show in "Cool" mode.
                  * The fan devices are not updating. They still show "Unknown" even after setting using buttons.

                  I am guessing you aren't seeing these bahaviors? I can grab a detailed debug log if it would help.

                  Thanks for your work on this and releasing it out to the community.
                  Attached Files

                  Comment


                    #84
                    I only have a single tstat, but I can eyeball the code to see if I can find it. If you can enable some of the debugging and capture it, it would likely be helpful too.

                    I do think that I need to do some more testing on the fan. I didn't mention this in my post, but I haven't really test that. The fan and the other modes are kind of combined into one setting in their commands. I will probably have to do a little more experimenting to see if what I have done, (splitting this out), does make sense.

                    I assume you don't have a humidity module in your stat either? I am going to get one, but I haven't even ordered it yet.
                    - Tom

                    HSPro/Insteon
                    Web Site
                    YouTube Channel

                    Comment


                      #85
                      I would like to get thoughts on another aspect of this. If you noticed, I moved the setpoint up/down to go with both the cool and heat setpoint devices. This would lead one to think that you are just controlling that individual setpoint when in fact in will control them just like on the tstat. Sometime it will increase/decrease both of them.

                      Would you prefer to leave it like this, move it to the mode device, or try to make this so that it does control the individual setpoint?
                      - Tom

                      HSPro/Insteon
                      Web Site
                      YouTube Channel

                      Comment


                        #86
                        Originally posted by tpchristian View Post
                        I will probably have to do a little more experimenting to see if what I have done, (splitting this out), does make sense.
                        I just did a little more experimenting on the fan mode stuff. I am either not understanding the intent of what they were trying to accomplish or it doesn't make sense. When the tstat is polled it seems not to return the fan status because that status is kind of combined into the mode. So if it is in cool mode and the fan is set to on, it will return cool, not fan. It will report the fan status if the mode is OFF, but the fan is set to on. What this means is that I will not be able to get a notification of the fan status from a poll unless it is set to mode of OFF.

                        However, if you have the v2, (I do), it will return a different set of mode if the fan is on. So, I will be able to independently know the mode and fan setting when changed at the tstat itself. However, I will need to make a couple change to take advantage of this.

                        I am beginning to wonder if I need to take into account different versions of the tstat firmware. I don't know what their stance is on backwards compatibility and how different everyone's tstats interface may be.
                        - Tom

                        HSPro/Insteon
                        Web Site
                        YouTube Channel

                        Comment


                          #87
                          Originally posted by leerogers View Post
                          * When I set the tstats to "Cool" mode, within a minute or two, Homeseer will then show it in "Heat" mode even though the tstat is still in "Cool".
                          I read your post too fast. The problem is a simple bug of having the heat/cool reversed on the status reporting. I will fix and post a new version tonight. I dropped the ball on this testing too. Most of my testing was pushing the modes from HS. I didn't do the opposite and change them manually on the thermostat to validate.
                          - Tom

                          HSPro/Insteon
                          Web Site
                          YouTube Channel

                          Comment


                            #88
                            Tom:

                            I run my fan on Auto and I clicked on once and it went to On. Now I clicked it to Auto but it still shows on. Here is my log when pushing Auto:

                            6/21/2010 3:59:33 PM Insteon ExtDev_TransmitToExternalDevice received transmit request: TStat1
                            6/21/2010 3:59:33 PM Insteon Transmitting message on behalf of external device support script...
                            6/21/2010 3:59:33 PM Insteon Sending command 02 62 11 C1 C9 0F 6B 08 to PLM, (Expecting 0 bytes extra back) Pre-Payload ACK:False, NAK is ok:False
                            6/21/2010 3:59:33 PM Insteon Waiting for ACK on behalf of external device support script...
                            6/21/2010 3:59:34 PM Insteon PLM_ProcessInBuffer received STX 0x50 (Raw Insteon Rec):01 11 C1 C9 0F D4 EF 27 6B 08 - Event: New msg for PLM, Src[11.C1.C9] Dst[0F.D4.EF] {Ack/Dir} Cmd1: 6B Cmd2: 08
                            6/21/2010 3:59:34 PM Insteon ProcessRawReceiveForExternalDevices sending 01 11 C1 C9 0F D4 EF 27 6B 08 to Insteon_ExtDevSupport_TStat.vb:TStatRcv...
                            6/21/2010 3:59:34 PM Insteon Received a Direct ACK from 11.C1.C9
                            6/21/2010 3:59:34 PM Insteon WaitForInsteonRaw received: 01 11 C1 C9 0F D4 EF 27 6B 08
                            6/21/2010 3:59:34 PM Insteon Received response 01 11 C1 C9 0F D4 EF 27 6B 08 from the external device.
                            6/21/2010 3:59:34 PM Insteon ProcessRawReceiveForExternalDevices sending ACK 6B 08 01 11 C1 C9 0F D4 EF 27 6B 08 to Insteon_ExtDevSupport_TStat.vb:TStatRcv...

                            And Here is my log for clicking ON:

                            ExtDev_TransmitToExternalDevice received transmit request: TStat1
                            6/21/2010 4:03:37 PM Insteon Transmitting message on behalf of external device support script...
                            6/21/2010 4:03:37 PM Insteon Sending command 02 62 11 C1 C9 0F 6B 07 to PLM, (Expecting 0 bytes extra back) Pre-Payload ACK:False, NAK is ok:False
                            6/21/2010 4:03:37 PM Insteon Waiting for ACK on behalf of external device support script...
                            6/21/2010 4:03:38 PM Insteon PLM_ProcessInBuffer received STX 0x50 (Raw Insteon Rec):01 11 C1 C9 0F D4 EF 27 6B 07 - Event: New msg for PLM, Src[11.C1.C9] Dst[0F.D4.EF] {Ack/Dir} Cmd1: 6B Cmd2: 07
                            6/21/2010 4:03:38 PM Insteon ProcessRawReceiveForExternalDevices sending 01 11 C1 C9 0F D4 EF 27 6B 07 to Insteon_ExtDevSupport_TStat.vb:TStatRcv...
                            6/21/2010 4:03:38 PM Insteon Received a Direct ACK from 11.C1.C9
                            6/21/2010 4:03:38 PM Insteon WaitForInsteonRaw received: 01 11 C1 C9 0F D4 EF 27 6B 07
                            6/21/2010 4:03:38 PM Insteon Received response 01 11 C1 C9 0F D4 EF 27 6B 07 from the external device.
                            6/21/2010 4:03:38 PM Insteon ProcessRawReceiveForExternalDevices sending ACK 6B 07 01 11 C1 C9 0F D4 EF 27 6B 07 to Insteon_ExtDevSupport_TStat.vb:TStatRcv...

                            Hope this helps.

                            Steve

                            Comment


                              #89
                              New Version 1.5

                              Changes...

                              * More testing/debugging

                              * Worked on getting the fan device working better. The issue I cannot solve is polling. I cannot see a way to poll. At a minimum, this will cause the device to be unknown until a button on HS or the device sets it to on.

                              * Added ACK for humidity so now it should be fully enabled. I don't have a module, so mine just seems to show a bogus value.

                              * Added a few new buttons to default devices. Fan (toggle), Mode(next, previous) I thought these would allow for some more options on the UI without having to create a bunch of other scripts.

                              ---

                              I've done a bunch of testing, but never feels like enough. Any continued help in this area is appreciated. One issue I see that I cannot find a solution to is the fact that the fan state cannot be determined by poling unless the mode happens to be "Off".

                              I did add the buttons to the devices. I see that this is pain recreate this now that I have a bunch of events and HSTouch screens written against these devices. I supposed you can choose not to recreate if you don't need/want these buttons.
                              Attached Files
                              - Tom

                              HSPro/Insteon
                              Web Site
                              YouTube Channel

                              Comment


                                #90
                                Tom:

                                Couple questions:

                                For some reason my polling doesn't seem to be working right. My only correct item showing is my temp which updates every 2 minutes through polling.

                                Tstat1-Mode still shows Heat (Should be Cool)

                                TStat1-Cool shows a temperature at 9 (Should show 77)

                                TStat1-Heat shows a temperature at 41 (Should show 74)

                                Tstat1-Fan still shows On (Should be Auto)

                                Tstat1-Hum show 18 (Don't have a Hum installed)

                                Here is a polling log:

                                6/22/2010 6:49:56 AM Insteon ExtDev_TransmitToExternalDevice received transmit request: TStat1
                                6/22/2010 6:49:56 AM Insteon ExtDev_TransmitToExternalDevice received transmit request: TStat1
                                6/22/2010 6:49:56 AM Insteon ExtDev_TransmitToExternalDevice received transmit request: TStat1
                                6/22/2010 6:49:56 AM Insteon ExtDev_TransmitToExternalDevice received transmit request: TStat1
                                6/22/2010 6:49:56 AM Insteon Transmitting message on behalf of external device support script...
                                6/22/2010 6:49:56 AM Insteon Sending command 02 62 11 C1 C9 0F 6B 02 to PLM, (Expecting 0 bytes extra back) Pre-Payload ACK:False, NAK is ok:False
                                6/22/2010 6:49:56 AM Insteon Waiting for ACK on behalf of external device support script...
                                6/22/2010 6:49:56 AM Insteon PLM_ProcessInBuffer received STX 0x50 (Raw Insteon Rec):01 11 C1 C9 0F D4 EF 27 6B 02 - Event: New msg for PLM, Src[11.C1.C9] Dst[0F.D4.EF] {Ack/Dir} Cmd1: 6B Cmd2: 02
                                6/22/2010 6:49:56 AM Insteon ProcessRawReceiveForExternalDevices sending 01 11 C1 C9 0F D4 EF 27 6B 02 to Insteon_ExtDevSupport_TStat.vb:TStatRcv...
                                6/22/2010 6:49:56 AM Insteon Received a Direct ACK from 11.C1.C9
                                6/22/2010 6:49:56 AM Insteon WaitForInsteonRaw received: 01 11 C1 C9 0F D4 EF 27 6B 02
                                6/22/2010 6:49:56 AM Insteon Received response 01 11 C1 C9 0F D4 EF 27 6B 02 from the external device.
                                6/22/2010 6:49:56 AM Insteon ProcessRawReceiveForExternalDevices sending ACK 6B 02 01 11 C1 C9 0F D4 EF 27 6B 02 to Insteon_ExtDevSupport_TStat.vb:TStatRcv...
                                6/22/2010 6:49:56 AM Insteon Transmitting message on behalf of external device support script...
                                6/22/2010 6:49:56 AM Insteon Sending command 02 62 11 C1 C9 0F 6B 03 to PLM, (Expecting 0 bytes extra back) Pre-Payload ACK:False, NAK is ok:False
                                6/22/2010 6:49:56 AM Insteon Waiting for ACK on behalf of external device support script...
                                6/22/2010 6:49:57 AM Insteon PLM_ProcessInBuffer received STX 0x50 (Raw Insteon Rec):01 11 C1 C9 0F D4 EF 27 6B 96 - Event: New msg for PLM, Src[11.C1.C9] Dst[0F.D4.EF] {Ack/Dir} Cmd1: 6B Cmd2: 96
                                6/22/2010 6:49:57 AM Insteon ProcessRawReceiveForExternalDevices sending 01 11 C1 C9 0F D4 EF 27 6B 96 to Insteon_ExtDevSupport_TStat.vb:TStatRcv...
                                6/22/2010 6:49:57 AM Insteon Received a Direct ACK from 11.C1.C9
                                6/22/2010 6:49:57 AM Insteon WaitForInsteonRaw received: 01 11 C1 C9 0F D4 EF 27 6B 96
                                6/22/2010 6:49:57 AM Insteon Received response 01 11 C1 C9 0F D4 EF 27 6B 96 from the external device.
                                6/22/2010 6:49:57 AM Insteon ProcessRawReceiveForExternalDevices sending ACK 6B 03 01 11 C1 C9 0F D4 EF 27 6B 96 to Insteon_ExtDevSupport_TStat.vb:TStatRcv...
                                6/22/2010 6:49:57 AM Insteon Transmitting message on behalf of external device support script...
                                6/22/2010 6:49:57 AM Insteon Sending command 02 62 11 C1 C9 0F 6A 20 to PLM, (Expecting 0 bytes extra back) Pre-Payload ACK:False, NAK is ok:False
                                6/22/2010 6:49:57 AM Insteon Waiting for ACK on behalf of external device support script...
                                6/22/2010 6:49:57 AM Insteon PLM_ProcessInBuffer received STX 0x50 (Raw Insteon Rec):01 11 C1 C9 0F D4 EF 27 6A 9A - Event: New msg for PLM, Src[11.C1.C9] Dst[0F.D4.EF] {Ack/Dir} Cmd1: 6A Cmd2: 9A
                                6/22/2010 6:49:57 AM Insteon ProcessRawReceiveForExternalDevices sending 01 11 C1 C9 0F D4 EF 27 6A 9A to Insteon_ExtDevSupport_TStat.vb:TStatRcv...
                                6/22/2010 6:49:57 AM Insteon Received a Direct ACK from 11.C1.C9
                                6/22/2010 6:49:57 AM Insteon WaitForInsteonRaw received: 01 11 C1 C9 0F D4 EF 27 6A 9A
                                6/22/2010 6:49:57 AM Insteon Received response 01 11 C1 C9 0F D4 EF 27 6A 9A from the external device.
                                6/22/2010 6:49:57 AM Insteon ProcessRawReceiveForExternalDevices sending ACK 6A 20 01 11 C1 C9 0F D4 EF 27 6A 9A to Insteon_ExtDevSupport_TStat.vb:TStatRcv...
                                6/22/2010 6:49:57 AM Insteon Transmitting message on behalf of external device support script...
                                6/22/2010 6:49:57 AM Insteon Sending command 02 62 11 C1 C9 0F 6A 60 to PLM, (Expecting 0 bytes extra back) Pre-Payload ACK:False, NAK is ok:False
                                6/22/2010 6:49:58 AM Insteon Waiting for ACK on behalf of external device support script...
                                6/22/2010 6:49:58 AM Insteon PLM_ProcessInBuffer received STX 0x50 (Raw Insteon Rec):01 11 C1 C9 0F D4 EF 27 6A 12 - Event: New msg for PLM, Src[11.C1.C9] Dst[0F.D4.EF] {Ack/Dir} Cmd1: 6A Cmd2: 12
                                6/22/2010 6:49:58 AM Insteon ProcessRawReceiveForExternalDevices sending 01 11 C1 C9 0F D4 EF 27 6A 12 to Insteon_ExtDevSupport_TStat.vb:TStatRcv...
                                6/22/2010 6:49:58 AM Insteon Received a Direct ACK from 11.C1.C9
                                6/22/2010 6:49:58 AM Insteon WaitForInsteonRaw received: 01 11 C1 C9 0F D4 EF 27 6A 12
                                6/22/2010 6:49:58 AM Insteon Received response 01 11 C1 C9 0F D4 EF 27 6A 12 from the external device.
                                6/22/2010 6:49:58 AM Insteon ProcessRawReceiveForExternalDevices sending ACK 6A 60 01 11 C1 C9 0F D4 EF 27 6A 12 to Insteon_ExtDevSupport_TStat.vb:TStatRcv...

                                On other question. Was I suppose to change anything on the Insteon_ExtDevSupport.vb script? I didn't touch anything on that script. Is that correct?

                                Thanks,
                                Steve

                                Comment

                                Working...
                                X