Announcement

Collapse
No announcement yet.

Troubleshooting webhook issues

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

    Troubleshooting webhook issues

    So, I have failed to realize that my webhook updates are not being registered in node-red for 2 years. I started using sync nodes at the beginning and never realized something was broken.

    Fast forward to a week ago and found it's broken.

    I have two HS4 servers connected via VPN and all work well. The remote webhook works and the local one does not. Really weird.

    To be clear, if I update a device on the remote HS4 web interface, the associated node in node red will update the status for the remote device but the same behavior does not work on the local HS4 instance..

    I did a packet capture on the node red (local HS4) device and am receiving packets from both the localhost address and the remote address.

    Can anyone suggest any other troubleshooting paths? I'm out of ideas.

    Thanks,

    Devan

    #2
    Here are the packets received by the device running node red and the local HS4 instance:


    Local (not working)
    Code:
    root@smarthome-hub:/home/devan# tcpdump -c 1 -i lo -XX port 1880
    tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
    listening on lo, link-type EN10MB (Ethernet), snapshot length 262144 bytes
    09:10:50.018854 IP localhost.33316 > localhost.1880: Flags [P.], seq 3174237898:3174238030, ack 2368707846, win 11254, options [nop,nop,TS val 2945587028 ecr 2945586312], length 132
    0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
    0x0010: 00b8 87ff 0000 4006 f43e 7f00 0001 7f00 ......@..>......
    0x0020: 0001 8224 0758 bd33 06ca 8d2f 9d06 8018 ...$.X.3.../....
    0x0030: 2bf6 feac 0000 0101 080a af92 1754 af92 +............T..
    0x0040: 1488 504f 5354 202f 686f 6d65 7365 6572 ..POST./homeseer
    0x0050: 2f77 6562 686f 6f6b 2048 5454 502f 312e /webhook.HTTP/1.
    0x0060: 310d 0a43 6f6e 7465 6e74 2d54 7970 653a 1..Content-Type:
    0x0070: 2061 7070 6c69 6361 7469 6f6e 2f6a 736f .application/jso
    0x0080: 6e0d 0a43 6f6e 7465 6e74 2d4c 656e 6774 n..Content-Lengt
    0x0090: 683a 2032 3033 0d0a 4578 7065 6374 3a20 h:.203..Expect:.
    0x00a0: 3130 302d 636f 6e74 696e 7565 0d0a 486f 100-continue..Ho
    0x00b0: 7374 3a20 3132 372e 302e 302e 313a 3138 st:.127.0.0.1:18
    0x00c0: 3830 0d0a 0d0a 80....
    1 packet captured
    12 packets received by filter
    0 packets dropped by kernel
    Remote (working)
    Code:
    root@smarthome-hub:/home/devan# tcpdump -c 1 -i eth0 -XX port 1880
    tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
    listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
    09:11:02.015453 IP 172.20.101.4.54852 > smarthome-hub.1880: Flags [P.], seq 4015420927:4015421062, ack 604062430, win 2436, options [nop,nop,TS val 4070398544 ecr 3972907966], length 135
    0x0000: 8e6c 0733 2b84 90ec 771d 18ee 0800 4500 .l.3+...w.....E.
    0x0010: 00bb 4e40 0000 3f06 0bcc ac14 6504 ac14 ..N@..?.....e...
    0x0020: 6404 d644 0758 ef56 75ff 2401 42de 8018 d..D.X.Vu.$.B...
    0x0030: 0984 7a5d 0000 0101 080a f29d 5a50 eccd ..z]........ZP..
    0x0040: c3be 504f 5354 202f 686f 6d65 7365 6572 ..POST./homeseer
    0x0050: 2f77 6562 686f 6f6b 2048 5454 502f 312e /webhook.HTTP/1.
    0x0060: 310d 0a43 6f6e 7465 6e74 2d54 7970 653a 1..Content-Type:
    0x0070: 2061 7070 6c69 6361 7469 6f6e 2f6a 736f .application/jso
    0x0080: 6e0d 0a43 6f6e 7465 6e74 2d4c 656e 6774 n..Content-Lengt
    0x0090: 683a 2031 3839 0d0a 4578 7065 6374 3a20 h:.189..Expect:.
    0x00a0: 3130 302d 636f 6e74 696e 7565 0d0a 486f 100-continue..Ho
    0x00b0: 7374 3a20 3137 322e 3230 2e31 3030 2e34 st:.172.20.100.4
    0x00c0: 3a31 3838 300d 0a0d 0a :1880....
    
    ​

    Comment


      #3
      There is a known problem if you have 2 HS servers in Node Red, and one of them is running on the same machine as Node Red
      https://github.com/HomeSeer/node-red...server.js#L303
      Try to to configure your local HS server in Node Red as 127.0.0.1

      Comment


        #4
        Originally posted by spud View Post
        There is a known problem if you have 2 HS servers in Node Red, and one of them is running on the same machine as Node Red
        https://github.com/HomeSeer/node-red...server.js#L303
        Try to to configure your local HS server in Node Red as 127.0.0.1
        Thanks for the update. I was going crazy.

        The hs-server on node-red is currently configured as 127.0.0.1.

        If possible, the comments in the linked code should be added to the help section of the homeseer nodes in node-red. It could save some folks a lot of troubleshooting.

        I guess the only workaround is to separate the node red server. That's a pain for me.

        If you come up with any other work arounds or want me to test the multi-hs4 issues, let me know.

        Thanks,

        Devan

        Comment

        Working...
        X