Announcement

Collapse
No announcement yet.

Issues with web hook

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

    Issues with web hook

    Trying to get Device Updates:

    Receiving Device updates
    Every time the device value or status changes in HomeSeer the node will send a message containing the new state of the device in msg.payload the new value of the device msg.payload.status the new status text of the device

    I have checked within HS4 and the webhook is defined correctly. Node Red and HS4 are on the same RPI4 no firewall. Webhook URL is:
    http://127.0.0.1:1880/homeseer/webhook Have also tried using the ip address or http://10.1.2.9:1880/homeseer/webhook

    When I open a browser and connect to that url or its ip address instead of the 127.0.0.1 it prompts me with a userid/password box as Node Red is attempting to authenticate. I am using Node Red v1.2.9 which does require authentication. If I enter the correct credentials, Node Red service responds with "Cannot get /homeseer/webhook".

    HS4 is currently set to not require authentication

    Has anyone used to latest Node Red 1.2.9 or later to interact with HomeSeer?

    Thank you.
    HomeSeer 2, HomeSeer 3, Allonis myServer, Amazon Alexa Dots, ELK M1G, ISY 994i, HomeKit, BlueIris, and 6 "4k" Cameras using NVR, and integration between all of these systems. Home Automation since 1980.

    #2
    Changed the webhook url to the actual ip address. Restarted HomeSeer. Now I get the following error when changing a device state in HomeSeer:

    12:57:28:7363:[3]->Posting to webhook failed: The remote server returned an error: (500) Internal Server Error. URL: http://10.1.2.9:1880/homeseer/webhook


    Anyone else run into this?
    HomeSeer 2, HomeSeer 3, Allonis myServer, Amazon Alexa Dots, ELK M1G, ISY 994i, HomeKit, BlueIris, and 6 "4k" Cameras using NVR, and integration between all of these systems. Home Automation since 1980.

    Comment


      #3
      Originally posted by Krumpy View Post
      I am using Node Red v1.2.9 which does require authentication.
      Their docs still say that by default Node-red does NOT require authentication: https://nodered.org/docs/user-guide/...uring-node-red
      I haven't tested 1.2.9 but if some authentication is needed for homeseer to post updates to node-red through the webhook, then it won't work because homeseer does not send any user/password.
      So, if I were you I would try to disable any authentication in the node-red settings and see if that solves your problem.

      Comment


        #4
        Confirming that 10.1.2.9 is the address of system running Node Red, meaning if you browse to 10.1.2.9:1880 you are seeing teh Node Red dashboard where you can edit flows, correct? The webhook uses the same IP as the Node Red dashboard.
        Karl S
        HS4Pro on Windows 10
        1070 Devices
        56 Z-Wave Nodes
        104 Events
        HSTouch Clients: 3 Android, 1 iOS
        Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

        Comment


          #5
          Thanks for both of you to respond.

          ksum - Yes, I can confirm that it is the correct address. If I go to 10.1.2.9:1880 node red comes up.



          Spud - I can also confirm that a default installation (performed by Home Assistant) does require authentication. But keep in mind that when I enter the user id and password of Node Red, then it comes back with "Cannot GET /homeseer/webhook". Shouldn't that be a valid resource?

          I will attempt to disable authentication. That will work for me for now, but in the future I would suggest a methodology of passing credentials securely.
          HomeSeer 2, HomeSeer 3, Allonis myServer, Amazon Alexa Dots, ELK M1G, ISY 994i, HomeKit, BlueIris, and 6 "4k" Cameras using NVR, and integration between all of these systems. Home Automation since 1980.

          Comment


            #6
            Disabled authentication and for whatever reason, HomeSeer still gets http error 500 when attempting to post back to the webhook. Interesting. I have disabled the node red installation implemented by Home Assistant and will install a Node Red instance per the RPI installation rather than the docker container. Let's see what it does.
            HomeSeer 2, HomeSeer 3, Allonis myServer, Amazon Alexa Dots, ELK M1G, ISY 994i, HomeKit, BlueIris, and 6 "4k" Cameras using NVR, and integration between all of these systems. Home Automation since 1980.

            Comment


              #7
              Ok, via a regular RPI based Node Red installation this seems to work. Originally I had Home Assistant perform the Node Red installation. So, somehow there is a difference between the installation mechanisms. Ok, for now. It would be nice if HS supported passing credentials via the webhook to authenticate to Node Red at some point soon. Not sure how difficult this request is, but seems proper in today's world.

              I set up a basic flow where the output gets displayed to a debug node. When I change the state of a HS device, Node Red displays the output which works. But, for some reason the debug window shows three outputs. Seems odd, right? I mean, I only changed the state of the HS device once. Any ideas? Anyone seen this?

              Output in debug when HS device is turned off:

              3/16/2021, 6:11:18 PMnode: b995c05.2a9364msg.payload : Object
              { ref: 4, name: "Control", location: "Kitchen", location2: "Main Floor", value: 0 … }
              3/16/2021, 6:11:19 PMnode: b995c05.2a9364msg.payload : Object
              { ref: 4, name: "Control", location: "Kitchen", location2: "Main Floor", value: 0 … }
              3/16/2021, 6:11:20 PMnode: b995c05.2a9364msg.payload : Object
              { ref: 4, name: "Control", location: "Kitchen", location2: "Main Floor", value: 0 … }


              Output in debug a second time when HS device is turned on:

              3/16/2021, 6:18:22 PMnode: b995c05.2a9364msg.payload : Object
              { ref: 4, name: "Control", location: "Kitchen", location2: "Main Floor", value: 100 … }
              3/16/2021, 6:18:23 PMnode: b995c05.2a9364msg.payload : Object
              { ref: 4, name: "Control", location: "Kitchen", location2: "Main Floor", value: 100 … }
              3/16/2021, 6:18:23 PMnode: b995c05.2a9364msg.payload : Object
              { ref: 4, name: "Control", location: "Kitchen", location2: "Main Floor", value: 100 … }

              So the webhook works. No more http error in the HS log when HS is performing the post to the webhook. That's good. But, why does it do three logs to the debug?

              Curious.... I appreciate the help.
              HomeSeer 2, HomeSeer 3, Allonis myServer, Amazon Alexa Dots, ELK M1G, ISY 994i, HomeKit, BlueIris, and 6 "4k" Cameras using NVR, and integration between all of these systems. Home Automation since 1980.

              Comment


                #8
                Try this :

                Click image for larger version

Name:	Settings.png
Views:	355
Size:	79.6 KB
ID:	1463554



                Eman.
                TinkerLand : Life's Choices,"No One Size Fits All"

                Comment


                  #9
                  I’m so glad I found this thread because I’ve been trying to do exactly the same thing (Node-Red on a Pi, installed from within HA) and not being able to get the HS4 web hook working. I’ve been pulling whats left of my hair out.
                  So, is the conclusion that Node-Red must be installed on the same machine as Homeseer or at least not installed from within Home Assistant?

                  Comment


                    #10
                    Originally posted by Jez View Post
                    I’m so glad I found this thread because I’ve been trying to do exactly the same thing (Node-Red on a Pi, installed from within HA) and not being able to get the HS4 web hook working. I’ve been pulling whats left of my hair out.
                    So, is the conclusion that Node-Red must be installed on the same machine as Homeseer or at least not installed from within Home Assistant?
                    Can be anywhere and meeting all other conditions including my settings in post #8 because password authentication is not working at the moment.


                    Eman.
                    TinkerLand : Life's Choices,"No One Size Fits All"

                    Comment


                      #11
                      Look for information in this forum about connecting to node red which is installed in docker. That could resolve the issue.

                      If you also want to connect Home Assistant to the same Node Red instance expect difficulties connecting to a version not installed in the HAss operating system.
                      Karl S
                      HS4Pro on Windows 10
                      1070 Devices
                      56 Z-Wave Nodes
                      104 Events
                      HSTouch Clients: 3 Android, 1 iOS
                      Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

                      Comment


                        #12
                        Gentlemen:

                        There are two situations where password authentication could come in:

                        1.) Node Red to HomeSeer. Yes, for now disable password authentication in HomeSeer.

                        2.) HomeSeer to Node Red via web hook. While I agree that if one installs Node Red via the RPI installation Node Red authentication doesn’t require a password, if one installs Node Red via Home Assistant, then password authentication IS required. Yes, one can then disable it, but the web hook still didn’t work in my test environment.

                        Long story short. HomeSeer Technologies should update their implementation to support authentication. Without it, it really is just a proof of concept rather than a real viable solution. Don’t get me wrong, I appreciate the proof of concept, but it certainly is not something that I would put into a professional installation! It is fine for DYI when you can assume the associating risks yourself.

                        People need to wake up that all of this wonderful home automation stuff could allow said bad actors to do harm. One of the worst things someone could do is shut off your heat in the winter when you’re not home when it is cold outside.
                        HomeSeer 2, HomeSeer 3, Allonis myServer, Amazon Alexa Dots, ELK M1G, ISY 994i, HomeKit, BlueIris, and 6 "4k" Cameras using NVR, and integration between all of these systems. Home Automation since 1980.

                        Comment


                          #13
                          Originally posted by Krumpy View Post
                          Gentlemen:

                          There are two situations where password authentication could come in:

                          1.) Node Red to HomeSeer. Yes, for now disable password authentication in HomeSeer.

                          2.) HomeSeer to Node Red via web hook. While I agree that if one installs Node Red via the RPI installation Node Red authentication doesn’t require a password, if one installs Node Red via Home Assistant, then password authentication IS required. Yes, one can then disable it, but the web hook still didn’t work in my test environment.

                          Long story short. HomeSeer Technologies should update their implementation to support authentication. Without it, it really is just a proof of concept rather than a real viable solution. Don’t get me wrong, I appreciate the proof of concept, but it certainly is not something that I would put into a professional installation! It is fine for DYI when you can assume the associating risks yourself.

                          People need to wake up that all of this wonderful home automation stuff could allow said bad actors to do harm. One of the worst things someone could do is shut off your heat in the winter when you’re not home when it is cold outside.
                          Thanks for that. I agree.

                          My conclusions are the same because:
                          1. I first installed Node-Red via Home Assistant on a Pi. The Homeseer webhook wouldn't work.
                          2. I installed Node-Red on a PC (not the same PC as Homeseer. Home Assistant is on a Pi) The Homeseer webhook worked. Yay.
                          3. I installed Node-Red on the same PC as Homeseer - again the Homeseer webhook worked.

                          Comment


                            #14
                            I would not look at any home assistant install of node red as something to compare anything to. I installed home assistant on a Raspberry Pi, next to other programs, without installing it in their OS and cannot connect it to node red which I had already installed on a different RPi. Home assistant does something wanting everything to work inside the OS it creates. It is known to be difficult to connect to an alternative installation (not installed by HAss) of node red. So expect other programs connecting into it to be difficult as well MAYBE look at instructions for connecting to node red running in docker but that may not work either.
                            Karl S
                            HS4Pro on Windows 10
                            1070 Devices
                            56 Z-Wave Nodes
                            104 Events
                            HSTouch Clients: 3 Android, 1 iOS
                            Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

                            Comment

                            Working...
                            X