Hi,
First I want to thank the developper for the effort put in dzVents, it's a pleasure to script with.
I have a quite time consuming powershell script I want to call many times. I'm afraid doing this synchronously won't be great for the whole domoticz system.
What I'm willing to do is, on alarm system trigger, grab the jpg image from my camera and send it on my telegram notification discussion. I want to do this multiple times in a row, every few seconds for a couple of minutes.
I already have the script thats get the image and send it. The 2 http requests are done with powershell because it's very convenient to make mutipart/form-data request with it on Windows.
How can I make this ?
Regards
Calling function asynchronously (not openURL)
Moderator: leecollings
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Calling function asynchronously (not openURL)
Did you already managed to call the powershell script with os.execute ? If so I would be interested to find out if you can also call it as a background script using the powershell Start-Job command.
Once you got that to work, it will be relatively easy to have dzVents trigger this command repeatedly, without blocking the entire domoticz eventSystem.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: Calling function asynchronously (not openURL)
Hi,
I already executed powershell scripts. All that was missing is executing it a non blocking fashion.
I did not think about making the async call in the powershell part
, I was trying to do this in the lua code.
Start-Job did the trick perfectly => Thank you !
I already executed powershell scripts. All that was missing is executing it a non blocking fashion.
I did not think about making the async call in the powershell part

Start-Job did the trick perfectly => Thank you !
Who is online
Users browsing this forum: No registered users and 1 guest