Those trying to get the Foscam motion sensor to work with hassio, hassio’s docker image does not support the “P” option used in the grep command.
changing it to something like:
For those gooogling. My solution (rather than polling) was to set up a FTP server in HASSIO. Have snapshots on motion sent to the FTP server and than watch the FTP directory for file writes. I am using node red to do the automation and it is pretty quick (normally file write starts < 1 sec from motion. See to be vworking for me. Seems better to me than polling but each has its pros and cons
I have a cheapy Vstarcam which uses the same API/Commands and from the command line I can get it to return a “0” or a “1” if motion is detected but when creating a command line binary sensor it never updates… also the returned value from command line comes up in red text which I thought was odd… was wondering if anyone can tell if I’m missing something simple…
I got it to work with a rest binary_sensor I found in another post, just wanted to post it for anyone else looking in the future… thanks. (Would still appreciate if anyone knows why the command_line sensor didn’t work)
I’ll have to try again, I did set a scan interval but not until a time I had also changed the value template to be more like the “rest” one… so maybe the value template change broke it enough that the scan interval didn’t matter…
So I just tried the command line sensor again with the scan interval set to 3 seconds (same as current rest sensor) and the rest sensor shows motion and binary sensor shows nothing, no errors in log…