robmarkcole / HASS-Deepstack-object

Home Assistant custom component for using Deepstack object detection
https://community.home-assistant.io/t/face-and-person-detection-with-deepstack-local-and-free/92041
MIT License
440 stars 98 forks source link

DATETIME_FORMAT causes issues with samba on Windows #123

Closed mynameisdaniel32 closed 4 years ago

mynameisdaniel32 commented 4 years ago

I updated to 3.1 last night and am finding that since then, all jpegs saved now have cryptic names instead of the timestamps. They are the correct/same boxes with the boxes. Examples below: image Before: image

robmarkcole commented 4 years ago

those might be temporary files? looks like you are on windows, and I do not have a windows machine to debug on I am afraid

unbornx commented 4 years ago

Happened to me. I'll explain what I did.

I access those files through windows smb share to my docker files. Those files are mangled files 8.3 from samba because the file contains colon, ex :deepstack_object_cam2_person_2020-05-18_07:12:37.jpg The actual file is ok in linux, but displayed strangely to windows. I activated mangled names=no to my smb.conf so it displays the file, but still can't acess it because windows does not allow colon in file names. I ended up modifying image_processing.py to dashes instead of colons, ex : DATETIMEFORMAT = "%Y-%m-%d%H-%M-%S" Now it works.

robmarkcole commented 4 years ago

Well glad you managed to get to the bottom of it. Im tempter to implement the DATETIME_FORMAT you suggest, although that will no doubt upset other people who have created automations etc. Will keep this open to take the temperature of how common this issue is

Justahobby01 commented 4 years ago

I would certainly welcome the change since samba is much easier to use than HA's file editor when trying to reference images.

robmarkcole commented 4 years ago

fixed in v3.2