Announcement

Collapse
No announcement yet.

Problem popped up with motion detect

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

  • Problem popped up with motion detect

    I'm running BI4 and HS3.

    I had motion detect working with the 'non JSON' web alert. I upgraded the BI plugin to the newest version and it seems to have broken it. I changed to the JSON method but all I get in response is 'bad request'.

    I went to put it back to the non-JSON method but the instructions for that hve been removed from the documentation now.

    Any ideas on why I might be getting bad request and also could you post the prior method so I can try that again?

    Thanks!

  • #2
    Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

    Comment


    • #3
      You bet....

      192.168.0.204/JSON?request=pluginfunction&function=Alert&plugin=Blue-Iris&P1=&CAM&P2=&TYPE

      I get the same 'bad request' if I do this from my browser as I do from within BI

      mark

      Comment


      • #4
        Originally posted by MarkJames View Post
        You bet....

        192.168.0.204/JSON?request=pluginfunction&function=Alert&plugin=Blue-Iris&P1=&CAM&P2=&TYPE

        I get the same 'bad request' if I do this from my browser as I do from within BI

        mark
        Do you have a username and password configured?

        Mine is what you have above, but preceded with userswd@

        userswd@192.168.0.204/JSON?request=pluginfunction&function=Alert&plugin=Blue-Iris&P1=&CAM&P2=&TYPE
        Michael

        HS3 Pro 3.0.0.470 | 849 devices | 349 events | OpenSprinkler | BLShutdown | EasyTrigger | NetCAM | Harmony Hub | Sonos | SDJ-Health | BLUPS | PHLocation | BLBackup | BLLock | Z-Wave 3.0.1.243 | weatherXML | Pushover 3P | Blue-Iris | AirPlaySpeak

        Comment


        • #5
          Originally posted by MarkJames View Post
          You bet....

          192.168.0.204/JSON?request=pluginfunction&function=Alert&plugin=Blue-Iris&P1=&CAM&P2=&TYPE

          I get the same 'bad request' if I do this from my browser as I do from within BI

          mark
          Mark:

          1. Is 192.168.0.204 the address of your HS3 machine?
          2. Do you require authentication for local access? If so you need to add credentials to the urL as rvtravlr suggests above.
          3. Lastly, in HS3 Setup, on the Network Tab, under Remote Control Settings, have you enabled "Control using JSON"
          Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

          Comment


          • #6
            Sorry - for some reason I didn't get the notification that there were responses even though I've subscribed the thread.

            So - I use the JSON interface extensively for controls from my own web page.

            If I enter this

            Code:
            http://192.168.0.204/JSON?request=controldevicebyvalue&ref=8&value=100
            in my browser it will turn on device reference ID 8

            conversely

            Code:
            http://192.168.0.204/JSON?request=controldevicebyvalue&ref=8&value=0
            This will turn it off.

            From this I know fairly certainly that my JSON interface is working and that I don't need a user/password login to access it.

            For some reason this won't work from the plug-in, though.
            Code:
            192.168.0.204/JSON?request=pluginfunction&function=Alert&plugin=Blue-Iris&P1=&CAM&P2=&TYPE
            This won't even generate a log entry in HS3 - just a 'bad request' returned. HS3 sees to be at a loss for what to do with the 'request=pluginfunction' portion

            If, OTOH, I put this in the web alert
            Code:
            192.168.0.204/JSON?request=controldevicebyvalue&ref=8&value=100
            The BI Test button will return 483 bytes (instead of the 13 for the bad request) and will turn on device ID 8

            It's something to do with the structure of the JSON request

            I can easily work around it by creating a virtual device and using the web alert of BI to turn it on with alert and off with reset it would just be easier to do it with the plugin


            mark
            Last edited by MarkJames; December 8th, 2017, 03:46 PM.

            Comment


            • #7
              No, don't go the virtual device route just yet, let's try and get this solved for you and working as expected.

              Let's work from a browser for the time being so we can see the response. If I enter an invalid JSON HS3 request (misspelled pluginfunction):

              Code:
              http://192.168.1.14/JSON?request=pluginfunctio&function=Alert&plugin=Blue-Iris&P1=&CAM&P2=&TYPE
              I get the following response:
              Code:
              { "Response":"Error, bad request" }
              If I enter a valid request:

              Code:
              http://192.168.1.14/JSON?request=pluginfunction&function=Alert&plugin=Blue-Iris&P1=&CAM&P2=&TYPE
              I get:
              Code:
              { "Response":"OK - got the TRIGGER  alert for " }
              If you enable "debug" logging for the BI plugin, you should also see the following entry in the HS3 log:
              Code:
              	Blue-Iris Debug	Alert TRIGGER from BI received: on
              Can you confirm the plugin version you're running please?
              Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

              Comment


              • #8
                If I do the same thing (misspelled plugin name I copy/pasted from your post and changed the IP) from my browser (chrome) I get

                bad request

                I have BI set to debug but there's nothing in the HS3 log

                If I copy/paste the valid format again, from your post with the IP changed to my own) I get the same response

                bad request

                If I send a regular JSON request I get something like this
                {"Name":"HomeSeer Devices","Version":"1.0","Devices":[{"ref":8,"name":"BlueIris - Front Door Motion","location":"Unknown","location2":"HST","value":0,"st atus":"Off","device_type_string":"","last_change":"\/Date(1512801056994)\/","relationship":0,"hide_from_view":false,"associated_device s":[],"device_type":{"Device_API":0,"Device_API_Description":" No API","Device_Type":0,"Device_Type_Description":"Type 0","Device_SubType":0,"Device_SubType_Description":""},"devi ce_image":""}]}

                My plugin is Blue Iris Plugin v3.1.1.24385

                On a side note - I do see this in my log now, though - (yeah - I have a lot of cameras)


                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Boat Slip [BoatSlip] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: G2 Driveway [G2drive] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: UpperG2 [G2Upper] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Trampoline [Trampoline] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: BrickPath [BrickPath] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Pool Steps [PoolSteps] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: PoolHouse [PoolHse] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Pool [Pool] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Beach [Beach] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Gate2Path [Gate2Path] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Dock-main [Dock-main] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Patio [Patio] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Laundry [Laundry] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: InsideGate [InsideGate] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: DoorView [DoorView] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: DrivewayUp [DriveUp] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Driveway Down [DrvDown] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Front Door [FrontDr] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: PoolHouseFront [PoolHouse] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Update status succeeded. Uptime: 7:03:15:56
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Boat Slip [BoatSlip] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: G2 Driveway [G2drive] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: UpperG2 [G2Upper] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Trampoline [Trampoline] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: BrickPath [BrickPath] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Pool Steps [PoolSteps] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: PoolHouse [PoolHse] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Pool [Pool] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Beach [Beach] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Gate2Path [Gate2Path] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Dock-main [Dock-main] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Patio [Patio] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Laundry [Laundry] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: InsideGate [InsideGate] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: DoorView [DoorView] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: DrivewayUp [DriveUp] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Driveway Down [DrvDown] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: Front Door [FrontDr] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Camera: PoolHouseFront [PoolHouse] Status: Online
                Dec-08 10:25:01 PM Blue-Iris Debug Refreshing data from Blue Iris server
                Dec-08 10:25:01 PM Blue-Iris Debug Successfully logged in to BlueIris server: ZapHome (ver 4.5.3.0) as Mark.
                Dec-08 10:25:00 PM Blue-Iris Debug Attempting to login to http://192.168.0.204:81/json as Mark

                Comment


                • #9
                  Mark, do you get the full { "Response":"Error, bad request" } as plain text, or a "404 Bad Request:" with an HS3 menu bar below it?
                  Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                  Comment


                  • #10
                    Nope - just the words

                    bad request

                    I've not updated my HS3 in a while. Historically that's caused me problems (been with Homeseer for over 10 years) - could be I need to update?

                    Comment


                    • #11
                      I can't find a way to re-create this "bad request"

                      If I mis-spell JSON (JSO) I get:


                      If I mis-spell the function call I get:



                      But I can't find a way to just get "bad request" as a response form HS3. I'm at a bit of a loss here.
                      Attached Files
                      Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                      Comment


                      • #12
                        Must be a change in HS3.

                        I'll backup and take an update tomorrow. Perhaps that will solve this. I've lost my events and devices so many times over the years that I don't update unless I absolutely have to. My system talks to an ISY (180 devices), a Davis Vantage, MCSSprinklers via EZ-Flora, Blue Iris, and more so when things go wrong it's nightmarish trying to put it all back - and lord knows I've had to put it back many times.

                        Thanks for your help. Worst case scenario I use virtual devices from BI to HS3 and BI plugin to control BI from HS3. I can easily live with that.

                        Mark

                        Comment


                        • #13
                          Same problem here since last BI update

                          This is the error message I'm getting....
                          Attached Files

                          Comment


                          • #14
                            What error do you get when you paste that URL in not a browser?

                            Is HS3 running on port 80? Is JSON enabled in HS3? Do you require local authentication?


                            Sent from my iPhone using Tapatalk
                            Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                            Comment


                            • #15
                              Boy, do I feel dumb! I changed the home seer port to 8084 and now that i added 192.168.1.6:8084 it works fine. My bad......

                              Comment

                              Unconfigured PHP Module

                              Collapse

                              Working...
                              X