os.execute

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
manjh
Posts: 859
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

os.execute

Post by manjh »

In a dzVents script, I want to run a Raspberry OS command, something you would do with os.execute in a regular LUA script.
I tried to find the way to run this in dzVents, but....

This is very basic, and I'm sure it must be simple. And of course this must be described somewhere, and I overlooked it...
But can someone point me in the right direction?
Hans
User avatar
jvdz
Posts: 2446
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: os.execute

Post by jvdz »

Why not simply use os.execute() itself? dzventz is LUA. ;)
User avatar
boum
Posts: 136
Joined: Friday 18 January 2019 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: France
Contact:

Re: os.execute

Post by boum »

Recent version of dzVents have `domoticz.executeShellCommand`. Not sure if this is already in stable.
https://www.domoticz.com/wiki/DzVents:_ ... _execution
azonneveld
Posts: 179
Joined: Wednesday 02 October 2019 7:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: os.execute

Post by azonneveld »

Async execution is also possible with os.execute:

os.execute ('(COMMAND > /dev/null)&')
rpi4 - zigbee2mqtt - roborock - espeasy - rfxcom - homewizard p1 - otgw - homebridge - surveillance station - egardia - goodwe - open weather map - wol - BBQ detection - rsync backup
User avatar
waltervl
Posts: 6691
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: os.execute

Post by waltervl »

boum wrote: Friday 06 May 2022 10:20 Recent version of dzVents have `domoticz.executeShellCommand`. Not sure if this is already in stable.
https://www.domoticz.com/wiki/DzVents:_ ... _execution
It is in stable.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest