Newbe question

Moderator: leecollings

Post Reply
BartSr
Posts: 395
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

Newbe question

Post by BartSr »

Hi!
just started understandng Lua scipts.
I took some from the web to study them.
Now I like to experiment with UserVariables.
But how create/store.
I read about json but don't understand that yet.
Any suggestion? URL with examples to study?
TIA
-Bart
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
jannl
Posts: 673
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Newbe question

Post by jannl »

Urls with json examples are in the Domoticz wiki. Propably exactly what you need
BartSr
Posts: 395
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

Re: Newbe question

Post by BartSr »

Thanks. Going to study the code.
KR
-Bart
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
niki_lauda
Posts: 118
Joined: Saturday 31 August 2013 14:48
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Eindhoven (NL)
Contact:

Re: Newbe question

Post by niki_lauda »

BartSr wrote: Sunday 05 November 2017 18:09 Thanks. Going to study the code.
KR
-Bart
Create a variable Counter

Use
a=tonumber(uservariables['Counter']) to extract a variable
Use
commandArray['Variable:Counter'] = tostring(Counter) to store a variable
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest