Execute bash from Blocky
Posted: Sunday 20 December 2015 21:46
Hi,
TL;DR
I've created several LUA scripts which execute bash scripts on their turn.
It works pretty nice, but I can't add a 'wait' or 'sleep' in it without Domoticz complaining about it.
Blocky allows '<action> after <seconds>' which would solve my issue.
However, I can't seem to find how to start a bash script from Blocky events.
Full
I use bash scripts to make snapshots from my stream-only webcam with ffmpeg, and curl for posting the created snapshot via my Telegram bot to me.
My phone presence script runs as a script_device AND as script_time in the hope it would detect my presence soon enough.
However, it happens quite regular that my presence is detected when I'm 20 to 40 seconds in my house.
This would trigger an 'alarm' (being the snapshot and TG message) since my phone sets the security panel to disarm.
TL;DR
I've created several LUA scripts which execute bash scripts on their turn.
It works pretty nice, but I can't add a 'wait' or 'sleep' in it without Domoticz complaining about it.
I need the sleep for timing issues I can't seem to fix.2015-12-20 21:37:06.709 Error: EventSystem: Warning!, lua script /home/pi/domoticz/scripts/lua/script_device_TG_on_Alarm-Door.lua has been running for more than 10 seconds
Blocky allows '<action> after <seconds>' which would solve my issue.
However, I can't seem to find how to start a bash script from Blocky events.
Full
I use bash scripts to make snapshots from my stream-only webcam with ffmpeg, and curl for posting the created snapshot via my Telegram bot to me.
My phone presence script runs as a script_device AND as script_time in the hope it would detect my presence soon enough.
However, it happens quite regular that my presence is detected when I'm 20 to 40 seconds in my house.
This would trigger an 'alarm' (being the snapshot and TG message) since my phone sets the security panel to disarm.