Auto-reconnect to USB Camera?

17 views
Skip to first unread message

David de Regt

unread,
May 18, 2024, 6:00:37 PMMay 18
to motioneye
I'm trying to use motioneye as an easy way to rebroadcast a Sionyx Nightwave, since their included software is horrible.  I can get it happily working with my RPi4 with MotionEye, but when I turn the camera off and later back on again, motion never seems to be able to reconnect to the device, and I have to manually remove/add the camera again (or restart motioneye) to get it to detect it.  I'm contemplating using my little golang watchdog to do horrible things with the motion process if I have to, but I'm out of ideas for what config options I can try to get motion/motioneye to auto-retry opening the /dev/video0 device to see if it's come back yet, every few seconds.  Am I missing something obvious here? :( 

StarbaseSSD

unread,
May 18, 2024, 6:08:01 PMMay 18
to motioneye
For 'intentional' turn off / turn on of either USB or IP cameras, I just do a "sudo systemctl restart motioneye".
I used to have intermittent issues with a USB dashcam, but never found a good way to 'watchdog' it, so ended adding a cron job to restart it every hour. If I were to write a watchdog, I'd look for the camera to 'disappear', and set a flag, then watch for it to re-appear, unset the flag, and restart motioneye.
Reply all
Reply to author
Forward
0 new messages