@Yves911 said:
@MartinH could you try with
[its after 22:00 or before 07:00]
Should work…
Thank you for your idea, Yves911
Sure, this works, but at the same time
[its after 07:00 or before 22:00]
works too, because every time of the day is after 07:00 or before 22:00 as it is after 22:00 or before 07:00.
I tried it at 23:44 and both rules work.
info [pimatic]: rule camera-time-off: set $camera_time to 0
23:47:23
info [pimatic]: rule camera-time-on: set $camera_time to 1
23:43:49
The rule for camera-time-off was
if [its after 07:00 or before 22:00] then $camera_time = 0
I saw this example in the pimatic rules examples:
IF it is after 06:00 and before 07:30 and pilight-thermostaat-runprogram is on
THEN $DesiredTemp = 18
So I set my rule similar to this example, but it doesn’t work.
Do you have any other idea what the error may be?
Update 00:28
I also get these error messages while typing a rule:
Debug, Info, Warn, Error
4
All
Showing 34 of 34 Messages
2015-04-26 00:23:32debug [pimatic]: AssertionError: @token is ']' at BoolExpressionTreeBuilder._buildExpression (/root/pimatic-app/node_modules/pimatic/lib/rules-ast-builder.coffee:83:9) at BoolExpressionTreeBuilder.build (/root/pimatic-app/node_modules/pimatic/lib/rules-ast-builder.coffee:63:13) at RuleManager.getRuleConditionHints (/root/pimatic-app/node_modules/pimatic/lib/rules.coffee:1044:12) at /root/pimatic-app/node_modules/pimatic/node_modules/decl-api/index.js:261:34 at tryCatch1 (/root/pimatic-app/node_modules/pimatic/node_modules/decl-api/node_modules/bluebird/js/main/util.js:43:21) at Function.Promise$_Try (/root/pimatic-app/node_modules/pimatic/node_modules/decl-api/node_modules/bluebird/js/main/promise.js:246:11) at callActionFromReq (/root/pimatic-app/node_modules/pimatic/node_modules/decl-api/index.js:259:24) at /root/pimatic-app/node_modules/pimatic/node_modules/decl-api/index.js:316:14 at tryCatch1 (/root/pimatic-app/node_modules/pimatic/node_modules/decl-api/node_modules/bluebird/js/main/util.js:43:21) at Function.Promise$_Try (/root/pimatic-app/node_modules/pimatic/node_modules/decl-api/node_modules/bluebird/js/main/promise.js:246:11) at callActionFromReqAndRespond (/root/pimatic-app/node_modules/pimatic/node_modules/decl-api/index.js:314:24) at /root/pimatic-app/node_modules/pimatic/node_modules/decl-api/index.js:342:18 at callbacks (/root/pimatic-app/node_modules/pimatic/node_modules/express/lib/router/index.js:164:37) at param (/root/pimatic-app/node_modules/pimatic/node_modules/express/lib/router/index.js:138:11) at pass (/root/pimatic-app/node_modules/pimatic/node_modules/express/lib/router/index.js:145:5) at nextRoute (/root/pimatic-app/node_modules/pimatic/node_modules/express/lib/router/index.js:100:7) at callbacks (/root/pimatic-app/node_modules/pimatic/node_modules/express/lib/router/index.js:167:11) at /root/pimatic-app/node_modules/pimatic/lib/framework.coffee:882:19 at callbacks (/root/pimatic-app/node_modules/pimatic/node_modules/express/lib/router/index.js:164:37) at param (/root/pimatic-app/node_modules/pimatic/node_modules/express/lib/router/index.js:138:11) at pass (/root/pimatic-app/node_modules/pimatic/node_modules/express/lib/router/index.js:145:5) at Router._dispatch (/root/pimatic-app/node_modules/pimatic/node_modules/express/lib/router/index.js:173:5) at Object.router (/root/pimatic-app/node_modules/pimatic/node_modules/express/lib/router/index.js:33:10) at next (/root/pimatic-app/node_modules/pimatic/node_modules/express/node_modules/connect/lib/proto.js:193:15) at Object.handle (/root/pimatic-app/node_modules/pimatic/lib/framework.coffee:258:18) at next (/root/pimatic-app/node_modules/pimatic/node_modules/express/node_modules/connect/lib/proto.js:193:15) at Object.cookieSession [as handle] (/root/pimatic-app/node_modules/pimatic/node_modules/express/node_modules/connect/lib/middleware/cookieSession.js:120:5) at next (/root/pimatic-app/node_modules/pimatic/node_modules/express/node_modules/connect/lib/proto.js:193:15) at /root/pimatic-app/node_modules/pimatic/node_modules/express/node_modules/connect/lib/middleware/json.js:81:7 at IncomingMessage.onEnd (/root/pimatic-app/node_modules/pimatic/node_modules/express/node_modules/connect/node_modules/raw-body/index.js:109:7) at IncomingMessage.g (events.js:180:16) at IncomingMessage.EventEmitter.emit (events.js:92:17) at _stream_readable.js:920:16 at process._tickCallback (node.js:415:13)
00:23:32error [pimatic]: @token is ']'
Is there something broken?