I have a Windows computer that runs my IP cameras. Besides simply recording a video when motion is detected, the software is able “run a program”.
I also have a Home Assistant setup running on separate hardware.
I would like is to turn on a light (already under Home Assistant control) when motion is detected. That is, run an app on the Windows machine that sends a message to the Home Assistant machine/web server.
Is this doable? If so, where do I start? (I have some programming skills, I just need to get started.)
Following up, this works exactly as hoped, but only after some fiddling about with quotes to account for Windows command line vagaries with quotes in batch files.
For anyone else trying to do this (or me, trying again a week from now when I’ve long since forgotten what I did today), I started with the example on the web page
I removed the \ character to turn it all into one line, updated the token in the Auth command of course and most importantly, changed the data portion (-d) to read
Note the double quotes and the replacement of a single quote with a double quote. Not doing so resulted in the webserver returning an error with the message “Invalid JSON”.