I’ve added the HomeSeer nodes to a Node-RED instance running as an HA App and while I can control a device from NR, I can’t get any device nodes to update. My troubleshooting is telling me that the webhook defined in HS4 isn’t working or may not be accessible to NR.
Port 8123 is likely connecting to Home Assistant and not the Node-RED app. To connect to Node-RED, use port 1880 (or whatever you have configured in the app configuration).
In addition, you may need to change the webhook to be a subpath of /endpoint in order to access it without Home Assistant authentication. If that is troublesome, you can try using the Node-RED Plus app instead which does not restrict the path.
OK. After digging a little deeper, it looks like the HomeSeer server node in Node-RED expects to be accessed via httpAdminRoot (rather than httpNodeRoot). In effect that means you should remove the /endpoint from the URL, but it also means the webhook will require authentication. Maybe try something like this:
Make sure the <username> and <password> exactly match a Home Assistant user listed in Settings > People > Users. You could also create a user just for the webhook.
Also, if either field contains any special characters, you may need to %-encode them to be URL safe.
Hmm, I’m not sure what the problem might be. I was successfully able to POST to the webhook using authentication in a test setup. Maybe HomeSeer doesn’t support basic authentication for the webhook? I don’t have HomeSeer myself so I’m only testing the node-red-contrib-homeseer nodes.
You could perhaps try something like the following to work around the authentication requirement… create three nodes:
Method: POST
URL: http://localhost:1880/homeseer/webhook Use authentication
Type: basic authentication
Username: <username>
Password: <password>
Then you could use http://172.29.1.10:1880/endpoint/homeseer/webhook for the webhook. This would be routed through httpNodeRoot which doesn’t require authentication and be processed through the nodes above. The second node will forward the request back to Node-RED via httpAdminRoot with authentication.
EDIT: I unmarked this as solved since I’m getting timeouts under heavy load. It works fine with 2-3 updates per second but hangs with a timeout when a larger number of updates is received from HS4. I’ve moved back to using a standalone Node-RED instance for now.