openLuup log files - LuaUPnP.log and LuaUPnP_startup.log
-
@Buxton said in openLuup log files - LuaUPnP.log and LuaUPnP_startup.log:
The first is a horizontal scroll bar for the running log as I have numerous log entries that extend well past the right hand side of the screen
Actually, I hate web pages which scroll sideways. Would wrapping the text help? In fact, also, many log entries are truncated as a matter of course. What’s producing long lines?
@Buxton said in openLuup log files - LuaUPnP.log and LuaUPnP_startup.log:
The second is a startup configuration option specifying the number of log pages to save before deleting the oldest and rolling over
There is one, but noting the discussion here, there is currently a bug in implementation... I must fix it!
https://smarthome.community/topic/173/logging-and-rotation?_=1596321655453
-
Prefer scroll much more than wrap.
-
Mainly Reactor Sensor entries but many devices, including openLuup, will occasionally wander off the page:
<code>2020-08-02 16:07:08.608 openLuup.server:: GET /data_request?id=variableget&DeviceNum=0&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&Variable=Mode&_=1596409627025 HTTP/1.1 tcp{client}: 0x564821cd4ce8
</code>Anything that allows the full display of the log line would help.
-
Hi akbooer,
sometimes openluup restore the file user_data.json to the default and I need to restore the configured one. I notice in the LuaUPnP_startup.log these msgs :
2024-07-18 07:46:19.585 :: openLuup STARTUP :: /etc/cmh-ludl 2024-07-18 07:46:19.586 openLuup.init:: version 2022.11.28 @akbooer 2024-07-18 07:46:19.595 openLuup.scheduler:: version 2021.03.19 @akbooer 2024-07-18 07:46:19.723 openLuup.io:: version 2021.03.27 @akbooer 2024-07-18 07:46:19.723 openLuup.mqtt:: version 2022.12.16 @akbooer 2024-07-18 07:46:19.727 openLuup.wsapi:: version 2023.02.10 @akbooer 2024-07-18 07:46:19.727 openLuup.servlet:: version 2021.04.30 @akbooer 2024-07-18 07:46:19.727 openLuup.client:: version 2019.10.14 @akbooer 2024-07-18 07:46:19.729 openLuup.server:: version 2022.08.14 @akbooer 2024-07-18 07:46:19.737 openLuup.scenes:: version 2023.03.03 @akbooer 2024-07-18 07:46:19.750 openLuup.chdev:: version 2022.11.05 @akbooer 2024-07-18 07:46:19.750 openLuup.userdata:: version 2021.04.30 @akbooer 2024-07-18 07:46:19.751 openLuup.requests:: version 2021.02.20 @akbooer 2024-07-18 07:46:19.751 openLuup.gateway:: version 2021.05.08 @akbooer 2024-07-18 07:46:19.757 openLuup.smtp:: version 2018.04.12 @akbooer 2024-07-18 07:46:19.764 openLuup.historian:: version 2022.12.20 @akbooer 2024-07-18 07:46:19.764 openLuup.luup:: version 2023.01.06 @akbooer 2024-07-18 07:46:19.767 openLuup.pop3:: version 2018.04.23 @akbooer 2024-07-18 07:46:19.768 openLuup.compression:: version 2016.06.30 @akbooer 2024-07-18 07:46:19.768 openLuup.timers:: version 2021.05.23 @akbooer 2024-07-18 07:46:19.769 openLuup.logs:: version 2018.03.25 @akbooer 2024-07-18 07:46:19.769 openLuup.json:: version 2021.05.01 @akbooer 2024-07-18 07:46:19.774 luup.create_device:: [1] D_ZWaveNetwork.xml / / () 2024-07-18 07:46:19.774 openLuup.chdev:: ERROR: unable to read XML file I_ZWave.xml 2024-07-18 07:46:19.800 luup.create_device:: [2] D_openLuup.xml / I_openLuup.xml / D_openLuup.json (openLuup) 2024-07-18 07:46:19.800 openLuup.init:: loading configuration user_data.json 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' 2024-07-18 07:46:19.805 openLuup.userdata:: ...user_data loading completed 2024-07-18 07:46:19.805 openLuup.init:: running _openLuup_STARTUP_ 2024-07-18 07:46:19.805 luup_log:0: startup code completed 2024-07-18 07:46:19.806 openLuup.init:: init phase completed 2024-07-18 07:46:19.806 :: openLuup LOG ROTATION :: (runtime 0.0 days)
Is this a my error in some configuration files ?
tnks
-
@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?
-
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", -
Try getting the json and checking it here. Also may be a decoding problem for the currency symbol. Try changing the currency to one simple character. The a-circumflex symbol before the pound symbol looks odd. UTF-8 versus ISO-8859-1 ?
-
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.
-
Donatoreplied to akbooer on Jul 21, 2024, 10:05 AM last edited by akbooer Jul 21, 2024, 10:18 AM
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?