global_data

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

Moderator: leecollings

Post Reply
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

global_data

Post by poudenes »

Hi All,

Question, I want change 1 hardware device for my Milight bulbs. I have all my lights in global_data file to create nice names.
I want test the new hardware, so idea is to create a second global_data in dzVent Gui. Disable the current one and enable the second.

Only what I change there is the IDX for the bulbs. Then all scripts and everything will work.

When the new hardware is failing, I disable the global_data and enable the (current working) one again.

Will this work, or does Domoticz dzVent system will be in conflict, or problems because of 2 global_data files?
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: global_data

Post by waaren »

poudenes wrote: Monday 27 May 2019 18:47 Question, I want change 1 hardware device for my Milight bulbs. I have all my lights in global_data file to create nice names.
I want test the new hardware, so idea is to create a second global_data in dzVent Gui. Disable the current one and enable the second.
If you keep your current global_data.lua in the scripts directory dzVents will process it. A way to temporarily disable the current one is to rename it to global_data.disabled; with this extension, dzVents will not process it.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: global_data

Post by poudenes »

thanks. So if im right. I rename it on command line.

cp global_data.disabled global_data
change the IDX in global_data
when go wrong, delete running want and rename the disabled one back.
restart Domoticz
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: global_data

Post by waaren »

poudenes wrote: Monday 27 May 2019 19:25 thanks. So if im right. I rename it on command line.

cp global_data.disabled global_data
change the IDX in global_data
when go wrong, delete running want and rename the disabled one back.
restart Domoticz

Code: Select all

sudo cp <domoticz dir>/scripts/dzVents/scripts/global_data.lua  <domoticz dir>/scripts/dzVents/scripts/global_data.disabled
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: global_data

Post by poudenes »

disable global_data in webgui dzvent event system
then create new one

This will work. Did the test :)

My global_data is generated by event system
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: No registered users and 1 guest