Announcement

Collapse
No announcement yet.

HAI Code Changes for Omnistat2

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

  • #61
    Kirby
    , i got the following from Rich about the temperature API and the current temperature value, It seems to me that his focus pulls the .devvalue property for his template regardless of the setting to use status.

    Here is the function in the HSTouch plugin that gets the temp. Note how it uses the thermostat API to find the temp device. The key here is subtype=1 for the temp.

    Private Function GetTemp(ByRef dvRoot As Scheduler.Classes.DeviceClass, uselocal As Boolean) As Double
    Dim dvChild As Scheduler.Classes.DeviceClass

    For Each ref In dvRoot.AssociatedDevices(Nothing)
    dvChild = GetDeviceByRefLocal(ref, uselocal)
    Select Case dvChild.DeviceType_Get(Nothing).Device_Type
    Case DeviceTypeInfo.eDeviceType_Thermostat.Temperature
    If dvChild.DeviceType_Get(Nothing).Device_SubType = 1 Or dvChild.DeviceType_Get(Nothing).Device_SubType = 0 Then
    ' subtype 1=temp, subtype 5=humidity, etc.
    Return dvChild.devValue(Nothing)
    End If
    End Select
    Next
    Return 0
    End Function
    Mark

    HS3 Pro 3.0.0.435
    Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
    Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 (by Kirby) | Ultra1Wire3 | RFXCOM | NetCAM | MyQ | BLRadar | BLDenon | Jon00 Charting
    Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory

    Comment


    • #62
      Kirby,
      i think i need you to check in with Rich on this value vs status issue. Rich says the API assumes that the device value is supposed to be an actual temperature value based on the degrees F vs C setting in the API.

      what do you think? do you have his email address?
      Mark

      HS3 Pro 3.0.0.435
      Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
      Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 (by Kirby) | Ultra1Wire3 | RFXCOM | NetCAM | MyQ | BLRadar | BLDenon | Jon00 Charting
      Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory

      Comment


      • #63
        Just stumbled on this -- THANK you for the work, I can't wait to try it out.. this is one of the last things keeping me from using the 1 yr ago purchase of HS3!! Do you plan to make it for purchase? If not, please let me know how to donate to your effort..

        Comment


        • #64
          Mark,

          Sorry it has taken me so long to reply to your email. For some reason I stopped getting notifications from this thread.

          I have had a lot of issues with the thermostat API and have steered away from it. I find that I have a lot more flexibility just treating the thermostats as devices. There are only two methods that are offered by the API that are not defined by the devices (Next Fan Mode and Next Operating Mode). These could be added to the devices if there was demand for them.

          For your temperature the status tracking for the device works fine and it also formats the temperature.

          Below are my thermostat screens(the formatted text is a little squirrelly because it is designed for an android)
          Attached Files

          Comment


          • #65
            Hi mikemack,
            Sorry for the tardy response. As I explained to Mark, I haven't been receiving notifications.

            There will never be a charge for the plug-in. I appreciate your offer for a donation but they are not needed.

            I will be releasing a new version this month and am hoping to get it into the updater. Let me know if there are issues you would like addressed. I am aware of two at this time:

            1) The current setpoint doesn't always display the correct value.
            2) The mode state for RC-1000 and RC-2000 thermostats is not correct. They have apparently changed the relay designations in the protocol and didn't document it. I will need to reverse engineer the new settings.

            Kirby

            Comment


            • #66
              Kirby,
              thanks for the reply. Not sure what to tell you about the thermstat api issues. However I would report them to HST via bugzilla.

              On a separate note:

              I just connected an external outside temperature sensor to the stat. Is it possible to have another hs device that displays this temperature?
              Mark

              HS3 Pro 3.0.0.435
              Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
              Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 (by Kirby) | Ultra1Wire3 | RFXCOM | NetCAM | MyQ | BLRadar | BLDenon | Jon00 Charting
              Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory

              Comment


              • #67
                Mark,
                Let me think about that. The immediate issue that comes to mine is that right now my configuration is global for all stats. I will need to determine the best way to change that. What model stat do you have it attached to? Do you have multiple stats? Would you want that temperature to show up on the other stats? What temp device did you attach to the stat?

                Comment


                • #68
                  Originally posted by Kirby View Post
                  Mark,
                  Let me think about that. The immediate issue that comes to mine is that right now my configuration is global for all stats. I will need to determine the best way to change that. What model stat do you have it attached to? Do you have multiple stats? Would you want that temperature to show up on the other stats? What temp device did you attach to the stat?
                  Kirby,
                  I have two Omnistat2 units. I plan to connect an outside temp sensor to the second stat in the near feature. One sensor is in the front of the house; the second will be in the back of the house.

                  the first stat already displays the outside temp as i configured the sensor in the first stat directly. I'm aware of your feature to display a temp from a hs device. i'm not using this feature; the stat does this alreay.

                  I really just want access to the sensor value from a hs device; one hs device for each stat with the external sensor temperature

                  thanks for the great plugin
                  Last edited by mnsandler; October 12th, 2014, 08:29 AM. Reason: added bold text
                  Mark

                  HS3 Pro 3.0.0.435
                  Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
                  Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 (by Kirby) | Ultra1Wire3 | RFXCOM | NetCAM | MyQ | BLRadar | BLDenon | Jon00 Charting
                  Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory

                  Comment


                  • #69
                    additional info for consideration:

                    the omnistat2 can handle 4 external sensors. not sure if you can get access to all of them but it might be something to consider in your design; but probably not worth implementing at this time.
                    Mark

                    HS3 Pro 3.0.0.435
                    Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
                    Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 (by Kirby) | Ultra1Wire3 | RFXCOM | NetCAM | MyQ | BLRadar | BLDenon | Jon00 Charting
                    Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory

                    Comment


                    • #70
                      Mark,
                      What is the part number of the sensor that you are using. I may get one to test with and then install.

                      Do you have any interest in controlling and knowing the state of a dehumidifier or humidifier wired to you RC-2000?

                      Comment


                      • #71
                        Originally posted by Kirby View Post
                        Mark,
                        What is the part number of the sensor that you are using. I may get one to test with and then install.

                        Do you have any interest in controlling and knowing the state of a dehumidifier or humidifier wired to you RC-2000?
                        sensor: Leviton 23A00-1 Omnistat Surface-Mount Remote Indoor/Outdoor Temp Sensor

                        i currently don't use a dehumidifer or humidifer but I'm sure others do and will want this feature eventually.
                        Last edited by mnsandler; October 12th, 2014, 11:32 AM. Reason: added humidifer
                        Mark

                        HS3 Pro 3.0.0.435
                        Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
                        Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 (by Kirby) | Ultra1Wire3 | RFXCOM | NetCAM | MyQ | BLRadar | BLDenon | Jon00 Charting
                        Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory

                        Comment


                        • #72
                          I ordered the temp sensor and should have it by the end of the week. I need to make sure that I understand the interaction between a hardwired sensor and setting the temp from another source.

                          It has become evident that I am going to need to expand the individual thermostat configuration and move more options from the global configuration to the thermostat configuration.

                          The thermostat class will need to have additional information stored in it. I would like to avoid having to delete the previous devices and create new ones. It is unclear to me when that becomes a necessity. Right now I am storing the thermostat class in the root device. I did store a version number in the class so that I might have an opportunity to "upgrade" the device without having to remove it. Remapping devices to HSTouch would be a pain if every time the class changed the device had to be recreated.

                          Since you have walked this path before with your plugins, any pointers you could give me are much appreciated.

                          Comment


                          • #73
                            Originally posted by Kirby View Post
                            I ordered the temp sensor and should have it by the end of the week. I need to make sure that I understand the interaction between a hardwired sensor and setting the temp from another source.

                            It has become evident that I am going to need to expand the individual thermostat configuration and move more options from the global configuration to the thermostat configuration.

                            The thermostat class will need to have additional information stored in it. I would like to avoid having to delete the previous devices and create new ones. It is unclear to me when that becomes a necessity. Right now I am storing the thermostat class in the root device. I did store a version number in the class so that I might have an opportunity to "upgrade" the device without having to remove it. Remapping devices to HSTouch would be a pain if every time the class changed the device had to be recreated.

                            Since you have walked this path before with your plugins, any pointers you could give me are much appreciated.
                            a few thoughts here:

                            when i release a beta version (which i think you have done here), i warn users that deleting and starting over may be required. This gives me the opportunity to 'fix' issues just like this without dealing with an upgrade issue.

                            However I understand the impact this causes on triggers, events and hstouch...so here are a few choices:

                            1. I have written code to check for the 'old setup' (in your case) an old version number, and if found upgrade the devices as necessary. this check will always be performed when the plugin starts up.

                            2. I don't use version numbers on my devices; just one more thing to track. So an alternative is to looks for an ini setting and if not found then run the upgrade code (and then set the ini value); otherwise leave everything as-is. again this check is always run but it is a single global check.

                            3. always look for the old setup based on device values & settings (or whatever) and then upgrade if found. this is similar to #1 but without the version number to maintain. again always run at startup.

                            4. provide the user with a one-time script/function to upgrade their devices as necessary; this way you don't have to check/set anything during runtime. this could also be a maintenance button within your plugin. No checking by the plugin; its the users responsibility to run it.

                            any of these approaches should run one-time standalone code that clearly identifies what upgrades/changes are being made. You may end up with several of these routines over time.

                            I'm happy to test whenever; no rush.
                            Mark

                            HS3 Pro 3.0.0.435
                            Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
                            Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 (by Kirby) | Ultra1Wire3 | RFXCOM | NetCAM | MyQ | BLRadar | BLDenon | Jon00 Charting
                            Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory

                            Comment


                            • #74
                              Thanks, Mark

                              As it turns out, this may be a first of the year release. I won't be able to test after another week for a while. I'll let you know when it is ready.

                              Comment


                              • #75
                                Originally posted by Kirby View Post
                                Thanks, Mark

                                As it turns out, this may be a first of the year release. I won't be able to test after another week for a while. I'll let you know when it is ready.
                                No problem. The plugin is working great right now so not a big deal on the feature request.

                                Please try to stay plugged into the forum so people know you are still active with the project.
                                Mark

                                HS3 Pro 3.0.0.435
                                Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
                                Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 (by Kirby) | Ultra1Wire3 | RFXCOM | NetCAM | MyQ | BLRadar | BLDenon | Jon00 Charting
                                Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory

                                Comment

                                Working...
                                X