jang wrote: ↑10 Jan 2020, 16:14Att den loggar 2 ggr beror på att du har 2 log anrop
Code: Select all
--rule("#ER_version => log('New ER version, v:%s, fix:%s',env.event.version,env.event.fix)")
rule("#ER_version => telefon.eric:msg=log('New ER version, v:%s, fix:%s',env.event.version,env.event.fix)")
Första kan du ta bort / kommentera bort
Varför den verkar matcha och skicka meddelanden varje gång är desto märkligare
Kan du modifiera reglerna så att det ser ut såhär? så får vi se vad den loggar?
Code: Select all
rule("@{06:00,catch} => Util.checkVersion()") -- Check for new version every morning at 6:00
rule("[[#ER_version =>
log("Old ER version, v:%s, fix:%s',_version,_fix);
telefon.eric:msg=log('New ER version, v:%s, fix:%s',env.event.version,env.event.fix)]])
rule("#ER_version => log('...patching scene'); Util.patchEventRunner()") -- Auto patch new versions...
Det hade smugit sig in ett
" i början av regeln du skrivit ("[[) som jag fick ta bort för att det skulle försöka starta över huvud taget. Nedan är loggen vid start av en nu icke fungerande ER3.
Code: Select all
[DEBUG] 09:24:18: ER3 - EventRunner vnil B87
[DEBUG] 09:24:18: Fibaro software version: 4.570
[DEBUG] 09:24:18: HC2 uptime: 134 hours
[DEBUG] 09:24:18: Sunrise 08:35, Sunset 15:58
[DEBUG] 09:24:18:
[DEBUG] 09:24:18: Loading rules
[DEBUG] 09:24:18: Rule:1[@@05:00:00 => f=!f; || f >> log('Ding!') || true >> log('Dong!')] = OK
[DEBUG] 09:24:18: Rule:2[@23:30:00 & wday('sun-thu') => lamporundervåning:off; lamporövervåning:off; h...] = OK
[DEBUG] 09:24:18: Rule:3[@09:00 & wday('mon-fri') => lamporundervåning:off; lamporövervåning:off; hall...] = OK
[DEBUG] 09:24:18: Rule:4[@sunrise+00:15 => baksida.trädgårdsbelysning:off; framsida.ytterbelysning:off] = OK
[DEBUG] 09:24:18: Rule:5[@sunset-00:15 => baksida.trädgårdsbelysning:on; framsida.ytterbelysning:on] = OK
[DEBUG] 09:24:18: Rule:6[@23:00:00 => belysningsVD:btn=4; log('pressed button 4')] = OK
[DEBUG] 09:24:18: Catching up:Rule:7[@{06:00,catch} => Util.checkVersion()]
[DEBUG] 09:24:18: Rule:7[@{06:00,catch} => Util.checkVersion()] = OK
[DEBUG] 09:24:18: tokenizer failed at "Old ER version, v:%s, fix:%s',_version,_fix);
[DEBUG] 09:24:18: telefon.eric:msg=log('New ER version, v:%s, fix:%s',env.event.version,env.event.fix)
[DEBUG] 09:24:18: Error in '#ER_version =>
[DEBUG] 09:24:18: log("Old ER version, v:%s, fix:%s',_version,_fix);
[DEBUG] 09:24:18: telefon.eric:msg=log('New ER version, v:%s, fix:%s',env.event.version,env.event.fix)': /opt/fibaro/scenes/91.lua:1426: Parser error char 26 ('(') in expression '#ER_version =>
[DEBUG] 09:24:18: log("Old ER version, v:%s, fix:%s',_version,_fix);
[DEBUG] 09:24:18: telefon.eric:msg=log('New ER version, v:%s, fix:%s',env.event.version,env.event.fix)' (/opt/fibaro/scenes/91.lua:1180: Missing ')')
[DEBUG] 09:24:18:
[DEBUG] 09:24:18: Line 1424: --for i,v in ipairs(tokens.stream) do print(v.type, v.value, v.from, v.to) end
[DEBUG] 09:24:18: Line 1425: local stat,res = pcall(function() return self.postParse(gRule(tokens)) end)
[DEBUG] 09:24:18: Line 1426:>>> if not stat then local t=tokens.last() error(string.format("Parser error char %s ('%s') in expression '%s' (%s)",t.from+1,str:sub(t.from+1,t.to),str,res)) end
[DEBUG] 09:24:18: Line 1427: return res
[DEBUG] 09:24:18: Line 1428: end
[DEBUG] 09:24:18:
[DEBUG] 09:24:18: Error loading rules:/opt/fibaro/scenes/91.lua:2035: /opt/fibaro/scenes/91.lua:1426: Parser error char 26 ('(') in expression '#ER_version =>
[DEBUG] 09:24:18: log("Old ER version, v:%s, fix:%s',_version,_fix);
[DEBUG] 09:24:18: telefon.eric:msg=log('New ER version, v:%s, fix:%s',env.event.version,env.event.fix)' (/opt/fibaro/scenes/91.lua:1180: Missing ')')
[DEBUG] 09:25:04: Aborting: Server not started yet