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.
Post Reply
Timmiej93
Posts: 47
Joined: Saturday 26 December 2015 1:37
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by Timmiej93 » Wednesday 04 April 2018 20:14

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: 822
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
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 » Wednesday 04 April 2018 20:17

Very interesting reading stuff here... :D

https://www.domoticz.com/wiki/DzVents:_ ... _functions
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

Timmiej93
Posts: 47
Joined: Saturday 26 December 2015 1:37
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by Timmiej93 » Wednesday 04 April 2018 20:19

How on earth have I missed that after looking at that page so much...
Thank you, and my apologies!

poudenes
Posts: 515
Joined: Wednesday 08 March 2017 10: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 » Friday 06 April 2018 17:22

Since i understand this im rewrites my scripts and they seem so nice :) haha ...
RPi3 with OSMC - RPi3 with Domoticz - Dashticz - MiLight - Nanolead Aurora - KaKu - Logitech Hamony - Nest - RFLink

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest