• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[8.1.4] log-level 6 but no detailed information
#1
Hello Everyone,

I have been using pilight for something like 3 years now.
I am using klik-aan-klik-uit receivers (dimmers and switches) and everything works great :)

When i was setting it all up i frequently used the logfiles to check if my rules were being parsed correctly and at the specified time from my config file. There were entries like: 12.15.00 parced rules licht_slaapkamer_uit.

Because everyting runs great i havent been using/checking the logs for quite some time after completing my configuration.
Recently i tweaked the rules a bit, so i wanted to check the logfile to see if they were being parsed at the correct time,
but the wasn't anything about rules being parsed in the logs. 

Since i can control all my devices from the web interface, and rules that "do stuff" at specified times work, i do know that pilight is working.

The only thing is about my rules i see now is when i have (re)started the pilight service:

Code:
root@domo:# tail /var/log/pilight.log
[Mar 27 06:11:38:308588] pilight-daemon: INFO: rule #18 leds_woonkamer_uit was parsed in 0.010011 seconds
[Mar 27 06:11:38:320479] pilight-daemon: INFO: rule #19 dimmers_voor_aan_half_uur_voor_zonsondergang was parsed in 0.011846 seconds
[Mar 27 06:11:38:332036] pilight-daemon: INFO: rule #20 leds_kasten_aan_15_min_voor_zonsondergang_als_niet_thuis was parsed in 0.011505 seconds
[Mar 27 06:11:38:339727] pilight-daemon: INFO: rule #21 tv_mode1 was parsed in 0.007646 seconds
[Mar 27 06:11:38:347358] pilight-daemon: INFO: rule #22 tv_mode2 was parsed in 0.007602 seconds
[Mar 27 06:11:38:355077] pilight-daemon: INFO: rule #23 tv_mode3 was parsed in 0.007695 seconds
[Mar 27 06:11:38:374603] pilight-daemon: INFO: rule #24 alles_uit was parsed in 0.019484 seconds
[Mar 27 06:11:38:380267] pilight-daemon: INFO: rule #25 kasten_aan was parsed in 0.005589 seconds
[Mar 27 06:11:38:395618] pilight-daemon: INFO: rule #26 scenario99 was parsed in 0.015323 seconds

There are no more log entries until i restart pilight.

I don't understand why i don't see entries like "parsed rule blah at ..." (i don't remember exactly what these lines looked like, its been a while) anymore.

This is the settings part from my config.json:

Code:
        "settings": {
                "log-level": 6,
                "pid-file": "/var/run/pilight.pid",
                "log-file": "/var/log/pilight.log",
                "webserver-enable": 1,
                "webserver-root": "/usr/local/share/pilight/webgui",
                "webserver-http-port": 5001,
                "webserver-cache": 1,
                "whitelist": "",
                "ntp-servers": [ "192.168.1.150" ],
                "gpio-platform": "raspberrypi3"
        },
        "hardware": {
                "433gpio": {
                        "sender": 0,
                        "receiver": 1
                }
        },
        "registry": {
                "webserver": {
                        "ssl": {
                                "certificate": {
                                        "location": "/etc/pilight/pilight.pem"
                                }
                        }
                },
                "pilight": {
                        "version": {
                                "current": "8.1.4"
                        }
                }
        }
        
        
I've changed the the "log-level" value to values ranging from 1 to 6, but i never see more information in the logs.
According to the pilight documentation (hxxps://manual.pilight.org/configuration/settings.html#log-level) level 6 is "information":

Quote:The log-level tells pilight what messages it should log into the log-file. The higher the log-level the more messages are logged into the log-file. The highest log-level is 6 and the lowest is 0. These log-levels correspond to the following log types:

0 = emergency, 1 = alert, 2 = critical, 3 = , 4 = warning, 5 = notification, 6 = information"

So why am i not seeing more information in the log anymore? Any ideas?

(I am running pilight 8.1.4 on a Raspberry PI3 with Raspbian linux and would be happy to provide more information if needed :)
 
Reply
#2
Thanks for reporting, i will look into it.
 
Reply
#3
Bug found and fixed in the latest nightly.
 
Reply
#4
Hi curlymo,

Thanks for your reply and pilight update!
I installed v8.1.4-nightly-54672bef, restarted pilight and monitored the pilight.log logfile.

It is showing more information now. I can see rules being executed again :)

pilight.log:

Quote:[ Mar 30 11:50:44:10182] pilight-daemon: INFO: version v8.1.4-nightly-54672bef
[Mar 30 11:50:44:118965] pilight-daemon: INFO: no pilight daemon found, daemonizing
[Mar 30 11:50:44:130281] pilight-daemon: INFO: daemon listening to port: 46109
[Mar 30 11:50:44:133835] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 42124
[Mar 30 11:50:44:141002] pilight-daemon: INFO: secured webserver started on port: 5002 (fd 17)
[Mar 30 11:50:44:141105] pilight-daemon: INFO: regular webserver started on port: 5001 (fd 18)
[Mar 30 11:50:44:249316] pilight-daemon: INFO: new client, ip: 192.168.1.155, port: 35742
[Mar 30 11:52:05:312493] pilight-daemon: ERROR: /usr/local/lib/pilight/hardware/433gpio.lua:27: bad argument #1 to 'pairs' (table expected, got nil)
[Mar 30 11:52:05:315481] pilight-daemon: INFO: executed rule: kasten_aan
[Mar 30 11:52:05:316391] pilight-daemon: ERROR: /usr/local/lib/pilight/hardware/433gpio.lua:27: bad argument #1 to 'pairs' (table expected, got nil)
[Mar 30 11:52:05:492271] pilight-daemon: ERROR: no free lua states available
[Mar 30 11:52:05:492327] pilight-daemon: ERROR: no free lua states available
[Mar 30 11:52:05:492511] pilight-daemon: ERROR: /usr/local/lib/pilight/hardware/433gpio.lua:24: bad argument #1 to 'setup' (string expected, got nil)
[Mar 30 11:52:05:510582] pilight-daemon: INFO: executed rule: kasten_aan
[Mar 30 11:52:05:511492] pilight-daemon: ERROR: /usr/local/lib/pilight/hardware/433gpio.lua:27: bad argument #1 to 'pairs' (table expected, got nil)
[Mar 30 11:52:05:517830] pilight-daemon: ERROR: no free lua states available
[Mar 30 11:52:05:517884] pilight-daemon: ERROR: no free lua states available

I haven't seen those errors before, but that might be because logging wasn't working properly.
Rule "kasten_aan" is being executed though. 
The lights that it should turn on do and pilight keeps running.

This is the rule:

Code:
                "kasten_aan": {
                        "rule": "IF (kasten_aan.state == on) THEN switch DEVICE lamp_kast TO on AND switch DEVICE lamp_kast2 TO on AND switch DEVICE kasten_aan TO off",
                        "active": 1
                },

I also made a simple test rule:

Code:
                "test": {
                        "rule": "IF ((tijd.hour == 15 AND tijd.minute == 58 AND tijd.second == 0) AND (lamp_keuken.state == off)) THEN switch DEVICE lamp_keuken TO on",
                        "active": 1
                       },

The test rule works, shows up in the log, and executes without errors:

Quote:root@domo:/etc/pilight# tail -f /var/log/pilight.log
[Mar 30 14:56:16:838024] pilight-daemon: INFO: rule #25 alles_uit was parsed in 0.020171 seconds
[Mar 30 14:56:16:843896] pilight-daemon: INFO: rule #26 kasten_aan was parsed in 0.005789 seconds
[Mar 30 14:56:16:860012] pilight-daemon: INFO: rule #27 scenario99 was parsed in 0.016084 seconds
[Mar 30 14:56:16:943910] pilight-daemon: INFO: version v8.1.4-nightly-54672bef
[ Mar 30 14:56:17:48973] pilight-daemon: INFO: no pilight daemon found, daemonizing
[ Mar 30 14:56:17:60427] pilight-daemon: INFO: daemon listening to port: 41863
[ Mar 30 14:56:17:64233] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 42240
[ Mar 30 14:56:17:70971] pilight-daemon: INFO: secured webserver started on port: 5002 (fd 16)
[ Mar 30 14:56:17:71081] pilight-daemon: INFO: regular webserver started on port: 5001 (fd 18)
[Mar 30 14:56:17:179464] pilight-daemon: INFO: new client, ip: 192.168.1.155, port: 39376
[Mar 30 14:58:00:387832] pilight-daemon: INFO: executed rule: test

Thank you very much for your help!
 
Reply
#5
Can you move the new errors you're getting to this thread:
https://forum.pilight.org/showthread.php...6#pid24146

And post the relevant information there. I'm busy debugging this, but haven't have enough information from various users.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  pilight-recive to much information amberteresa 1 382 07-31-2018, 07:17 PM
Last Post: curlymo
  Set dim level cli joshovki 16 1,842 01-08-2018, 05:02 PM
Last Post: joshovki
  How to hide CPU/RAM/Version information from WebGUI? bnk72 3 703 11-12-2017, 10:24 AM
Last Post: pilino1234
  Recommended Dimmer module with level setting alasdairc 3 1,463 10-14-2015, 08:40 PM
Last Post: alasdairc
  pilight-recive to much information koos147 1 1,372 04-01-2015, 06:27 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)