Announcement

Collapse
No announcement yet.

Can I trigger an event by calling a BATCH or SH file and return true or false

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

    Can I trigger an event by calling a BATCH or SH file and return true or false

    Can I trigger an event by calling a BATCH or SH file and return true to trigger then event or false to not trigger it.

    #2
    Your batch / shell script can do this via homeseer's JSON interface / API. Clearly , logic to determine if event should be triggered will need to be within the script. Or the script could update a virtual device via JSON where a homeseer event could use that to trigger the appropriate event.
    Len


    HomeSeer Version: HS3 Pro Edition 3.0.0.435
    Linux version: Linux homeseer Ubuntu 16.04 x86_64
    Number of Devices: 633
    Number of Events: 773

    Enabled Plug-Ins
    2.0.54.0: BLBackup
    2.0.40.0: BLLAN
    3.0.0.48: EasyTrigger
    30.0.0.36: RFXCOM
    3.0.6.2: SDJ-Health
    3.0.0.87: weatherXML
    3.0.1.190: Z-Wave

    Comment


      #3
      It would probably be simpler to have the batch file execute the event directly with a JSON call. No virtual devices necessary.

      Comment


        #4
        Originally posted by mterry63 View Post
        It would probably be simpler to have the batch file execute the event directly with a JSON call. No virtual devices necessary.
        I'll leave that for geeTee to decide. I think it would depend on how isolated the script is from needing additional homeseer device status' to determine true or false.
        Len


        HomeSeer Version: HS3 Pro Edition 3.0.0.435
        Linux version: Linux homeseer Ubuntu 16.04 x86_64
        Number of Devices: 633
        Number of Events: 773

        Enabled Plug-Ins
        2.0.54.0: BLBackup
        2.0.40.0: BLLAN
        3.0.0.48: EasyTrigger
        30.0.0.36: RFXCOM
        3.0.6.2: SDJ-Health
        3.0.0.87: weatherXML
        3.0.1.190: Z-Wave

        Comment


          #5
          JSON interface / API? a link to this please?

          Any "Hello World" samples of either of the proposed solutions would be awesome.

          Comment


            #6
            Originally posted by geeTee View Post
            JSON interface / API? a link to this please?

            Any "Hello World" samples of either of the proposed solutions would be awesome.
            Here is the HS4 documentation ... https://docs.homeseer.com/display/HSPI/JSON+API
            I use this for HS3 ... https://homeseer.com/support/homesee...nk/default.htm

            Here is the base json call to run an event
            Code:
             /JSON?request=runevent&group=GROUPNAME&name=EVENTNAME
            linux example:
            curl -s 'http://homeseer.local/JSON?request=runevent&group=_forum&name=eventA'
            Len


            HomeSeer Version: HS3 Pro Edition 3.0.0.435
            Linux version: Linux homeseer Ubuntu 16.04 x86_64
            Number of Devices: 633
            Number of Events: 773

            Enabled Plug-Ins
            2.0.54.0: BLBackup
            2.0.40.0: BLLAN
            3.0.0.48: EasyTrigger
            30.0.0.36: RFXCOM
            3.0.6.2: SDJ-Health
            3.0.0.87: weatherXML
            3.0.1.190: Z-Wave

            Comment


              #7
              sweet. thanks. will try. now I want HOMESEER to call my CODE to check periodically and if my code returns true, HOMESEER will act on it

              Comment

              Working...
              X