No announcement yet.

Keeping a plugin alive

  • Filter
  • Time
  • Show
Clear All
new posts

  • Keeping a plugin alive

    Hi All,

    I am about to start work on porting a personal paging plugin over to HS3 for Linux, or at least to run the plugin on Linux.

    What I want to achieve, is for the remote device which runs the plugin to continue to run it even if HS3 is not running, and just keep trying to reconnect until HS3 comes back up.

    Anyway, that part I can get working but since I reference triggers and a heap of other things (setting device references and so on) what I need to do is to put some check's in the plugin to see if the connection is there between the client and HS, and if so to continue with the various subs, but if not to do nothing.

    So my question is, would it be enough to just do something like:

    If client.CommunicationState = HSCF.Communication.Scs.Communication.CommunicationStates.Con nected And Not bShutDown Then do stuff

    Is that likely to be enough to determine if the connection exists, or is there a better way to achieve this?
    HS3 PRO, Win10, WeatherXML, HSTouch, Pushover, UltraGCIR, Heaps of Jon00 Plugins, Just sold and about to move so very slim system.

    Facebook | Twitter | Flickr | Google+ | Website | YouTube

  • #2
    Try this. You run it as a standalone exe and it connects to Homeseer. Not sure if it does exactly what you say but it worked fine for me (I don't use this anymore).

    Obviously you'll have to replace my badly coded custom code in main.vb with yours...