www.homeseer.com    
 

Go Back   HomeSeer Message Board > 3rd Party Plug-Ins/Scripts > Plug-ins by Author > Click Here for List of Author Forums > rmasonjr Plug-Ins

rmasonjr Plug-Ins Discussion area for plug-ins by Rob Mason

Reply
 
Thread Tools Display Modes
  #1  
Old June 30th, 2015, 12:00 PM
rmasonjr's Avatar
rmasonjr rmasonjr is offline
OverSeer
 
Join Date: May 2001
Location: Brookhaven, MS USA
Posts: 6,489
HAI Plugin Beta - 3.0.1.3

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

Changes in this version:
  • Added output control buttons to the device management page.
  • All Child devices now use name/value pairs for PED.
  • Refactoring older code.
  • Added routine to update devices - no more removing devices for plugin update.
  • Fixed issue with Outputs not updating HS with initial status.
***Backup your current installation so you can revert back if needed!!

Note - No longer necessary to remove devices before updating plugin versions.
__________________

HS3Pro Running on a Raspberry Pi2 (Raspbian)
64 Z-Wave Nodes, 162 Events, 293 Devices
UPB modules via OMNI plugin/panel
Plugins: Z-Wave, BLRF, OMNI, HSTouch, weatherXML, EasyTrigger
HSTouch Clients: 3 Android, 1 Joggler
Reply With Quote
  #2  
Old June 30th, 2015, 12:49 PM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,288
Thank you Rob!!!
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.435

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT
Reply With Quote
  #3  
Old June 30th, 2015, 02:59 PM
rmasonjr's Avatar
rmasonjr rmasonjr is offline
OverSeer
 
Join Date: May 2001
Location: Brookhaven, MS USA
Posts: 6,489
Thanks Pete. The source code is much more structured than when I began, so I'm able to make changes a little faster/easier now.
Reply With Quote
  #4  
Old June 30th, 2015, 04:16 PM
Daweeze's Avatar
Daweeze Daweeze is offline
Seer Deluxe
 
Join Date: Dec 2009
Location: North Bay
Posts: 488
Hey Rob,

Wow, these updates are happening fast...awesome! Had a couple of questions regarding the release (still not yet available) and the items below:

Quote:
Originally Posted by rmasonjr View Post
[*] All Child devices now use name/value pairs for PED.[*] Fixed issue with Outputs not updating HS with initial status.
1) Not sure what the PED comment is and what might this affect?
2) Does the issue fixing the Outputs also address the Zone initial status problem as well?

Looking forward to testing. Thanks for all the effort!

-Travis
Reply With Quote
  #5  
Old June 30th, 2015, 04:26 PM
rmasonjr's Avatar
rmasonjr rmasonjr is offline
OverSeer
 
Join Date: May 2001
Location: Brookhaven, MS USA
Posts: 6,489
Quote:
Originally Posted by Daweeze View Post
Hey Rob,

Wow, these updates are happening fast...awesome! Had a couple of questions regarding the release (still not yet available) and the items below:



1) Not sure what the PED comment is and what might this affect?
2) Does the issue fixing the Outputs also address the Zone initial status problem as well?

Looking forward to testing. Thanks for all the effort!

-Travis
Hey Travis:

PED is Plugin Extra Data and is a way for developers to store some information in each device that is created, usually information that is specific to a plugin. Prior to this release, I was storing a custom class and I moved it to simple name-value pairs. The user wont notice anything on the surface - this is all under the hood.

I think fixing the Output's initial status should have fixed the Initial Zone status as well. Try it out and let me know. My panel is still not configured nearly as much as you guys - I'm slowly building my system.

Yeah, prior to the 3.x.x.x release, the source code was not structured very well. Now that I have it in a form that is much easier to make changes.

The updater process is a little slow. I'll ping the updater group at HST and see when it will be posted.
Reply With Quote
  #6  
Old June 30th, 2015, 04:47 PM
Daweeze's Avatar
Daweeze Daweeze is offline
Seer Deluxe
 
Join Date: Dec 2009
Location: North Bay
Posts: 488
Awesome, thanks for the info Rob. I will test as soon as it's available and I have a chance to install.

-Travis
Reply With Quote
  #7  
Old June 30th, 2015, 05:38 PM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,288
Installed update a few minutes ago.

It is shutting down and restarting itself. I went to look at the console and see this.

6/30/2015 4:44:40 PM--INIFILE set to: HAI.ini
6/30/2015 4:44:40 PM--Starting threads.
6/30/2015 4:44:42 PM--HAI Plugin Thread was started.
6/30/2015 4:44:42 PM--Initializing Timers...
6/30/2015 4:44:42 PM--Checking root devices for HAI...
6/30/2015 4:44:43 PM--Device initialization is complete.

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
at HSPI_HAI.Util.CheckDevicesForUpgrade () [0x00000] in :0
at HSPI_HAI.HSPI.HAI_Proc () [0x00000] in :0
at System.Threading.Thread.StartInternal () [0x00000] in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
at HSPI_HAI.Util.CheckDevicesForUpgrade () [0x00000] in :0
at HSPI_HAI.HSPI.HAI_Proc () [0x00000] in :0
at System.Threading.Thread.StartInternal () [0x00000] in :0
updating devices


Will try maybe deleting all of the HAI devices?

Shut down plugin and deleted all of the HAI devices.

Started up the plugin and it created all of the devices. No errors were seen in the console log.

Plugin is running now without shutting down.

Will enable mysql db logging in a bit.

BTW I have been able to watch the console via Webmin by using a cron job to start HS3 instead of using Upstart.

Cleared mysql db via HeidiSQL.

Enabled mysqldb logging.
Reply With Quote
  #8  
Old June 30th, 2015, 05:57 PM
Daweeze's Avatar
Daweeze Daweeze is offline
Seer Deluxe
 
Join Date: Dec 2009
Location: North Bay
Posts: 488
Hi Pete,

I am not seeing that at all. I upgraded from the latest 3.0.1.2 (2nd 3.0.1.2 Manual file replacement version) and so far all is well.

-Travis
Reply With Quote
  #9  
Old June 30th, 2015, 06:10 PM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,288
Yup; here had also updated manually to last version posted 3.0.1.2.

The above went away when I shut down the plugin. Deleted all of the HAI variables. Turned on the plugin. I saw no more issues in the console.

I did have an extra or double output and I think it was a straggler after I had defined one output. Not sure.
When it created all of the output variables they were fine this time. Thinking I saw the double output when I defined one output?

Turned on DB and checked just now at ~600 rows. Looks good.

I do not see any temperature queries in the mySQL logs at this time.
Reply With Quote
  #10  
Old June 30th, 2015, 06:22 PM
Daweeze's Avatar
Daweeze Daweeze is offline
Seer Deluxe
 
Join Date: Dec 2009
Location: North Bay
Posts: 488
Hi Rob,

Just some notes I have so far:

1) I had to remove my Output Devices and reimport them (Turn off/on in your web menu) to enable to the Controlled Output capability. I tried to manually apply the controls to the original devices but they still didn't show up. All good and testing functional now. I kind of expected this but you may want to note that is necessary.

2) The Initial status update appears to be working on the Zones and Outputs (Exceptions noted in #3 below). This fixed the majority of my initial status issues and graphics not appearing in the HS Device List.

3) The following status items do not yet update initially. I suspect it is due to the fact they are different sensors or have different Zone Status types or conditions that are not recognized. They do not present a graphic or status in the Device List.

1) Keyfob Panic Button - Zone Type=Panic (7 of 8 other buttons appear ok, not Panic type though)
2) Carbon Monoxide Sensors - Zone Type=Gas
3) Window Sensor - Zone Type=Auxiliary (Window is Bypassed)


This is what they look like in the HAI Plug-in Zone Web Page:

# Annotation Status Name Area Loop Zone Type isSecurity? isArming?

085 (EE3-5) SECURE Keyfob1-Button4 Travis - Keyfob - Button 4 - Panic! 1 10 Panic True True

053 (EE1-5) SECURE Upstairs - CO CO Detector 1 148 Gas True False

067 (EE2-3) SECURE Aubrie - Window Window 1 20 Auxiliary False False

I am not sure what items are considered complete for Zones at this point so I am not sure what to report as a bug vs something that isn't supported yet.

Thanks again Rob!

-Travis
Reply With Quote
  #11  
Old June 30th, 2015, 08:17 PM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,288
Looking good here Rob.

Did a quickie test on the outputs using PCA to manually turn on and off an output.

Instant status on the HAI output page. Then did same on the HAI output page to PCA.

Instant status on PCA.

Been using NOAA radio with wireless switches and now moving the NOAA radio output to one zone to test with WeatherXML.

~1000 mysql database entries and doing fine.

Last edited by Pete; June 30th, 2015 at 09:13 PM.
Reply With Quote
  #12  
Old June 30th, 2015, 09:54 PM
rmasonjr's Avatar
rmasonjr rmasonjr is offline
OverSeer
 
Join Date: May 2001
Location: Brookhaven, MS USA
Posts: 6,489
Quote:
Originally Posted by Daweeze View Post
Hi Rob,

Just some notes I have so far:

1) I had to remove my Output Devices and reimport them (Turn off/on in your web menu) to enable to the Controlled Output capability. I tried to manually apply the controls to the original devices but they still didn't show up. All good and testing functional now. I kind of expected this but you may want to note that is necessary.

2) The Initial status update appears to be working on the Zones and Outputs (Exceptions noted in #3 below). This fixed the majority of my initial status issues and graphics not appearing in the HS Device List.

3) The following status items do not yet update initially. I suspect it is due to the fact they are different sensors or have different Zone Status types or conditions that are not recognized. They do not present a graphic or status in the Device List.

1) Keyfob Panic Button - Zone Type=Panic (7 of 8 other buttons appear ok, not Panic type though)
2) Carbon Monoxide Sensors - Zone Type=Gas
3) Window Sensor - Zone Type=Auxiliary (Window is Bypassed)


This is what they look like in the HAI Plug-in Zone Web Page:

#AnnotationStatusNameAreaLoopZone TypeisSecurity?isArming?

085(EE3-5)SECUREKeyfob1-Button4 Travis - Keyfob - Button 4 - Panic!110PanicTrueTrue

053(EE1-5)SECUREUpstairs - CO CO Detector1148GasTrueFalse

067(EE2-3)SECUREAubrie - Window Window120AuxiliaryFalseFalse

I am not sure what items are considered complete for Zones at this point so I am not sure what to report as a bug vs something that isn't supported yet.

Thanks again Rob!

-Travis
Great info, Travis. I do need to check the HAI protocol docs for those zone types. It might be as easy as just adding those zone types.
Sorry you had to delete/read the devices. I thought my new routine would have worked


Sent from my Xoom using Tapatalk
Reply With Quote
  #13  
Old June 30th, 2015, 09:58 PM
rmasonjr's Avatar
rmasonjr rmasonjr is offline
OverSeer
 
Join Date: May 2001
Location: Brookhaven, MS USA
Posts: 6,489
Quote:
Originally Posted by Pete View Post
Looking good here Rob.

Did a quickie test on the outputs using PCA to manually turn on and off an output.

Instant status on the HAI output page. Then did same on the HAI output page to PCA.

Instant status on PCA.

Been using NOAA radio with wireless switches and now moving the NOAA radio output to one zone to test with WeatherXML.

~1000 mysql database entries and doing fine.
Thanks Pete. That's exactly how I tested things - with PC access.

I am very interested in your NOAA connection to the hai panel. If I understand, you'll signal a zone when the NOAA alert goes off?

Sent from my Xoom using Tapatalk
Reply With Quote
  #14  
Old June 30th, 2015, 10:24 PM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,288
Yes. Thank you Rob for a great plugin.

Been using it with the Homeseer 2 box. The radio is programmed for just local alerts.

There is a NO switch on the radio which goes to NC when a NOAA alert is triggered.

First have Homeseer generate a TTS with alert.

Then an event triggers to screen scrape the NOAA alerts then read the alert.

See here.

Weather radio integration for automation
Reply With Quote
  #15  
Old July 1st, 2015, 08:58 AM
rmasonjr's Avatar
rmasonjr rmasonjr is offline
OverSeer
 
Join Date: May 2001
Location: Brookhaven, MS USA
Posts: 6,489
Quote:
Originally Posted by Pete View Post
Yes. Thank you Rob for a great plugin.

Been using it with the Homeseer 2 box. The radio is programmed for just local alerts.

There is a NO switch on the radio which goes to NC when a NOAA alert is triggered.

First have Homeseer generate a TTS with alert.

Then an event triggers to screen scrape the NOAA alerts then read the alert.

See here.

Weather radio integration for automation
Very nice, Pete!

On a related note, I have two driveway sensors being shipped from Amazon. I'll wire these into my HAI panel to alert me, via the plugin, when cars approach my house.
Reply With Quote
  #16  
Old July 1st, 2015, 09:24 AM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,288
@Rob,

Yup; here use two Cartell sensors (well its been over 10 years now) buried under the driveway and wired to the panel, PIRs and CCTV (4 cams) plus a couple of other devices all wired to the panel.

I do have the two HAI wireless devices (HAI 45A001 X 2 and one LV42A002) but have never used them in the midwest. I use one in FL today.

Using the little cheaper RFID devices in the house cars. They work fine today after many years. I tested these out a few months ago and they do work a few hundred feet away. These devices are the only wireless devices that I use outside.

Yesterday this little rabbit in the picture triggered a few events with home seer. It was playing and hopping around that cable you see in the picture. Never seen a rabbit jump that high.

The event/rabbit though reminded me to call CC today about burying that cable that has been sitting there now for over a month which sort of po'd me today.
Attached Images
 

Last edited by Pete; July 1st, 2015 at 10:44 AM.
Reply With Quote
  #17  
Old July 1st, 2015, 10:58 AM
rmasonjr's Avatar
rmasonjr rmasonjr is offline
OverSeer
 
Join Date: May 2001
Location: Brookhaven, MS USA
Posts: 6,489
Ah - those Cartells look nice. A friend recommended the Mighty Mule driveway detectors. They are buried next to the driveway and detect large metal objects which reduces false alerts. They seem to have very long range back to the receiver.

From the receiver, I want to connect it to my HAI panel as a zone. From there, I can trigger camera snapshots, TTS alerts, etc.

We've had an influx of rabbits down here in MS too! The kids love to see them.
Reply With Quote
  #18  
Old July 1st, 2015, 11:18 AM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,288
Quote:
From the receiver, I want to connect it to my HAI panel as a zone. From there, I can trigger camera snapshots, TTS alerts, etc.
I have read good stuff about the Mighty Mule driveway sensors.

Here many years ago ran much PVC underground to use for automation when it was time to use it.

You can do a bunch from the panel and integration with Homeseer.

Yup; here wife enjoys watching the rabbits. (we have seen coyotes, owls and hawks doing their stuff here sometimes).

BTW - did a quickie test while doing some other stuff with the panel today disconnecting it for a time. When I reconnected the network interface the HAI plugin came right back up and connected just fine.

HAC Connection is Offline...2015-07-01 14:35:09
Requesting configuration and properties of panel...2015-07-01 15:00:25


All of the OPII connected devices came back up fine except for the Omnitouch 5.7e's.

I had left my micro router just sitting there hanging a bit loose and neatened it up a bit using those clear 3M dual lock velcro tabs. Good stuff. It is being powered by the OPII panel (and backup).

Last edited by Pete; July 1st, 2015 at 04:27 PM.
Reply With Quote
  #19  
Old July 5th, 2015, 12:22 PM
ray ray is offline
Seer
 
Join Date: Jun 2007
Location: USA
Posts: 50
Hi Rob,
What is the purpose of the MySQL logging? I can see that it is logging the communication between HAI panel and the Homeseer plugin. Is the purpose to log the communication? or is there another purpose I'm not thinking of?

I was also wondering if you could utilize SQL logging that Jon uses in his charting program. I'm not a SQL expert but it seems like the MySQL Jon uses is a lot easier to use and does require a separate SQL program. Jon charting program uses MySQL to save data into a database (which I can view and export with free program).

Like I said, I'm not a expert. I'm just trying to understand the advantage of MYSQL.


Thanks,
Ray
Reply With Quote
  #20  
Old July 5th, 2015, 08:01 PM
rmasonjr's Avatar
rmasonjr rmasonjr is offline
OverSeer
 
Join Date: May 2001
Location: Brookhaven, MS USA
Posts: 6,489
Hey Ray. There's an HAI logging utility that has made its rounds over on CT. Its useful to have the logging to a db for history purposes. For example, you could go back pretty far to search for any panel activity.

Right now, my plugin only logs messages. I think Jon is logging actual device history info which is very helpful in tracking specific device activity.

Sent from my Xoom using Tapatalk
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HAI Plugin Beta - 3.0.1.1 rmasonjr rmasonjr Plug-Ins 49 June 30th, 2015 12:01 PM
HAI Plugin Beta - 3.0.1.0 rmasonjr rmasonjr Plug-Ins 51 June 23rd, 2015 09:07 AM
HAI Plugin v1.0.0.21 Beta rmasonjr rmasonjr Plug-Ins 22 April 21st, 2015 10:44 PM
DSC Plugin Beta 2.0.0.12 rjh HomeSeer DSC Plug-in 10 March 2nd, 2011 10:26 PM
DSC Plugin Beta 2.0.0.7 rjh HomeSeer DSC Plug-in 9 February 18th, 2011 05:31 PM


All times are GMT -4. The time now is 09:42 AM.


Copyright HomeSeer Technologies, LLC