HOWTO get the value of the Domoticz URL?  [Solved]

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

Moderator: leecollings

Post Reply
dlube
Posts: 29
Joined: Tuesday 31 March 2020 19:29
Target OS: -
Domoticz version:
Location: France

HOWTO get the value of the Domoticz URL?

Post by dlube »

Hi
If I follow the DzVent manual I should use the following

Code: Select all

print('Domoticz url '..domoticz.settings.url)
This code produce the error below

Code: Select all

dzVents: Error: (3.0.2) Test: An error occurred when calling event handler Test
dzVents: Error: (3.0.2) Test: ...e/pi/domoticz/scripts/dzVents/generated_scripts/Test.lua:20: attempt to concatenate a nil value (field 'url')
The dump of the table domoticz.settings:

Code: Select all

serverPort: 8080
dzVentsVersion: 3.0.2
Log level: 2
location:
name: Blagnac France
longitude: 1.387347
latitude: 43.630555
Domoticz url: http://127.0.0.1:8080
domoticzVersion: 2020.2
How to get the value of Domoticz url?
Raspbian Buster on Raspberry pi 3 B+ Domoticz Version: 2023.2 (build 15474)
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: HOWTO get the value of the Domoticz URL?  [Solved]

Post by waaren »

dlube wrote: Friday 08 May 2020 12:05 How to get the value of Domoticz url?
Thx for reporting !
Is indeed a bug and will be solved in next beta. Please use

Code: Select all

print('Domoticz url '..domoticz.settings['Domoticz url'])
until fixed.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dlube
Posts: 29
Joined: Tuesday 31 March 2020 19:29
Target OS: -
Domoticz version:
Location: France

Re: HOWTO get the value of the Domoticz URL?

Post by dlube »

Tank you
Raspbian Buster on Raspberry pi 3 B+ Domoticz Version: 2023.2 (build 15474)
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: HOWTO get the value of the Domoticz URL?

Post by waaren »

dlube wrote: Friday 08 May 2020 14:42Thank you
Fixed in V 2020.2 build 12018 (dzVents 3.0.5)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest