Is it possible to have an 'external function' which can be used by multiple dzVents scripts?  [Solved]

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

Moderator: leecollings

Post Reply
Timmiej93
Posts: 64
Joined: Saturday 26 December 2015 0:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Is it possible to have an 'external function' which can be used by multiple dzVents scripts?

Post by Timmiej93 »

I have a bit of code which I use in multiple dzVents scripts, which I'd prefer to be a centralized instance, making maintenance easier and the other scripts clearer. Normally, I'd do this by putting this code in a new function that all other scripts can access. Is this possible in dzVents, or does all code have to be in the function that's executed by dzVents?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Is it possible to have an 'external function' which can be used by multiple dzVents scripts?

Post by waaren »

Very interesting reading stuff here... :D

https://www.domoticz.com/wiki/DzVents:_ ... _functions
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Timmiej93
Posts: 64
Joined: Saturday 26 December 2015 0:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Is it possible to have an 'external function' which can be used by multiple dzVents scripts?

Post by Timmiej93 »

How on earth have I missed that after looking at that page so much...
Thank you, and my apologies!
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: Is it possible to have an 'external function' which can be used by multiple dzVents scripts?  [Solved]

Post by poudenes »

Since i understand this im rewrites my scripts and they seem so nice :) haha ...
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest