How To Access Older Log

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
hendryman
Posts: 4
Joined: Sunday 22 October 2017 16:20
Target OS: Raspberry Pi
Domoticz version:
Contact:

How To Access Older Log

Post by hendryman » Friday 06 July 2018 9:54

I realised at 9am that a switch turned off at 4am (i can see 4am in the energy log of the switch). However, I can't access the text log in the domoticz web interface for that time, it only shows me 8am and later. I've searched here on the forums, on google etc, but no one could point me to the location of the logfile on the raspberry pi.

Questions:
#1 Is the logfile on the file system - and, if so: where?
#2 If the logfile is only in the database: how can a view the older entries?

User avatar
waaren
Posts: 701
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: How To Access Older Log

Post by waaren » Friday 06 July 2018 10:40

hendryman wrote:
Friday 06 July 2018 9:54
I realised at 9am that a switch turned off at 4am (i can see 4am in the energy log of the switch). However, I can't access the text log in the domoticz web interface for that time, it only shows me 8am and later. I've searched here on the forums, on google etc, but no one could point me to the location of the logfile on the raspberry pi.

Questions:
#1 Is the logfile on the file system - and, if so: where?
#2 If the logfile is only in the database: how can a view the older entries?
The location of the logfile on the file system is defined in /etc/init.d/domoticz.sh

Code: Select all

cat  /etc/init.d/domoticz.sh | grep "\-log" 
will show you where it is on your system. (If not disabled by a # at the beginning of the line)
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

gordonb3
Posts: 114
Joined: Saturday 31 March 2018 22:24
Target OS: Linux
Domoticz version: Custom
Location: Delft, NL
Contact:

Re: How To Access Older Log

Post by gordonb3 » Friday 06 July 2018 10:59

Interestingly it appears that you may not have one. The log file needs to be specified on the command line and there is no default when you omit that.

hendryman
Posts: 4
Joined: Sunday 22 October 2017 16:20
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: How To Access Older Log

Post by hendryman » Friday 06 July 2018 15:33

i'm able to get the log path just like you said:

Code: Select all

pi@raspberrypi:~$ /etc/init.d/domoticz.sh | grep "\-log" 
#DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"
but i can't read the log because the file specified in the prefs does not exist:

Code: Select all

pi@raspberrypi:~$ cat /tmp/domoticz.txt
cat: /tmp/domoticz.txt: No such file or directory
very weird... how could i fix this?

User avatar
waaren
Posts: 701
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: How To Access Older Log

Post by waaren » Friday 06 July 2018 15:39

hendryman wrote:
Friday 06 July 2018 15:33
i'm able to get the log path just like you said:

Code: Select all

pi@raspberrypi:~$ /etc/init.d/domoticz.sh | grep "\-log" 
#DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"
but i can't read the log because the file specified in the prefs does not exist:

Code: Select all

pi@raspberrypi:~$ cat /tmp/domoticz.txt
cat: /tmp/domoticz.txt: No such file or directory
very weird... how could i fix this?
Remove the # at the start of that line and restart domoticz
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

hendryman
Posts: 4
Joined: Sunday 22 October 2017 16:20
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: How To Access Older Log

Post by hendryman » Friday 06 July 2018 16:42

obviously... <sigh> thanks a lot! it works now.

i ended up moving the hole thing over to syslog according to this instruction:
https://www.domoticz.com/wiki/Set_up_Domoticz_to_syslog

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests