# Fatigue Sensors

The fatigue sensor accessories are capable of capturing photos when a fatigue related event is caught.

The images that are saved automatically to the default directory can be uploaded via ftp using lftp (opens new window)

Check out our LFTP tutorial on the Bash/Shell scripting page for information on how to upload and sync photos with a remote server.

# Redis Interaction

# Fatigue sensor (ethernet interface)

Fatigue alert - distraction

"PUBLISH" "fatigue/notification/mdsm7" "{"system_epoch":1631639232,"event":"distraction","date":0,"lat":26.124800,"lon":-80.314201,"speed":78,"serial":"712009Y1EN0076","driver_name":"","file":{"type":"video","state":"ready","path":"/media/extmedia/video/events/1631639232-distraction/1631639232-distraction-mdsm7.mp4"}}"

# Fatigue sensor (serial/rs-232 interface)

Connection Status

To notify the connection status, the serial application publishes

"PUBLISH" "serial/notification/fatigue_s/state" "connected"

when connected, or

"PUBLISH" "serial/notification/fatigue_s/state" "disconnected"

when disconnected.

Fatigue Alarm

To notify a fatigue alarm, the serial application publishes

"PUBLISH" "serial/notification/fatigue_s/photo" "1615813683-fatigue_remind.jpeg"

"PUBLISH" "serial/notification/fatigue_s/photo" "1615813683-fatigue_alarm.jpeg"

"PUBLISH" "serial/notification/fatigue_s/photo" "1615813683-fatigue_warning.jpeg"

Driver Not Detected

To notify when a driver is not detected, the serial application publishes

"PUBLISH" "serial/notification/fatigue_s/photo" "1615813683-no_portrait.jpeg"

Driver Distracted

To notify when a driver is distracted, the serial application publishes

"PUBLISH" "serial/notification/fatigue_s/photo" "1615813683-distraction.jpeg"

Manual Photo Captured

To notify when a photo is taken with the captured command, the serial application publishes

"PUBLISH" "serial/notification/fatigue_s/photo" "1615813683-photo.jpeg"

# Tips

Take note of the amount of space occupied by the photos in the /data/users/syrus4g/fatigue_sensor folder.

Once your application has received a photo you may want to delete them based on the epoch

$ rm 16158136*

If you lower the buffer size it will delete the oldest photos over the new size limit.

Last Updated: 9/15/2021, 5:09:20 PM