Open Dinth opened 5 years ago
Hi @Dinth
Have you solved?
I'm trying to make same thing but in my MQTT message I get %f instead of the filename.
This is my config
and this is my python file sala_file.py
mosquitto_pub -h MYIP -u username -P Password -t topic/Sala/file -m "%f"
Any suggestion?
Thanks
Hi. I think that you're doing it completely wrong.
Just insert "mosquitto_pub -h MYIP -u username -P Password -t topic/Sala/file -m "%f"" in your command field instead of sala_file.py and see if it works.
Thanks!
I'm getting with the correct folder
/share/motioneye/Camera5/2019-05-23/20-42-21.jpg
I'm using MotionEye as Home Assistant addon and this is the version
Is it the same you're using?
My media files are being saved to the following location: /media/CCTV/Back_garden_left/ I have set up "run a command" option when saving files to submit a message with file location to MQTT server:
mosquitto_pub -h 10.10.1.5 -p 1884 -u user -P pass -t cameras/Back_garden_left/motion_filename -m "%f"
But for some reason the server gets the folliwing message:/media/motioneye_10_10_1_6_cctv_cctv/Back_garden_left/2019-04-11/07-10-37.jpg
instead of:/media/CCTV/Back_garden_left/2019-04-11/07-10-37.jpg
So it seems that %f in "Run a command" replaces "CCTV" with "motioneye_10_10_1_6_cctv_cctv" on my system.