Hi all,
I need to store a long string in a script Lua.
This string is very long because contains an array of objects.
I tryied to store this data in a user variable but the max lenght of this is 200 chars, and this is a lenght of only one object for me.
Exist a way to manage a very long string in Lua?
Furthermore I need to save this data in a script and to sue this information in another one.
Thanks.
How to manage a long string in Lua as persistence object?
Moderator: leecollings
-
dannybloe
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: How to manage a long string in Lua as persistence object?
Just use dzVents own persistent storage mechanism instead of using uservariables. See the docs for this.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
bigpea
- Posts: 91
- Joined: Thursday 11 August 2016 12:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: IT
- Contact:
Re: How to manage a long string in Lua as persistence object?
I have some problem with domoticz.data because if I set a value in this persistence object, it is available in the script in which I set it but not in other script.
-
dannybloe
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: How to manage a long string in Lua as persistence object?
That's a choice. Read the documentation about global persistent data. It is in the same chapter.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Who is online
Users browsing this forum: No registered users and 1 guest