Announcement

Collapse
No announcement yet.

Triggering Event from Blue Iris

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

    Triggering Event from Blue Iris

    I am trying to trigger an event from Blue Iris. I use the following URL:

    http://[IP]/JSON?request=runevent&id=640​

    This works fine when I paste this into a web browser, i.e. I see the event being executed and I get a "{ "Response":"ok" }" back. However, when I use the same in BlueIris, it doesn't run the event. See screenshot below. I put the /JSON... part into the "Post/payload" field because, according to the documentation, if that field is empty, then a GET is executed and if it's not empty then a POST is executed. Also tried it with the whole action in the http:// field, i.e. a GET. I also tried JSON?... (so without starting with a forward slash) in the post/payload field. None of that works. I know some here are also using BlueIris. Has anyone done this?

    Click image for larger version

Name:	OnAlert1.png
Views:	77
Size:	22.7 KB
ID:	1664690


    #2
    It says Post/payload for second textbox...

    How about in url textbox

    [IP]/JSON?

    or even omit "?"

    And then in the post textbox

    request=runevent&id=640​​
    3.0.0.548: HS3PRO - 3.0.5.10: AIAlert - 2.1.1.0: APIWeather - 2.0.64.0: BLBackup - 2.0.45.0: BLLAN - 2.0.37.0: BLRoombaWifi - 1.0.0.3: DevLog - 1.2.5.15: KeyPad - 3.0.2.25: NetCAM - 0.0.0.52: Pushover 3P - 3.0.0.5: SendVFD - 1.0.0.3: Tiles - 3.0.11.0: Z-Wave

    Comment


      #3
      put the string in the URL

      192.168.1.200/JSON?request=runevent&id=640

      Comment


        #4
        None of this seems to work. But now I wonder, to trigger an event on HS, do you need to send a GET or a POST? http://[IP]/JSON?request=runevent&id=640 work when posted in a web browser. This formatting, i.e. parameters in the URL, is a GET. So I guess to trigger an event in HS you need to send a GET?!

        Comment


          #5
          The HS3help file says it's a get so will40 is correct...
          3.0.0.548: HS3PRO - 3.0.5.10: AIAlert - 2.1.1.0: APIWeather - 2.0.64.0: BLBackup - 2.0.45.0: BLLAN - 2.0.37.0: BLRoombaWifi - 1.0.0.3: DevLog - 1.2.5.15: KeyPad - 3.0.2.25: NetCAM - 0.0.0.52: Pushover 3P - 3.0.0.5: SendVFD - 1.0.0.3: Tiles - 3.0.11.0: Z-Wave

          Comment


            #6
            Originally posted by mulu View Post
            None of this seems to work. But now I wonder, to trigger an event on HS, do you need to send a GET or a POST? http://[IP]/JSON?request=runevent&id=640 work when posted in a web browser. This formatting, i.e. parameters in the URL, is a GET. So I guess to trigger an event in HS you need to send a GET?!
            Have you tried going through MyHS which *might* check both POST and GET? It may not be ideal, but see if it works. See here: https://docs.homeseer.com/hspi/json-api

            Comment


              #7
              definitely a GET. Can you change a HS device value?

              192.168.1.200/JSON?request=controldevicebyvalue&ref=4111&value=100

              Comment


                #8
                Ok, so I am just entering the full URL. I tried going through MyHS by using the following URL in a web browser.

                https://connected2.homeseer.com/JSON?user=[MyHSUser]&pass=[MyHsPassword]&request=runevent&id=640

                This worked fine and the event did run. Then I used the exact same URL (copy/paste minus the https://) in BlueIris.

                Click image for larger version

Name:	AlertBlueIris1.png
Views:	43
Size:	17.6 KB
ID:	1664714

                This gives me a "Web: error: No stream: 401." error, i.e. authentication.
                Click image for larger version

Name:	ActionError1.png
Views:	48
Size:	6.3 KB
ID:	1664713

                When I don't go through MyHS in BI then BI reports success. However, the plugin isn't being triggered.

                Click image for larger version

Name:	Action1.png
Views:	41
Size:	5.9 KB
ID:	1664715

                What I don't understand is why BI reports success but the event isn't being triggered.

                Comment


                  #9
                  Ah, I finally got this to work by looking at the HS4 log. I think BI reports ok because it received a response. It doesn't care that the response said that the GET was denied. It's just happy that it got a response.

                  The reason it seems to work with the browser is that the browser posts it just the way you enter the URL. So if you don't specify a user or pwd, it will not include that information. Because the browser is on the same system as HS, no authentication is required. However, BI seems to enter a default user "admin". I am saying that because in the HS log it says the user admin doesn't have access rights (I don't have a user called admin). Now if I use the URL

                  http://[user]:[password]@[ip]:[port]/JSON?request=runevent&id=[EventID]

                  then it works. Of course, the user/password needs to exist in HS. I didn't want to use the admin/main account, so I created a new user. With that it works. Thanks for all the input.

                  Comment

                  Working...
                  X