Announcement

Collapse
No announcement yet.

HAI Plugin Beta - 3.0.1.0

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

    HAI Plugin Beta - 3.0.1.0

    Version 3.0.1.0 was submitted to the updater this morning. It might be a little while before it shows up in the updater.

    Changes in this version:
    • Version change - major release.
    • Added support for all HAI panel types.
    • Changed MySQL datatype of id from SMALLINT UNSIGNED to INT UNSIGNED.
    • Devices are now created with eControlUse=True to allow support for IFTTT.
    • Refactoring older code.
    • Areas can now be selected to be included as HS devices.
    • Areas now support triggers for: Burglary, Fire, Gas, Aux, Freeze, Water, Duress, Temperature.
    • Added more status graphics for Areas.
    • Registers for unsolicited packets *after* plugin is initialized.
    • Plugin web page now defaults to the help tab.


    **Note - this is a major release. You will need to remove your existing HAI devices and any Events that use your existing devices. I apologize but, this is a beta release. If this version tests out ok, it will be moved to a General Release and become a paid plugin at that point. Any changes to the General Release version will not require you to remove devices.

    ***Backup your current installation so you can revert back if needed!!

    Steps to install:
    • Stop your current HAI plugin from running.
    • Remove all HAI devices and events.
    • Install this version from the updater.
    • Enable the plugin.
    • From the HAI plugin page, click on the Areas tab and enable specific area alarms you want to track.
    • Do the same for Outputs (optional).

    The changes in this version now allow you to create HS3 events for Alarm trip functions. So, in addition to writing events to arm/disarm your panel, you can now be notified or act on area alarms such as burglary, fire, water, etc.

    Please test this out thoroughly. I have been running it for about a week now and have not noticed any issues. If you do run into anything, post it in this thread and email me your logs (robmasonjr67 at yahoo dot com)
    HS4Pro on a Raspberry Pi4
    54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
    Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

    HSTouch Clients: 1 Android

    #2
    Great news Rob!

    Relating to V.20 did a quickie network test the other day.

    I physically disconnected the network cable testing some other stuff.

    None of my Omnitouch 5.7e's or HAI network plugin came back until I reset the Omnitouch 5.7e screens and disabled and re-enabled the HAI plugin.

    I think though this is an issue relating to the HAI OPII network interface and not your plugin.

    I am currently powering up the micro router via the HAI panel / backup battery so I shouldn't really ever see this occur.

    Goofing around also disconnected a serial port (using it for some software) and reconnected it.

    That disconnect/reconnect took down the HS2 serial plugin causing a bunch of not connecting HS2 plugin log entries.

    Relating to HS2; I shut down the application and restarted it and all was well afterwards.
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

    HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
    HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

    Comment


      #3
      Thanks Pete!

      Yeah, the disconnect/reconnect stuff was very tricky to code and I'm still not 100% convinced it is needed given that you have to reset the Omnitouch panels and anything else connected, like the plugin. That HAI panel's ethernet port is not very "standard". I was reading on cocoontech that some mentioned setting routers/switches to full or half duplex to accommodate the HAI panel's port. Strange stuff.

      This version was a major change in the way I handled areas. From a coding standpoint, it's much more efficient and getting easier for me to make changes in its structure. I'm working on UPB/X10 support next. Will probably add Temperature/Humidity support in as well.
      HS4Pro on a Raspberry Pi4
      54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
      Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

      HSTouch Clients: 1 Android

      Comment


        #4
        Thank-you Rob,

        That HAI panel's ethernet port is not very "standard".
        I guess that it was standard in the early 2000's. It is not today.

        Here I started to have issues with my OPII NIC port when the number of devices increased on my network.

        It started with the time being off then went to serial and network connectivity issues.

        I tried all sorts of things and what worked was putting in the custom updated with OpenWRT microrouter. (IE nothing worked with my managed switches).

        I am looking forward to testing the updated plugin.
        - Pete

        Auto mator
        Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

        HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
        HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

        X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

        Comment


          #5
          Here's a sample event for notification on alarm trips:
          Attached Files
          HS4Pro on a Raspberry Pi4
          54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
          Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

          HSTouch Clients: 1 Android

          Comment


            #6
            Here are the new status graphics to go along with the alarms:
            Attached Files
            HS4Pro on a Raspberry Pi4
            54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
            Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

            HSTouch Clients: 1 Android

            Comment


              #7
              @Rob,

              Steps here relating to update of plugin

              1 - disabled HAI plugin
              2 - removed / deleted all associated HAI devices
              3 - shut down HS3 and restarted it.
              4 - enabled HAI plugin V3.0.1.0 - waited a few minutes
              5 - plugins / HAI / HAIPlugin Page goes right to help
              6 - enabled areas - plugin created an area mode and alarm area per area enabled.

              Very nice!!! Attached is a quickie picture of multicontroller use (X10, UPB, Z-Wave and Zigbee).



              Tested out event / graphics look as posted above. Worked great!

              When plugin started and I started to look at the device list I did see this in the logs.

              Jun-08 2:34:20 PM Error Posting back to plugin web page HAI: Argument is out of range. Parameter name: index out of range-> at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception& exc, System.Object[]& out_args) [0x00000] in :0 Threadpool worker
              Jun-08 2:34:19 PM Error Posting back to plugin web page HAI: Argument is out of range. Parameter name: index out of range-> at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception& exc, System.Object[]& out_args) [0x00000] in :0 Threadpool worker


              One other thing that I had noticed with V.20 of the plugin is that sometimes the plugin would keep running after I shut down HomeSeer.

              I'm working on UPB/X10 support next. Will probably add Temperature/Humidity support in as well.
              Great news!
              Attached Files
              Last edited by Pete; June 8, 2015, 03:49 PM.
              - Pete

              Auto mator
              Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

              HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
              HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

              X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

              Comment


                #8
                I've not encountered that error. Looks like it is during the postback to the main HAI page. When you go this error, was the plugin fully started? I'd like to see if I can reproduce it, or at least trap the error and provide a meaningful message. Also, email me your HAI.log and I'll take a look.

                When HS is shutdown, the plugin will attempt to reconnect with HS, then give up after 6 tries waiting 3 seconds between retries. After that, it will wait 22 seconds before stopping completely. So, you should never see it run more than 40-45 seconds after HS is shutdown.
                HS4Pro on a Raspberry Pi4
                54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
                Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

                HSTouch Clients: 1 Android

                Comment


                  #9
                  Thank-you Rob.

                  When testing sometimes I shut down the plugin and start it manually via a terminal session.

                  I sync'd the HAI error that I saw in the HS3 log and the HAI log stuff.

                  Here are the two logs put together. I removed the fluff.

                  6/8/2015 2:31:54 PM [2] [Device initialization is complete.]
                  6/8/2015 2:31:54 PM [2] [HAC Connection state is: Offline]
                  6/8/2015 2:31:54 PM [2] [Connecting with: [hxxp://www.xxx.yyy.zzz] [4369] [TCP]]
                  6/8/2015 2:31:54 PM [2] [CONNECTION STATUS: Connecting]
                  6/8/2015 2:31:54 PM [2] [Panel Connected.]
                  6/8/2015 2:31:54 PM [2] [Identifying Controller...]
                  6/8/2015 2:31:54 PM [2] [CONTROLLER IS: OmniPro II (3.15)]
                  6/8/2015 2:31:57 PM [2] [DBUtil: Connecting to MySQL...]
                  6/8/2015 2:31:57 PM [2] [DBUtil: CheckConnection: start...]
                  6/8/2015 2:31:57 PM [2] [DBUtil: opening database with ConnectionString=[server=www.xxx.yyy.zzz;port=3306;User Id=hai;password=password;database=hai;pooling=False]]
                  6/8/2015 2:31:57 PM [2] [DBUtil: CheckConnection: connection ok.]
                  6/8/2015 2:31:57 PM [2] [DButil: connecting with server=www.xxx.yyy.zzz;port=3306;User Id=hai;database=hai;pooling=False]
                  6/8/2015 2:31:57 PM [2] [DBUtil: connection ok=True]
                  6/8/2015 2:31:57 PM [2] [Requesting configuration and properties of panel...]
                  6/8/2015 2:31:57 PM [2] [-->Reading configuration...]
                  ............................................................ ..................................
                  6/8/2015 2:32:16 PM [2] [getpageplugin pageName=[HAI] iface=[HAI]]
                  6/8/2015 2:32:24 PM [2] [-->Reading properties...]
                  6/8/2015 2:32:25 PM [2] [All configuration and properties retrieved.]
                  6/8/2015 2:32:25 PM [2] [Requesting Area status...]
                  6/8/2015 2:32:26 PM [2] [Synchronizing HAI devices with HomeSeer...]
                  6/8/2015 2:33:32 PM [2] [getpageplugin pageName=[HAI] iface=[HAI]]
                  6/8/2015 2:33:51 PM [2] [--->Parent [HAI] Child [In House] added...]
                  6/8/2015 2:33:51 PM [2] [getpageplugin pageName=[HAI] iface=[HAI]]
                  6/8/2015 2:34:01 PM [2] [--->Parent [HAI] Child [Out House] added...]
                  6/8/2015 2:34:01 PM [2] [getpageplugin pageName=[HAI] iface=[HAI]]
                  6/8/2015 2:34:19 PM [2] [--->Parent [HAI] Child [Smokes] added...]
                  Jun-08 2:34:19 PM Error Posting back to plugin web page HAI: Argument is out of range. Parameter name: index out of range-> at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception& exc, System.Object[]& out_args) [0x00000] in :0 Threadpool worker
                  6/8/2015 2:34:20 PM [2] [--->Parent [HAI] Child [CO Sensor] added...]
                  Jun-08 2:34:20 PM Error Posting back to plugin web page HAI: Argument is out of range. Parameter name: index out of range-> at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception& exc, System.Object[]& out_args) [0x00000] in :0 Threadpool worker
                  6/8/2015 2:34:55 PM [2] [UNSOLICITED: ExtendedStatus]


                  I disabled and enabled the smokes/CO detectors. I did not see anything in the hai.log but same as above showed up in the Homeseer log such that I could replicate the error.

                  6/8/2015 4:18:30 PM [2] [--->Parent [HAI] Child [CO Sensor] added...]
                  6/8/2015 4:18:30 PM [2] [UNSOLICITED: ExtendedStatus]
                  6/8/2015 4:18:30 PM [2] [---->Zone
                  2015-06-08 16:18:30 Error Posting back to plugin web page HAI: Argument is out of range. Parameter name: index out of range-> at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp,​ IMessage msg,​ System.Exception& exc,​ System.Object[]& out_args) [0x00000] in :0
                  6/8/2015 4:18:27 PM [2] [--->Parent [HAI] Child [Smokes] added...]
                  6/8/2015 4:18:27 PM [2] [UNSOLICITED: ExtendedStatus]
                  6/8/2015 4:18:27 PM [2] [---->Zone]
                  2015-06-08 16:18:27 Error Posting back to plugin web page HAI: Argument is out of range. Parameter name: index out of range-> at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp,​ IMessage msg,​ System.Exception& exc,​ System.Object[]& out_args) [0x00000] in :0
                  2015-06-08 16:18:05 Error Posting back to plugin web page HAI: Argument is out of range. Parameter name: index out of range-> at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp,​ IMessage msg,​ System.Exception& exc,​ System.Object[]& out_args) [0x00000] in :0
                  2015-06-08 16:18:02 Error Posting back to plugin web page HAI: Argument is out of range. Parameter name: index out of range-> at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp,​ IMessage msg,​ System.Exception& exc,​ System.Object[]& out_args) [0x00000] in :0


                  Here is a quickie hardwire picture of the methodology I utilized to connect this stuff (4 wire). I overdid it a bit and it was a bit of a PITA to wire up.

                  I have tried to be neat with the cabling and additional boards inside of the HAI can but its a bit cluttered these days.
                  Attached Files
                  Last edited by Pete; June 8, 2015, 04:44 PM.
                  - Pete

                  Auto mator
                  Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

                  HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                  HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                  X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                  Comment


                    #10
                    I think I see the problem. The plugin is not completely initialized before allowing you to select the areas and outputs. I can add some logic to the web page to let the panel synchronization finish before allowing changes. I'll get a fix in for that asap.

                    What model smoke/co detectors are you using? I have a couple of the Z-Wave smoke/co sensors but I can get reliable heartbeats out of them and want to go hardwired.
                    HS4Pro on a Raspberry Pi4
                    54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
                    Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

                    HSTouch Clients: 1 Android

                    Comment


                      #11
                      I think I see the problem. The plugin is not completely initialized before allowing you to select the areas and outputs. I can add some logic to the web page to let the panel synchronization finish before allowing changes. I'll get a fix in for that asap.
                      Yup; the second test above was in vivo as I never shut down the plugin after first initializing it.

                      The log is only showing when I enable the output. I disabled it first then enabled it when I tested above.

                      I have to look at the separate smoke and co detectors as its been a while. When I installed them I just purchased what had been recommended at the time.

                      Using both 120VAC / battery Smokes and HAI OPII wired devices made the endeavor a bit low on the WAF.
                      - Pete

                      Auto mator
                      Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

                      HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                      HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                      X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                      Comment


                        #12
                        Here is a clip and paste of the HAI System variables from the old serial plugin. I use them in events for this or for that.

                        The old HS2 plugin created these variables by default and the rest of the variables were optional (but they existed). IE: units, thermostats and zones.
                        Attached Files
                        - Pete

                        Auto mator
                        Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

                        HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                        HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                        X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                        Comment


                          #13
                          Thats great info Pete! I didnt have the privilege to run the serial HAI plugin on HS2 and wasnt 100% sure everything it captured. From this list, I highlighted what I currently support. I'm going to start work now on those other devices. Thanks for the info!
                          Attached Files
                          HS4Pro on a Raspberry Pi4
                          54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
                          Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

                          HSTouch Clients: 1 Android

                          Comment


                            #14
                            Thank you Rob.

                            I do use the AC Powerfail and Phone line dead feature to trigger events.

                            Relating to status I also use the last person who enabled or disabled alarm on the touchscreens.

                            I like the voltage shown and have used the battery low errors to replace the back up battery. (its only been around every 3-4 years though).

                            Curious as I am combing through logs this morning and am trying to get other plugins to work with mysql (not doing so yet though); has the base HAI DB changed at all?

                            I am getting mysql errors relating to the writing of the HAI DB specifically writing to a field that doesn't exist right now. I am still using the original DB. Should I disable the write, remove the DB and start from scratch?

                            I also utilize the aux temperature and humidity sensors connected to the panel along with the 1-wire temperature and humidity sensors hooked up to Homeseer for my environmental monitoring as I have both inside and outside of the house.

                            Playing this morning a bit with the smokes, CO, water stuff noticed that the values are different than the Zone values (open close stuff).
                            - Pete

                            Auto mator
                            Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

                            HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                            HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                            X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                            Comment


                              #15
                              My mistake, I forgot to mention:

                              Changing the id from SMALLINT UNSIGNED to INT UNSIGNED will require the database to be rebuilt.

                              You would need to shutdown the plugin, then delete the complete hai mysql database. Restart the plugin and it should re-create the database schema.
                              HS4Pro on a Raspberry Pi4
                              54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
                              Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

                              HSTouch Clients: 1 Android

                              Comment

                              Working...
                              X