If I would like to use a module in my dzVents script using "require" I can not just create a file mymodule.lua and place it in the dzVents script folder because dzVents will try to load all lua files assuming they are ordinary dzVents scripts.
I can solve that by choosing to place my module in a different folder and change the package.path etc etc but it can be quite difficult if I want my script to run on all platforms.
Would it be possible to reserve a name space (E.g. my_*) for lua scripts in the dzVents script folder that will be excluded from being loaded by dzVents?
Cheers!
Using modules in dzVents
Moderator: leecollings
-
dannybloe
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: Using modules in dzVents
Better have another designated folder as a sibling to dzvents/scripts maybe.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
dannybloe
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: Using modules in dzVents
Better have another designated folder as a sibling to dzvents/scripts maybe.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
Doler
- Posts: 163
- Joined: Friday 31 July 2015 21:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Sint-Oedenrode, Netherlands
- Contact:
Re: Using modules in dzVents
I just use ...dzVents/scripts/modules for this.
Mark: Domoticz latest Beta on Virtual machine (Proxmox) running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (latest, docker) via python plugin - Zwave-js-ui (latest, docker) - dzVents - Nodered
-
dannybloe
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: Using modules in dzVents
I'll add the modules subfolder then to the package paths.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
Doler
- Posts: 163
- Joined: Friday 31 July 2015 21:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Sint-Oedenrode, Netherlands
- Contact:
Re: Using modules in dzVents
Great!
Mark: Domoticz latest Beta on Virtual machine (Proxmox) running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (latest, docker) via python plugin - Zwave-js-ui (latest, docker) - dzVents - Nodered
-
roblom
- Posts: 408
- Joined: Wednesday 26 February 2014 15:28
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: the Netherlands
- Contact:
Re: Using modules in dzVents
Maybe a stupid question, but what is a module?
Who is online
Users browsing this forum: No registered users and 1 guest