#Snapshot of Cam every 5 min
1 messages · Page 1 of 1 (latest)
No need. You can turn automation entities on and off.
If you want to overcomplicate it, you could use an input boolean as automation condition or create a template switch.
Oh what
action: automation.turn_off
target:
entity_id: automation.demo_automation
data:
stop_actions: true
There are also automation.turn_on and automation.toggle actions.
And in the UI you can toggle them directly.
type: tile
entity: automation.demo_automation
features_position: bottom
vertical: false
I haven‘t had enough devices so far to make a meaningful automation
You asked about a way to turn an automation on and off. You can do that directly with a card in the UI (using the automation entities) or you use an action call (in another automation for example).
I‘m not sure if I have it
Where should I save the snapshot, I thought /var/tmp?
Should I add something in the triggers?
You would need a time pattern triggger with /5in the minutes field to trigger every 5 minutes.
Well... whenever the minutes are dividable by 5.
The last delay would be unnecessary.
Like this right?
Yes. But in this case it would create a snapshot whenever the minutes on the clock are dividable by 5. Not every 5 minutes after the automation has been started. Not sure if that is critical for you. And I would add a delay of a few seconds after the snapshot. Just to be sure the light doesn't turn off too early.
You are welcome. But please keep it in English. 
Alright, it seems to work now, it‘s not critical that its every minute divisible by 5. I‘ll try to add a run when it starts like that ig:
nah that just keeps triggering itself
Yes, it runs until it is turned off.
actuallyI wasnt finished
Everything works, except it doesnt work
Its not writing a file
Will have to look into the take snapshot funvtion
WHat is a good directory for this to write in, and as what user are the files written/or may it be an AppArmor thing /var/tmp has 777 directory permissions
It has to be accessible by the HA container and it has to be in the allowed list.
The path part of filename must be an entry in the allowlist_external_dirs in your homeassistant: section of your configuration.yaml file.
It doesn‘t work, idk why, I don‘t get any logs anymore, but I tried in /tmp /var/tmp and /media
If you choose the /tmp directory, it will be in the directory of the HA container, not the host OS, the Studio Code container or the SSH container. So you don't see it in the usual tools.
/mediashould work
Thats an important thing to know
I wasnt sure what u were talking about because I have Home Assistant OS in a VM
But
Also
Im an Idiot
I turned the psu off for the cam xD
only the /media dir is a shared directory?
HAOS is the host OS. It runs several containers, like HA. And addons like SSH/Terminal or Studio Code are additional containers. They seem to show the host OS, but that's just true for some selected resources.
Makes sense, thank you for the explanation
There are some more. Like /config, /addons, addon_configs, /ssland so on.
Shared directories can be accessed by other addons.
For a long time I thought to myself why aren‘t addons supported in container, because you can make containers in lxc I know but now all makes sense more or less, Its a whole nother shell around hassio core
Btw it works now yay
In some usecases, using /config/www is the better choice. Everything in that directory can be browsed directly via a http://homeassistant.local:8123/local/... address. However it is not password protected.
Ill prob use that dir if I make a status screen thingy or so
Bookmark made
You just need to keep in mind, that everythin in the www subdirectory is accessible to everyone knowing the URL - even from the internet, if you have remote access configured.
So you shouldn't use it for any sensitive information.
Yes
I have this laying around, you think I could see anything on it?https://docs.cirkitdesigner.com/component/796f63bc-b690-4fea-ba39-5ab41206a93d/tft-lcd-display-st7735s
Like as a status
Not with the HA host. It does not provide any UI.
The only display output it produces is a terminal.