www.homeseer.com    
 

Go Back   HomeSeer Message Board > HomeSeer Products & Services > HomeSeer Software > HS3 / HS3PRO > HS3 Plug-In Development

HS3 Plug-In Development Discussions related to developing plugins for HS3.

Reply
 
Thread Tools Display Modes
  #1  
Old May 29th, 2013, 04:42 PM
rjh's Avatar
rjh rjh is offline
HomeSeer Technologies
 
Join Date: Jan 2001
Location: Bedford, NH, USA
Posts: 7,672
HS3 Plugin Samples

[UPDATED 5/14/15]

Here are 3 plug-in samples that show the 3 ways to configure a plugin. One is a standard sample, one is a more basic sample that has simple actions/triggers, and the third shows how to create a multi-instance plugin.

http://homeseer.com/updates3/hs3_plugin_samples.zip

10/19/13 Changes:

* Modified multi-instance sample so it supports both single and multiple EXE modes properly
__________________
Rich,


website | products | support | youtube
Reply With Quote
  #2  
Old June 7th, 2013, 02:55 PM
mnsandler's Avatar
mnsandler mnsandler is offline
Insteon Overlord
 
Join Date: Apr 2005
Location: Virginia
Posts: 9,267
please add a version number to the zip file name so we can keep them straight as they change.
__________________
Mark

HS3 Pro 3.0.0.280
Hardware: Insteon Serial PLM | Vista Alarm 20P with AD2USB | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
Plugins: Insteon 3.0.5.76 (mine) | Vista Alarm (mine) | Omnistat 3 (by Kirby) | Ultra1Wire | RFXCOM | NetCAM | Surveillance Station (kriz83) | MyQ | BLRadar
Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory
Reply With Quote
  #3  
Old June 7th, 2013, 04:57 PM
dcorsus dcorsus is offline
OverSeer
 
Join Date: Mar 2010
Location: California
Posts: 3,231
Can we have an example for dynamic (AJAX) webpages

Quote:
Originally Posted by rjh View Post
Here are 3 plug-in samples that show the 3 ways to configure a plugin. One is a standard sample, one is a more basic sample that has simple actions/triggers, and the third shows how to create a multi-instance plugin.

ftp://ftp.homeseer.com/updates/Beta/...in_samples.zip
Could you extend the sample, with an Ajax handler and put in a control that gets dynamically updated let's say every second (ex a counter).
I agree with Mark, please give it a version number, hard to keep track of whether I have the latest.
Thanks
Dirk
ps. the sample wouldn't run under Studio because it was missing an inherited declaration for the "SpeakIn" method, I fixed that on my setup and now I can debug the sample under 3.0.0.1 (or was it 2?)
Reply With Quote
  #4  
Old June 7th, 2013, 05:24 PM
rjh's Avatar
rjh rjh is offline
HomeSeer Technologies
 
Join Date: Jan 2001
Location: Bedford, NH, USA
Posts: 7,672
That is what I did in the sample, it has an AJAX call that updates a div that is the time and date, so you can see it change in real time.

The plugins I just uploaded are the very latest. I will update the post with a date when I change them.

Quote:
Originally Posted by dcorsus View Post
Could you extend the sample, with an Ajax handler and put in a control that gets dynamically updated let's say every second (ex a counter).
I agree with Mark, please give it a version number, hard to keep track of whether I have the latest.
Thanks
Dirk
ps. the sample wouldn't run under Studio because it was missing an inherited declaration for the "SpeakIn" method, I fixed that on my setup and now I can debug the sample under 3.0.0.1 (or was it 2?)
__________________
Rich,


website | products | support | youtube
Reply With Quote
  #5  
Old June 7th, 2013, 08:03 PM
Rotech's Avatar
Rotech Rotech is offline
OverSeer
 
Join Date: Aug 2007
Location: Riverview, FL
Posts: 4,168
Quote:
Originally Posted by rjh View Post
[UPDATED 6/7/2013]

Here are 3 plug-in samples that show the 3 ways to configure a plugin. One is a standard sample, one is a more basic sample that has simple actions/triggers, and the third shows how to create a multi-instance plugin.

ftp://ftp.homeseer.com/updates/Beta/...in_samples.zip
Is this for developers only? Or this is a "how to" info?
__________________
Hector
____________________________________
Win.2003 OS, HS3
BLDSC,BLstat,BLRadar,BLRamdom,BLOccupied
BLups,BLrain8,HSTouch,Ultrajones Weatherbug,
MyTrigger,ACRF2,W800,Zwave
AP800,Honeywell Stat
Reply With Quote
  #6  
Old June 7th, 2013, 08:29 PM
rjh's Avatar
rjh rjh is offline
HomeSeer Technologies
 
Join Date: Jan 2001
Location: Bedford, NH, USA
Posts: 7,672
The samples are source code to 3 plugins. If you are not a programmer, I doubt they are of any use.

Quote:
Originally Posted by Rotech View Post
Is this for developers only? Or this is a "how to" info?
__________________
Rich,


website | products | support | youtube
Reply With Quote
  #7  
Old June 7th, 2013, 08:31 PM
Rotech's Avatar
Rotech Rotech is offline
OverSeer
 
Join Date: Aug 2007
Location: Riverview, FL
Posts: 4,168
Kinda figured that, thks...
__________________
Hector
____________________________________
Win.2003 OS, HS3
BLDSC,BLstat,BLRadar,BLRamdom,BLOccupied
BLups,BLrain8,HSTouch,Ultrajones Weatherbug,
MyTrigger,ACRF2,W800,Zwave
AP800,Honeywell Stat
Reply With Quote
  #8  
Old June 7th, 2013, 08:55 PM
TeleFragger's Avatar
TeleFragger TeleFragger is offline
OverSeer
 
Join Date: Jun 2004
Location: Williamstown, NJ
Posts: 4,585
Quote:
Originally Posted by Rotech View Post
Kinda figured that, thks...
Hector... yes U and I have no business looking at them!!!!!!!

let the guru's figure it out!!
__________________
HW - i5 4570T @2.9ghz runs @11w | 8gb ram | 128gb ssd OS - Win10 x64

HS - HS3 Pro Edition 3.0.0.297
Plugins - BLLAN 2.0.35.0 | BLRF 2.0.85.0 | Concord 4 3.1.13.6 | HSTouch Server 3.0.0.68 | RFXCOM 30.0.0.33 | X10 3.0.0.36 | Z-Wave 3.0.1.87

Hardware - EdgePort/4 DB9 Serial | RFXCOM 433MHz USB Transceiver | Superbus 2000 for Concord 4 | TI103 X-10 Interface | WGL Designs W800 RF | Z-Troller Z-Wave Interface
Reply With Quote
  #9  
Old June 8th, 2013, 05:05 PM
Gogs's Avatar
Gogs Gogs is offline
OverSeer
 
Join Date: Apr 2003
Location: Kirkliston, Scotland, GB
Posts: 4,595
Quote:
Originally Posted by rjh View Post
The samples are source code to 3 plugins. If you are not a programmer, I doubt they are of any use.
Nice touch Rich, good to in an open forum that HST is trying to help those developers that are insterested pointing in the right direction.
__________________

A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"
HomeSeer 3 V 3.0.0.300 with ALEXA (AKA Amazon Echo)
BL Radar V2.0.2150; BLRF V2.0.85.0; HS Touch V3.0.0.103; X10 V3.0.0.36; PHLocation V3.0.0.38;Zwave V3.0.1.96;X10 V3.0.0.39
BLBackup V2.0.27.0 All on Windows XP Pro
Reply With Quote
  #10  
Old July 29th, 2013, 11:14 AM
WiseSeer WiseSeer is offline
Seer
 
Join Date: May 2010
Location: NorthWest US
Posts: 25
Is there a HOWTO or beginners guide to homeseer plugin/custom web page development? I've reviewed the SDK documentation and it makes assumptions about how to even start. (Yes, I'm a developer but of low level OS/drivers, but not web/java/scripts -- just starting there)
Reply With Quote
  #11  
Old July 30th, 2013, 12:39 AM
vasrc's Avatar
vasrc vasrc is offline
Seer Master
 
Join Date: May 2003
Location: Locust Dale, VA
Posts: 994
If there is I haven't found it yet
The information you need is in the SDK and samples, there's just no overall design doc that show how it all fits together. I found the HSPI_SAMPLE to be the most useful albeit more than you might use. Another confusing thing for me was how the same process was coded slightly different in each example.

In the end i just slugged my way through it, it's just another language and/or API. If you can write low level drivers you shouldn't have a problem other than a lot more time to fill in the blanks.
Being a Beta doesn't help either as you're never sure if it's your misunderstanding something or just a bug

Have fun
Z
Reply With Quote
  #12  
Old July 31st, 2013, 10:46 AM
WiseSeer WiseSeer is offline
Seer
 
Join Date: May 2010
Location: NorthWest US
Posts: 25
I don't think my question is specific to ver 3. Please walk me though creating a simple custom page. I've added simple internal and extern URLs in the Tools->Setup->Custom->Custom Page 1 URL [e.g., test.html] but I don't see a new page. Added the test.html file to the homeseer html folder. How do I add a custom page?
Reply With Quote
  #13  
Old July 31st, 2013, 11:20 AM
vasrc's Avatar
vasrc vasrc is offline
Seer Master
 
Join Date: May 2003
Location: Locust Dale, VA
Posts: 994
Sorry, HS3 is eating away at my brain

I'm assuming you entered in the page name in the URL section (It's homebased to /html already, so just the page name, ie test.html)

You'll get a new button on your header that has the title you gave it. You can access it from there.
Z
Reply With Quote
  #14  
Old August 6th, 2013, 09:41 AM
WiseSeer WiseSeer is offline
Seer
 
Join Date: May 2010
Location: NorthWest US
Posts: 25
Got it, thanks.
Reply With Quote
  #15  
Old October 18th, 2013, 01:40 PM
tonlof's Avatar
tonlof tonlof is offline
Seer Master
 
Join Date: Apr 2001
Location: Nordic
Posts: 1,399
I have some problem to get SAMPLE & SAMPLE_BASIC to work. I have not done any changes in the code yet.

Using Visiual Studio Express 2012

HSPI_SAMPLE (Can't build, 102 errors)

HSPI_SAMPLE_BASICMI (Works Perfect) I have made my own plugin with this, but don't want multiple instances.

HSPI_SAMPLE_BASIC (Build is working but I got error when activate the plugin, see error below)

Initializing plug-in(2): Sample-Basic Instance::Conversion from string "COM1" to type 'Long' is not valid.0STACK:Server stack trace: Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessag e(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(Mess ageData& msgData, Int32 type) at HomeSeerAPI.IPlugInAPI.InitIO(String port) at Scheduler.clsHSPI.CheckInterfaces()

Thanks
__________________
Please excuse any spelling and grammatical errors I may make.
--
Tasker Plugin / Speech Droid
Tonlof | Sweden
Reply With Quote
  #16  
Old October 18th, 2013, 01:42 PM
dcorsus dcorsus is offline
OverSeer
 
Join Date: Mar 2010
Location: California
Posts: 3,231
Quote:
Originally Posted by tonlof View Post
I have some problem to get SAMPLE & SAMPLE_BASIC to work. I have not done any changes in the code yet.

Using Visiual Studio Express 2012

HSPI_SAMPLE (Can't build, 102 errors)

HSPI_SAMPLE_BASICMI (Works Perfect) I have made my own plugin with this, but don't want multiple instances.

HSPI_SAMPLE_BASIC (Build is working but I got error when activate the plugin, see error below)

Initializing plug-in(2): Sample-Basic Instance::Conversion from string "COM1" to type 'Long' is not valid.0STACK:Server stack trace: Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessag e(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(Mess ageData& msgData, Int32 type) at HomeSeerAPI.IPlugInAPI.InitIO(String port) at Scheduler.clsHSPI.CheckInterfaces()

Thanks
I think you don't have the latest version of the sample code. In HS3 version 13 (or so) the comport was changed from string to integer and I believe the sample code went from v3 to v5 (or something like that).

Dirk
Reply With Quote
  #17  
Old October 18th, 2013, 01:44 PM
tonlof's Avatar
tonlof tonlof is offline
Seer Master
 
Join Date: Apr 2001
Location: Nordic
Posts: 1,399
Thanks for your quick reply, I download it from the first post in this thread.

Quote:
Originally Posted by dcorsus View Post
I think you don't have the latest version of the sample code. In HS3 version 13 (or so) the comport was changed from string to integer and I believe the sample code went from v3 to v5 (or something like that).

Dirk
__________________
Please excuse any spelling and grammatical errors I may make.
--
Tasker Plugin / Speech Droid
Tonlof | Sweden
Reply With Quote
  #18  
Old October 18th, 2013, 02:14 PM
dcorsus dcorsus is offline
OverSeer
 
Join Date: Mar 2010
Location: California
Posts: 3,231
Quote:
Originally Posted by tonlof View Post
Thanks for your quick reply, I download it from the first post in this thread.
So it is OK now or you had these errors with the downloaded code? If you have these errors with the latest code, I'm not familiar with error 102 but you have to check all the references and make sure they are still properly pointing to the right dlls, coms etc in the right directories. If the basic-sample PI is giving you the com port error, just look at Init_IO of the other version, look at how the procedure definition was changed from string to integer and do the same, save it and you should be fine.
Dirk
Reply With Quote
  #19  
Old October 18th, 2013, 02:24 PM
vasrc's Avatar
vasrc vasrc is offline
Seer Master
 
Join Date: May 2003
Location: Locust Dale, VA
Posts: 994
If you show 102 errors it means you haven't referenced the HS libraries (Scheduler, HomeSeerAPI, HSCF) yet.
Make sure you point at them on your References page
Reply With Quote
  #20  
Old October 18th, 2013, 02:29 PM
rjh's Avatar
rjh rjh is offline
HomeSeer Technologies
 
Join Date: Jan 2001
Location: Bedford, NH, USA
Posts: 7,672
I updated the samples, download using the link in the first post.
__________________
Rich,


website | products | support | youtube
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 Off

Forum Jump


All times are GMT -4. The time now is 07:29 PM.

Untitled Document
NEW!
New Products


Copyright HomeSeer Technologies, LLC