openLuup log files - LuaUPnP.log and LuaUPnP_startup.log
-
@Donato said in openLuup log files - LuaUPnP.log and LuaUPnP_startup.log:
sometimes openluup restore the file user_data.json to the default
I've never seen that happen, and would like to understand the situation in which this occurs for you in more detail.
@Donato said in openLuup log files - LuaUPnP.log and LuaUPnP_startup.log:
I notice in the LuaUPnP_startup.log these msgs
When do you see this? After having restored the earlier file?
This message...
2024-07-18 07:46:19.774 openLuup.chdev:: ERROR: unable to read XML file I_ZWave.xml
...is of no consequence. It simply means you're missing the file. It shouldn't matter because openLuup never subsequently uses it.
However, these...
2024-07-18 07:46:19.801 openLuup.userdata:: loading user_data json... 2024-07-18 07:46:19.805 openLuup.userdata:: JSON decode error @[8173 of 8192, line: 176] unterminated string ' = luup.attr_set\n\n <<<HERE>>> -- Geographical loca'
...do indicate an error in your Lua Startup code, and points to the location of the error.
This is the line 176 of User_Data Json file :
"StartupCode":"\n-- You can personalise the installation by changing these attributes,\n-- which are persistent and may be removed from the Startup after a reload.\nlocal attr = luup.attr_set\n\n-- Geographical location\nattr ("City_description", "Rome")\nattr ("Country_description", "Italy")\nattr ("Region_description", "Lazio")\nattr ("latitude", "51.48")\nattr ("longitude", "0.0")\n\n-- other parameters\nattr ("TemperatureFormat", "C")\nattr ("PK_AccessPoint", "99000007")\nattr ("currency", "£")\nattr ("date_format", "dd/mm/yy")\nattr ("model", "Not a Vera")\nattr ("timeFormat", "24hr")\n\n-- Any other startup processing may be inserted here...\nluup.log "startup code completed"\n\n",
I modify these parameter through the console openluup app and these are the values :
-- You can personalise the installation by changing these attributes,
-- which are persistent and may be removed from the Startup after a reload.
local attr = luup.attr_set-- Geographical location
attr ("City_description", "Rome")
attr ("Country_description", "Italy")
attr ("Region_description", "Lazio")
attr ("latitude", "51.48")
attr ("longitude", "0.0")-- other parameters
attr ("TemperatureFormat", "C")
attr ("PK_AccessPoint", "99000007")
attr ("currency", "£")
attr ("date_format", "dd/mm/yy")
attr ("model", "Not a Vera")
attr ("timeFormat", "24hr")-- Any other startup processing may be inserted here...
luup.log "startup code completed"Is there any error ?
tnks
-
The code above before it is reformatted has ", at the very end:
Any other startup processing may be inserted here...\nluup.log "startup code completed"\n\n",
the 176 line above is inside the user_data file and every parameter is separated by "," . Following some lines around 176 :
"Region_description":"Lazio",
"ShutdownCode":"",
"StartupCode":"\n-- You can personalise the installation by changing these attributes,\n-- which are persistent and may be removed from the Startup after a reload.\nlocal attr = luup.attr_set\n\n-- Geographical location\nattr ("City_description", "Rome")\nattr ("Country_description", "Italy")\nattr ("Region_description", "Lazio")\nattr ("latitude", "51.48")\nattr ("longitude", "0.0")\n\n-- other parameters\nattr ("TemperatureFormat", "C")\nattr ("PK_AccessPoint", "99000007")\nattr ("currency", "£")\nattr ("date_format", "dd/mm/yy")\nattr ("model", "Not a Vera")\nattr ("timeFormat", "24hr")\n\n-- Any other startup processing may be inserted here...\nluup.log "startup code completed"\n\n",
"TemperatureFormat":"C",
"ThousandsSeparator":",", -
Yes, this is just part of a larger JSON structure.
You should not be editing the user_data file directly. What does the Startup Lua window actually show?
I am suspecting an invalid non-printable character somewhere. Can you just retype those few lines around the apparent error?
-
Yes, this is just part of a larger JSON structure.
You should not be editing the user_data file directly. What does the Startup Lua window actually show?
I am suspecting an invalid non-printable character somewhere. Can you just retype those few lines around the apparent error?
attached a copy of startup lua
and the few lines around the error :
"Mode":"1",
"ModeSetting":"1:DC*;2:DC*;3:DC*;4:DC*",
"PK_AccessPoint":"99000007",
"Region_description":"Lazio",
"ShutdownCode":"",
"StartupCode":"\n-- You can personalise the installation by changing these attributes,\n-- which are persistent and may be removed from the Startup after a reload.\nlocal attr = luup.attr_set\n\n-- Geographical location\nattr ("City_description", "Rome")\nattr ("Country_description", "Italy")\nattr ("Region_description", "Lazio")\nattr ("latitude", "51.48")\nattr ("longitude", "0.0")\n\n-- other parameters\nattr ("TemperatureFormat", "C")\nattr ("PK_AccessPoint", "99000007")\nattr ("currency", "£")\nattr ("date_format", "dd/mm/yy")\nattr ("model", "Not a Vera")\nattr ("timeFormat", "24hr")\n\n-- Any other startup processing may be inserted here...\nluup.log "startup code completed"\n\n",
"TemperatureFormat":"C",
"ThousandsSeparator":",",
"currency":"£",
"date_format":"dd/mm/yy", -
No, I think that the issue is the unquoted quotes.
Here’s an extract from what I get when printing out part of my user_data file…
attr (\"City_description\", \"Oxford\")\nattr (\"Country_description\"
Double quotes need to be preceded by \ when in JSON strings.
I still don’t understand how it got like this.
-
No, I think that the issue is the unquoted quotes.
Here’s an extract from what I get when printing out part of my user_data file…
attr (\"City_description\", \"Oxford\")\nattr (\"Country_description\"
Double quotes need to be preceded by \ when in JSON strings.
I still don’t understand how it got like this.
-
No, I think that the issue is the unquoted quotes.
Here’s an extract from what I get when printing out part of my user_data file…
attr (\"City_description\", \"Oxford\")\nattr (\"Country_description\"
Double quotes need to be preceded by \ when in JSON strings.
I still don’t understand how it got like this.
in my actual user_data file double quotes are preceded by \.
when I paste the file as text and submit the reply here the \ symbol is eliminated .
Following I paste as code :
"StartupCode":"\n-- You can personalise the installation by changing these attributes,\n-- which are persistent and may be removed from the Startup after a reload.\nlocal attr = luup.attr_set\n\n-- Geographical location\nattr (\"City_description\", \"Rome\")\nattr (\"Country_description\", \"Italy\")\nattr (\"Region_description\", \"Lazio\")\nattr (\"latitude\", \"51.48\")\nattr (\"longitude\", \"0.0\")\n\n-- other parameters\nattr (\"TemperatureFormat\", \"C\")\nattr (\"PK_AccessPoint\", \"99000007\")\nattr (\"currency\", \"£\")\nattr (\"date_format\", \"dd/mm/yy\")\nattr (\"model\", \"Not a Vera\")\nattr (\"timeFormat\", \"24hr\")\n\n-- Any other startup processing may be inserted here...\nluup.log \"startup code completed\"\n\n",
sorry for my error
-
Where do you paste it? In the user_data.json file? Why not just enter it into the Lua Startup editor?