I currently have a flow integrating camera motion and human detection to avoid false triggers from my cats . The goal is to integrate this with my current alarm system, and for that reason I need to have a sensor that is basically the condition of human detection (on when condition of human detection is met and off when condition not met) .
Since it’s not really a physical sensor I figured the best way to go about this would be to add a fake motion sensor in my config and then make node red trigger the on and off state of my entity depending on whether there was human detection or not .
I have seen one topic mention manual injection but have no idea how to work this out and which payload / nodes to use .
Hello,
Here is a partial example. You need to put the values you want in the two variable in the function node.
Thanks to HA the sensor will be automagically created.
GV
Thanks, didn’t get it working but it’s probably some other issue related to the API as the external Curl call also gets me a 401 even though I’m using a valid long lived token .
Are your nodered and HA using httpS ? In my example it is the case. So, if you are just using HTTP, don’t forget to change that.
Debugging with curl is an option too!!
GV
Yes for both ! Duckdns + Let’s Encrypt, still getting 401 error when I make the api call … Perhaps need to enable the API in my config in order for it to accept the calls !
AFAIK API is enabled, by default.
Error 401 is “unauthorized”. Are you 100% sure of your token and the way you use it?
It must be with the header “Authorization” and the value is “Bearer TheToken”…
GV