I was wondering if there is a list of hs plug-in calls, for use in our plugins? Would be nice if the calls were documented with namespace and sintax, ie. hs.WriteLog, etc..
Announcement
Collapse
No announcement yet.
Is there a list of hs plug-in API calls?
Collapse
X
-
Is there a list of hs plug-in API calls?
-Larry
A member of "The HA Pioneer Group", MyWebSite
Plugins:
VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...
Hardware:
Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.Tags: None
-
Originally posted by lpitman View PostI was wondering if there is a list of hs plug-in calls, for use in our plugins? Would be nice if the calls were documented with namespace and sintax, ie. hs.WriteLog, etc..
Are you referring to the plugin SDK docs located here: https://docs.homeseer.com/display/HSPI
-
I am trying to determine for example: hs.WriteLog call. What is the equivalent call in the new API?-Larry
A member of "The HA Pioneer Group", MyWebSite
Plugins:
VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...
Hardware:
Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.
Comment
-
But only inside the hspi class, not outside. I am having the same issue. It feels like you have to do all inside the hspi, which would create a very large hspi vlass.
how does one call hs.writelog from another part of the plugin? Would have expected something in PluginSDK.logging? But that is only holding a single value?-- Wim
Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData
1210 devices/features ---- 392 events ----- 40 scripts
Comment
-
Originally posted by lpitman View PostI am trying to determine for example: hs.WriteLog call. What is the equivalent call in the new API?
Greig.
Sent from my SM-G973F using Tapatalk
Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
Scripts = Various
Comment
-
In HS3 we had :
Code:IHSApplication.WriteLog(string mtype, string message)
Code:IHsController.WriteLog(ELogType logType, string message, string pluginName, string color = "")
- Likes 1
Comment
-
Originally posted by spud View PostIn HS3 we had :
Code:IHSApplication.WriteLog(string mtype, string message)
Code:IHsController.WriteLog(ELogType logType, string message, string pluginName, string color = "")
Thanks for your reply. I am self-taught and am not quite getting passing the HomeSeerSystem object to any other class to work can you give me an example of this?
Greig.
Sent from my SM-G973F using TapatalkZwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
Scripts = Various
Comment
-
Originally posted by enigmatheatre View PostSpud,
Thanks for your reply. I am self-taught and am not quite getting passing the HomeSeerSystem object to any other class to work can you give me an example of this?
Greig.
Sent from my SM-G973F using Tapatalk
You can pass it as a parameter of the constructor of all your other classes: MyClass a = new MyClass(HomeSeerSystem), or you could define a singleton design pattern to be able to access it from anywhere, or any other method you used in HS3.
Comment
-
Thanks for the responses, This isn't that intuitive for a lot of us self taught programmers. More examples would certainly help. I think probably since this is alpha, the sample program source was very sparse, compared to maybe later when beta is available.-Larry
A member of "The HA Pioneer Group", MyWebSite
Plugins:
VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...
Hardware:
Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.
Comment
-
Originally posted by spud View Post
How did you do it in HS3?
So My plugin would spin up controllers/services and pass in the hspi class to reference for calling back to HS. Allowed me to have a nice separation of business logic and HSPI logic.
Comment
-
Originally posted by enigmatheatre View PostSpud,
Thanks for your reply. I am self-taught and am not quite getting passing the HomeSeerSystem object to any other class to work can you give me an example of this?
Greig.
Sent from my SM-G973F using Tapatalk
-Larry
A member of "The HA Pioneer Group", MyWebSite
Plugins:
VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...
Hardware:
Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.
Comment
-
Originally posted by lpitman View Post
I give up, none of the suggestions above work for me. We need a complete example of a plugin, that includes creating devices, writing to log, and interfacing HS calls into our modules, class files!!!
I can get the sample plugin to run without problems but whenever I try and add any calls to HS the plugin crashes. In HS3 I had a public member that I would callCode:Public hs As HomeSeerAPI.IHSApplication
Code:Public HS4 As HomeSeer.PluginSdk.IHsController
Code:HS4.WriteLog(Logging.ELogType.Info, "Test Message", "Test Name")
I am probably doing something dumb but I just can't work it out.
Greig.Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
Scripts = Various
Comment
-
Here is an example that I could understand...
Code:Public Class ClsComm ' Serial port specific constants and globals Public Shared RS232Port As New System.IO.Ports.SerialPort #Region " My CommPort Functions " '**************************************************************************** ' CloseComPort is used to close the communications port. Friend Shared Sub CloseComPort() ClsHelper.OutputHSLog("Entering CloseComPort()....", DEBUG_LOGGING, "Debug", COLOR_ORANGE) With RS232Port Try If .IsOpen = True Then .Close() ClsHelper.OutputHSLog(gComPort & " Closed.", NORMAL_LOGGING, "Info", COLOR_BLACK) End If Catch ex As Exception ClsHelper.OutputHSLog("Exception error in CloseComPort(): " & ex.Message, MANDATORY_LOGGING, "Error", COLOR_RED) ' Handle exception error End Try End With End Sub
-Larry
A member of "The HA Pioneer Group", MyWebSite
Plugins:
VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...
Hardware:
Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.
Comment
Comment