Announcement

Collapse
No announcement yet.

React to device changes

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

    #31
    Ok I restarted HS and in the startup log I see:

    9/23/2021 4:48:26 PM HomeSeer~!~3~!~Posting to webhook failed: The remote server returned an error: (500) Internal Server Error. URL: http://192.168.1.126:1880/homeseer/webhook

    So I must have something not right in Node Red.

    Comment


      #32
      This is frustrating now the device does not update its status at all.

      Comment


        #33
        So, the first place I would look is firewalls. Are you running windows defender or norton 360 or some other firewall blocking web hooks? Also, make sure both computers are one the same subnet.

        Comment


          #34
          Yes the Home Assistant VM and HS machine are on the same subnet. The Windows firewall is letting HS4 through. I changed the URL in the HS configuration to the webhook URL for Home Assistant (http://192.168.1.126:8123/api/webhook/some_hook_id) and the HS startup error is gone. I am going to remove HS nodes and try again.

          Comment


            #35
            Originally posted by pmendiuk View Post
            Yes the Home Assistant VM and HS machine are on the same subnet. The Windows firewall is letting HS4 through. I changed the URL in the HS configuration to the webhook URL for Home Assistant (http://192.168.1.126:8123/api/webhook/some_hook_id) and the HS startup error is gone. I am going to remove HS nodes and try again.
            By default, I think the Node-Red instance that comes with Home assistant is configured to use a User/Password. HomeSeer webhook implementation does not support that yet, so you have to disable the user/password authentication in Node Red.
            And of course put back the right webhook in HS: http://192.168.1.126:1880/homeseer/webhook

            Comment


              #36
              That seems to make sense. Here is the repeating error in the Node-Red log:

              2021/09/24 10:03:41 [error] 507#507: *3182830 auth request unexpected status: 500 while sending to client, client: 192.168.1.12, server: a0d7b954-nodered, request: "POST /homeseer/webhook HTTP/1.1", host: "192.168.1.126:1880"

              I think I have set Node-Red with no user/password:

              credential_secret: XXXXXXXX
              theme: default
              http_node:
              username: ''
              password: ''
              http_static:
              username: ''
              password: ''
              ssl: false
              certfile: fullchain.pem
              keyfile: privkey.pem
              system_packages: []
              npm_packages: []
              init_commands: []

              Is there another Node-Red configuration setting that I'm missing?

              Comment


                #37
                Originally posted by pmendiuk View Post
                That seems to make sense. Here is the repeating error in the Node-Red log:

                2021/09/24 10:03:41 [error] 507#507: *3182830 auth request unexpected status: 500 while sending to client, client: 192.168.1.12, server: a0d7b954-nodered, request: "POST /homeseer/webhook HTTP/1.1", host: "192.168.1.126:1880"

                I think I have set Node-Red with no user/password:

                credential_secret: XXXXXXXX
                theme: default
                http_node:
                username: ''
                password: ''
                http_static:
                username: ''
                password: ''
                ssl: false
                certfile: fullchain.pem
                keyfile: privkey.pem
                system_packages: []
                npm_packages: []
                init_commands: []

                Is there another Node-Red configuration setting that I'm missing?
                I'm not sure but I think it is httpNodeAuth in setting.js file:
                https://nodered.org/docs/user-guide/...-node-security

                Comment


                  #38
                  This is what I found in settings.js

                  Code:
                  /**
                   * PLEASE NOTE! IMPORTANT! READ!
                   *
                   * This is a modified version of the settings file. Some parts of the
                   * settings are actually controlled by the Home Assistant add-on.
                   *
                   * Parts that are handled by it, are removed from this settings template.
                   * The following configuration keys are controlled by the add-on and removed.
                   *
                   * - uiPort (port setting in the add-on log)
                   * - uiHost (no need to manually configure this in the add-on)
                   * - debugUseColors (disabled, won't work in the add-on)
                   * - flowFile (fixed to flows.json)
                   * - credentialSecret (credentials_secret in the add-on configuration)
                   * - userDir (is set fixed to `/config/node-red`)
                   * - nodesDir (is set fixed to `/config/node-red/nodes`)
                   * - adminAuth (known as users in the add-on configuration)
                   * - https (ssl settings in the add-on configuration)
                   * - logging.console.level (log_level in the add-on configuration)
                   * - httpNodeAuth (http_node settings in the add-on configuration)
                   * - httpStaticAuth (http_static settings in the add-on configuration)
                   * - httpNodeRoot (set fixed to `/endpoint` )
                   *
                   * If you like to change those settings, some are available via the add-on
                   * settings/option in the Supervisor panel in Home Assistant.
                   */
                  So it seems to be set correctly according to this.

                  Comment


                    #39
                    spud I got it working.

                    I tried the node in a standalone Node-Red instance and everything was working fine with devices and events. I went back to the Home Assistant add-on and the Node-Red log was full of these errors:

                    2021/09/24 15:22:03 [error] 507#507: *4958548 auth request unexpected status: 500 while sending to client, client: 192.168.1.12, server: aXX7b954-nodered, request: "POST /homeseer/webhook HTTP/1.1", host: "192.168.1.126:1880"

                    The Home Assistant Node-Red add-on documentation states:

                    Note: In order to use the http_node you will need to expose Node-RED using a network port in addition to ingress. The HTTP nodes will also be presented under /endpoint/ as shown in the UI. If using the node-red-dashboard module this will also be hosted under this path and will use any credentials set here.

                    I modified hs-server.js line 294:

                    Code:
                    RED.httpAdmin.post('/homeseer/webhook', function (req, res) {
                    to
                    Code:
                    RED.httpAdmin.post('/endpoint/homeseer/webhook', function (req, res) {
                    Everything is working fine with the HomeSeer nodes in the Home Assistant Node-Red add-on.

                    Comment


                      #40
                      Glad you got it to work but I don't understand what the problem was nor what you did to fix it, please post a link to the documentation you are referring to.

                      Comment


                        #41
                        https://github.com/hassio-addons/add...de-red/DOCS.md

                        Comment

                        Working...
                        X