Jump to content

Recommended Posts

Jan good morning,

The remote didt work.

Your rule was received so I copied that in my rules>>> no luck

I copied from the sending scene everything after "end  main" into the receiving scene result >>>> receiving remote!

For me wierd because the scenes yesterday or the day before all where updated to build 88.

Shall I refresh all my scenes? Does that not happen if you release a new build?

Please advice,

//Sjakie

Link to post
Share on other sites
  • Replies 2.7k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Note. The first ~2000 posts of this thread is mainly about EventRunner3 that is for the HC2. EventRunner3 is not developed further, but bugs are fixed as they are reported. For HC3, the version i

I've been playing with the HC3 a bit  (I don't own a HC3 but a friend has allowed me to remotely login to do testing - I'm very grateful for that). ...and I have made some progress with EventRunn

Here is another "style" of coding when using the EventRunner framework. @julesmartens needed help to code an alarm system. It's a bit complicated because he needs "full" and "ring" protection dur

Posted Images

I've been playing with the HC3 a bit  (I don't own a HC3 but a friend has allowed me to remotely login to do testing - I'm very grateful for that).

...and I have made some progress with EventRunner....

I got my first rules to run today. :-)

function main(self) 
  Rule.eval("#UI{name='button1'} => log('HUPP')")
  Rule.eval("@@00:00:03 => log('Tick')") 
end

The #UI event is generated when a button in the device UI is clicked (similar for sliders)

[DEBUG] 14.02.2020 11:02:51: ----------------------------------------- ER4, 0.1 (ID:57) -----------------------------------------
[DEBUG] 14.02.2020 11:02:51: [Sys] Events Beta 1.0, fix2
[DEBUG] 14.02.2020 11:02:51: [Sys] Setting up device support..
[DEBUG] 14.02.2020 11:02:51: [Sys] Setting up event engine..
[DEBUG] 14.02.2020 11:02:51: [Sys] Setting up remote event support..
[DEBUG] 14.02.2020 11:02:51: [Sys] Setting up remote function support..
[DEBUG] 14.02.2020 11:02:51: [Sys] Setting up autopatch support..
[DEBUG] 14.02.2020 11:02:51: [Sys] Sunrise:07:12, Sunset:17:04
[DEBUG] 14.02.2020 11:02:51: ------------------------------------- Setting up rules (main) -------------------------------------
[DEBUG] 14.02.2020 11:02:51: [L] {"doc":"Rule:1[#UI{name='button1'} => log('HUPP')]","log":{"print":true}} = OK
[DEBUG] 14.02.2020 11:02:51: [L] {"doc":"Rule:2[@@00:00:03 => log('Tick')]","log":{"print":true}} = OK
[DEBUG] 14.02.2020 11:02:51: --------------------------------------------- Running ---------------------------------------------
[DEBUG] 14.02.2020 11:02:51: [D] Posting {"type":"startup"} at Fri Feb 14 11:02:51
[DEBUG] 14.02.2020 11:02:51: [U] Tick
[DEBUG] 14.02.2020 11:02:54: [U] Tick
[DEBUG] 14.02.2020 11:02:55: onUIEvent: {"elementName":"button1","deviceId":57,"values":[null],"eventType":"onReleased"}
[DEBUG] 14.02.2020 11:02:55: [D] Posting {"type":"UI","name":"button1"} at Fri Feb 14 11:02:55
[DEBUG] 14.02.2020 11:02:55: [U] HUPP
[DEBUG] 14.02.2020 11:02:57: [U] Tick
[DEBUG] 14.02.2020 11:03:00: [U] Tick

"That's one small step for me, one giant leap for EventRunner."

 

However, to early to say if it's useful - need to understand how it performs...

 

but my aim is that at least people that automate with EventRunner should be able to migrate from HC2 to HC3 😂

 

Edited by jgab
  • Like 4
Link to post
Share on other sites

Jan,

That should be very nice!!

Unless I dont know when I will upgrade.

Thanks for the service excellence.

//Sjakie

Link to post
Share on other sites
  • 2 weeks later...

Good morning Jan,

Please advice me how to accomplish what I like to do.

I have a button to start arming the house >>>it will startArming followed by a delay off 45 seconds and then >>doArming

Now I have integrated the check off doors/windows are closed.

What I want is that if button in position  (hal.locatiegezin:isOff) is pushed again within five minutes , (position hal.locatiegezin:isOn) it will cancel the doArming process and /or start the disArming  process.

In both positions of the button it will start to arm a different set of triggers

Rule.eval([[#startArming & hal.locatiegezin:isOn (family is  absent=>

Rule.eval([[#startArming & hal.locatiegezin:isOff => (family is present)

Can this be done??

//Sjakie

Link to post
Share on other sites

Here is a alpha HC3 version of the EventRunner - I have run it for 24 hours and it haven't crashed yet...

-EventScript support. (maybe some stuff (fibaro calls)  that doesn't work yet)

-Hue support (only one hub at the moment) Hue credentials sets up in quickvariables panel.

-Nodered "API" looks different on the nodered side now. Will come back with info.

ER4-2.fqa

 

Update: Small improvement...

I will not push different pre-built versions of the ER4 to my GitHub for now. Instead I will update this post with new fqa versions until I'm satisfied with the stability.

If you want to test ER4 offline, download EventRunner4.lua, EventScript4.lua, Hue4.lua (and fibaroapiHC3.lua) from my GitHub.

 

 

Edited by jgab
Link to post
Share on other sites
37 minutes ago, jgab said:

Here is a alpha HC3 version of the EventRunner - I have run it for 24 hours and it haven't crashed yet...

-EventScript support. (maybe some stuff (fibaro calls)  that doesn't work yet)

-Hue support (only one hub at the moment) Hue credentials sets up in quickvariables panel.

-Nodered "API" looks different on the nodered side now. Will come back with info.

ER4-1.fqa 127.88 kB · 0 downloads

 

Nodered fron ER4 looks different.

Nodered flow:

Spoiler

[{"id":"1756a1ac.4ef346","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"daaa1598.c883b","type":"http in","z":"1756a1ac.4ef346","name":"","url":"/ER_HC3","method":"post","upload":false,"swaggerDoc":"","x":100,"y":80,"wires":[["92b403f2.5647f8"]],"outputLabels":["msg.payload"]},{"id":"92b403f2.5647f8","type":"function","z":"1756a1ac.4ef346","name":"decodeEvent","func":"var event=msg.payload\nmsg.payload=event\nmsg.topic=msg.payload.type\nmsg.EDeviceID = msg.payload._from\nmsg.ETransID = msg.payload._transID\nmsg.EIP = msg.payload._IP\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":80,"wires":[["9bd34b35.8c3f08","b3f48564.03e86"]]},{"id":"9bd34b35.8c3f08","type":"debug","z":"1756a1ac.4ef346","name":"Incoming event","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":500,"y":40,"wires":[]},{"id":"416dc063.af2458","type":"http response","z":"1756a1ac.4ef346","name":"Return sync","statusCode":"","headers":{},"x":670,"y":420,"wires":[]},{"id":"cdc2a464.eb8438","type":"switch","z":"1756a1ac.4ef346","name":"switchOnType","property":"payload.type","propertyType":"msg","rules":[{"t":"eq","v":"echo3","vt":"str"},{"t":"eq","v":"echo4","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":180,"y":440,"wires":[["aaf6b7bc.875c2"],["1991b6c0.1605f1"]]},{"id":"aaf6b7bc.875c2","type":"function","z":"1756a1ac.4ef346","name":"Echo3 Sync","func":"msg.payload.echo3=true\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":400,"wires":[["416dc063.af2458"]]},{"id":"1991b6c0.1605f1","type":"function","z":"1756a1ac.4ef346","name":"Echo4 Sync","func":"msg.payload.echo4=true\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":480,"wires":[["416dc063.af2458"]]},{"id":"b3f48564.03e86","type":"switch","z":"1756a1ac.4ef346","name":"Sync?","property":"payload._async","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"false","repair":false,"outputs":2,"x":470,"y":80,"wires":[["9aba1b9e.e86858"],["a855ce46.42b598"]],"outputLabels":["speak","https"]},{"id":"b608c25c.d305","type":"switch","z":"1756a1ac.4ef346","name":"switchOnType","property":"payload.type","propertyType":"msg","rules":[{"t":"eq","v":"echo1","vt":"str"},{"t":"eq","v":"echo2","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":160,"y":200,"wires":[["69fec8c1.b3dab8"],["937b4b0d.1c64e"]]},{"id":"241f6a53.ccbe46","type":"http response","z":"1756a1ac.4ef346","name":"Return ACK","statusCode":"","headers":{},"x":150,"y":320,"wires":[]},{"id":"69fec8c1.b3dab8","type":"function","z":"1756a1ac.4ef346","name":"Echo1 Async","func":"msg.payload.echo1=true\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":260,"wires":[["9d6c329c.e150c"]]},{"id":"937b4b0d.1c64e","type":"function","z":"1756a1ac.4ef346","name":"Echo2 Async","func":"msg.payload.echo2=true\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":340,"wires":[["9d6c329c.e150c"]]},{"id":"9aba1b9e.e86858","type":"link out","z":"1756a1ac.4ef346","name":"","links":["7a6af06f.060ce8","e8d2d611.07c8e"],"x":695,"y":60,"wires":[]},{"id":"e8d2d611.07c8e","type":"link in","z":"1756a1ac.4ef346","name":"","links":["9aba1b9e.e86858"],"x":35,"y":220,"wires":[["b608c25c.d305","1c946511.6f6da3"]]},{"id":"a855ce46.42b598","type":"link out","z":"1756a1ac.4ef346","name":"","links":["2513a8b1.2de1b"],"x":695,"y":100,"wires":[]},{"id":"2513a8b1.2de1b","type":"link in","z":"1756a1ac.4ef346","name":"","links":["a855ce46.42b598"],"x":60,"y":440,"wires":[["cdc2a464.eb8438"]]},{"id":"9d6c329c.e150c","type":"link out","z":"1756a1ac.4ef346","name":"","links":["3554767e.3f65da"],"x":615,"y":300,"wires":[]},{"id":"3554767e.3f65da","type":"link in","z":"1756a1ac.4ef346","name":"","links":["9d6c329c.e150c"],"x":100,"y":140,"wires":[["8737899e.b47508"]]},{"id":"8737899e.b47508","type":"function","z":"1756a1ac.4ef346","name":"encodeEvent","func":"var event = msg.payload\nevent._transID = msg.ETransID\nmsg.payload = {arg1:JSON.stringify(event)}\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":140,"wires":[["10c487b8.86bc88"]]},{"id":"10c487b8.86bc88","type":"http request","z":"1756a1ac.4ef346","name":"HC3","method":"GET","ret":"txt","paytoqs":true,"url":"http://{{EIP}}/api/callAction?deviceID={{EDeviceID}}&name=fromNodeRed","tls":"","proxy":"","authType":"basic","x":470,"y":140,"wires":[["ee377676.3a376"]]},{"id":"ee377676.3a376","type":"debug","z":"1756a1ac.4ef346","name":"POST","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":590,"y":140,"wires":[]},{"id":"1c946511.6f6da3","type":"function","z":"1756a1ac.4ef346","name":"ACK","func":"msg.payload = [\"%%ACK%%\"]\nreturn msg;","outputs":1,"noerr":0,"x":130,"y":260,"wires":[["241f6a53.ccbe46"]]}]

 

Incoming events uses the "Async path"

  Nodered.connect("http://192.168.1.50:1880/ER_HC3")
  Nodered.post({type='echo1',value=42})
  rule("#echo1 => log('ECHO:%s',env.event)")

will use the async path on Nodered and switch to the "echo1 function" that responds with an event back. Works both offline and on the HC3.

The callback from Nodered to the HC3 uses 

http://{{EIP}}/api/callAction?deviceID={{EDeviceID}}&name=fromNodeRed

i.e. it calls a function QuickApp:fromNodeRed(event) in the HC3 scene (or the simulated offline version)

In HC2 we used to start the scene with extra arguments that carried the event, which doesn't work now.

Edited by jgab
Link to post
Share on other sites
21 hours ago, kallecux said:

@jgab The alpha Version is unable to load - any "release news" for HC3?

 

Greetings

Karl Heinz

Do this load for you? ER4.fqa

If not,  what errors do you get? if any...

Link to post
Share on other sites
22 hours ago, jgab said:

Do this load for you? ER4.fqa

If not,  what errors do you get? if any...

Ok, this version is a bit better - should handle breached and binary switches.

setting 'armed' still doesn't work well...

ER4-3.fqa

  • Like 1
Link to post
Share on other sites

Hey jgap

Running er4 gives me an error

This rule worked fine in er3

But error in er4

Please advise

 

 rule("trueFor(00:01,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbathlight:off")
  rule("Livingbath_sensor:breached => || Livingbath_door:safe >> inlivingBathroom=true ;;Livingbathlight:on")
  rule("Livingbath_door:breached => inlivingBathroom=false")
  rule("Livingbath_door:safe & Livingbath_sensor:last<=3 => inlivingBathroom=true")
  rule([[Livingbath_door:safe =>||inlivingBathroom==true & Livingbath_Temp:temp >= 22 & Livingbath_sensor:last<=3 >> wait(00:00:20); Livingvent:on]])
  rule("Livingbath_door:breached =>||inlivingBathroom==false >> wait(00:03); Livingvent:off"
 
 

[DEBUG] 2020-03-08 09:50:01 pm: ------------------------------------- Setting up rules (main) ------------------------------------- 

[DEBUG] 2020-03-08 09:50:01 pm: [ERROR] Error in 'trueFor(00:01,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbathlight:off': ./quickApp.lua:2005: no triggers found in header 

[ERROR] 2020-03-08 09:50:01 pm: QuickApp crashed 

[ERROR] 2020-03-08 09:50:01 pm: [LUA Code] line: 1372 Main ERROR:[LUA Code] line: 1372 [LUA Code] line: 1372 no triggers found in header

 
 
 
Link to post
Share on other sites
2 minutes ago, minsad79 said:

Hey jgap

Running er4 gives me an error

This rule worked fine in er3

But error in er4

Please advise

 

 rule("trueFor(00:01,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbathlight:off")
  rule("Livingbath_sensor:breached => || Livingbath_door:safe >> inlivingBathroom=true ;;Livingbathlight:on")
  rule("Livingbath_door:breached => inlivingBathroom=false")
  rule("Livingbath_door:safe & Livingbath_sensor:last<=3 => inlivingBathroom=true")
  rule([[Livingbath_door:safe =>||inlivingBathroom==true & Livingbath_Temp:temp >= 22 & Livingbath_sensor:last<=3 >> wait(00:00:20); Livingvent:on]])
  rule("Livingbath_door:breached =>||inlivingBathroom==false >> wait(00:03); Livingvent:off"
 
 

[DEBUG] 2020-03-08 09:50:01 pm: ------------------------------------- Setting up rules (main) ------------------------------------- 

[DEBUG] 2020-03-08 09:50:01 pm: [ERROR] Error in 'trueFor(00:01,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbathlight:off': ./quickApp.lua:2005: no triggers found in header 

[ERROR] 2020-03-08 09:50:01 pm: QuickApp crashed 

[ERROR] 2020-03-08 09:50:01 pm: [LUA Code] line: 1372 Main ERROR:[LUA Code] line: 1372 [LUA Code] line: 1372 no triggers found in header

 

How do you setup the variables 'Livingbath_sensor' and 'Livingbath_door'.

Typically when ER complains about no triggers found in header it means that it can't deduce any deviceID numbers from the variables.

Link to post
Share on other sites
  rule("Livingbath_sensor=Livingroombath.Livingbathmotion; Livingbathlight=Livingroombath.Livingbathlight; Livingvent=Livingroombath.Livingbathvent")
  rule("Livingbath_door=Livingroombath.Livingbathdoor; Livingbath_Temp=Livingroombath.LivingbathTemp ")
  rule("trueFor(00:01,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbathlight:off")
  rule("Livingbath_sensor:breached => || Livingbath_door:safe >> inlivingBathroom=true ;;Livingbathlight:on")
  rule("Livingbath_door:breached => inlivingBathroom=false")
  rule("Livingbath_door:safe & Livingbath_sensor:last<=3 => inlivingBathroom=true")
  rule([[Livingbath_door:safe =>||inlivingBathroom==true & Livingbath_Temp:temp >= 22 & Livingbath_sensor:last<=3 >> wait(00:00:20); Livingvent:on]])
  rule("Livingbath_door:breached =>||inlivingBathroom==false >> wait(00:03); Livingvent:off"
 

apply the rule to er4,

Error

normal operation on er3

 

 

 

[DEBUG] 2020-03-09 12:15:02 am: [L] Livingbath_sensor=Livingroombath.Livingbathmotion; Livingbathlight=Livingroombath.Livingbathlight; Livingvent=Livingroombath.Livingbathvent = 252 

[DEBUG] 2020-03-09 12:15:02 am: [L] Livingbath_door=Livingroombath.Livingbathdoor; Livingbath_Temp=Livingroombath.LivingbathTemp = 565 

[DEBUG] 2020-03-09 12:15:02 am: [ERROR] Error in 'trueFor(00:01,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbathlight:off': ./quickApp.lua:2335: attempt to call a nil value (field '_mkCombEvent') 

[ERROR] 2020-03-09 12:15:02 am: QuickApp crashed 

[ERROR] 2020-03-09 12:15:02 am: [LUA Code] line: 1835 Main ERROR:[LUA Code] line: 1835 [LUA Code] line: 1835 attempt to call a nil value (field '_mkCombEvent')

Link to post
Share on other sites
1 hour ago, minsad79 said:
  rule("Livingbath_sensor=Livingroombath.Livingbathmotion; Livingbathlight=Livingroombath.Livingbathlight; Livingvent=Livingroombath.Livingbathvent")
  rule("Livingbath_door=Livingroombath.Livingbathdoor; Livingbath_Temp=Livingroombath.LivingbathTemp ")
  rule("trueFor(00:01,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbathlight:off")
  rule("Livingbath_sensor:breached => || Livingbath_door:safe >> inlivingBathroom=true ;;Livingbathlight:on")
  rule("Livingbath_door:breached => inlivingBathroom=false")
  rule("Livingbath_door:safe & Livingbath_sensor:last<=3 => inlivingBathroom=true")
  rule([[Livingbath_door:safe =>||inlivingBathroom==true & Livingbath_Temp:temp >= 22 & Livingbath_sensor:last<=3 >> wait(00:00:20); Livingvent:on]])
  rule("Livingbath_door:breached =>||inlivingBathroom==false >> wait(00:03); Livingvent:off"
 

apply the rule to er4,

Error

normal operation on er3

 

I'm sorry but I haven't spent so much time with ER4 yet - been busy with the fibaroapiHC3 SDK - so there can be all kind of bugs...

Anyway, thanks for your patience testing it. I have a new version that fixes your latest problems

ER4-4.fqa

Edited by jgab
Link to post
Share on other sites

[DEBUG] 2020-03-09 01:19:49 am: [L] Rule:4[Livingbath_sensor:breached => || Livingbath_door:safe >> inlivingBathroom=true ;...] = OK 

[DEBUG] 2020-03-09 01:19:49 am: [L] Rule:5[Livingbath_door:breached => inlivingBathroom=false] = OK 

[DEBUG] 2020-03-09 01:19:49 am: [L] Rule:6[Livingbath_door:safe & Livingbath_sensor:last<=3 => inlivingBathroom=true] = OK 

[DEBUG] 2020-03-09 01:19:49 am: [L] Rule:7[Livingbath_door:safe =>||inlivingBathroom==true & Livingbath_Temp:temp >= 22 & L...] = OK 

[DEBUG] 2020-03-09 01:19:49 am: [L] Rule:8[Livingbath_door:breached =>||inlivingBathroom==false >> wait(00:03); Livingvent:...] = OK 

[DEBUG] 2020-03-09 01:19:49 am: [L] BedBath_sensor=bb.Bedbathroommotion;Bedbathlight=bb.Bedbathroomlight;Bedvent=bb.Bedbathroomvent = 298 

[DEBUG] 2020-03-09 01:19:49 am: [L] BedBath_door=bb.Bedbathroomdoor = 925 

[DEBUG] 2020-03-09 01:19:49 am: [L] Rule:9[trueFor(00:01,BedBath_sensor:safe & BedBath_door:value) => !inbedBathroom & Bedb...] = OK 

[DEBUG] 2020-03-09 01:19:49 am: [L] Rule:10[BedBath_sensor:breached => || BedBath_door:safe >> inbedBathroom=true ;;Bedbathl...] = OK 

[DEBUG] 2020-03-09 01:19:49 am: [L] Rule:11[BedBath_door:breached => inbedBathroom=false] = OK

 

 

Thank you should work normal

Your er4 is the best

Link to post
Share on other sites

Hi jgap

under

rule ([[Livingbath_door: safe => || inlivingBathroom == true & Livingbath_Temp: temp> = 22 & Livingbath_sensor: last <= 3 >> wait (00:00:20); Livingvent: on]])
   rule ("Livingbath_door: breached => || inlivingBathroom == false >> wait (00:03); Livingvent: off")

This part doesn't work

Advise

Link to post
Share on other sites
16 minutes ago, minsad79 said:

Hi jgap

under

rule ([[Livingbath_door: safe => || inlivingBathroom == true & Livingbath_Temp: temp> = 22 & Livingbath_sensor: last <= 3 >> wait (00:00:20); Livingvent: on]])
   rule ("Livingbath_door: breached => || inlivingBathroom == false >> wait (00:03); Livingvent: off")

This part doesn't work

Advise

Hi, There is a strange space between '>' and '=' in "Livingbath_Temp: temp> = 22"... that is at least one cause of trouble.

Link to post
Share on other sites

rule ([[Livingbath_door: safe => || inlivingBathroom == true & Livingbath_Temp: temp >= 22 & Livingbath_sensor: last <= 3 >> wait (00:00:20); Livingvent: on]])
   rule ("Livingbath_door: breached => || inlivingBathroom == false >> wait (00:03); Livingvent: off")

 

I modified the space between

And below

Error phrase

 

[DEBUG] 2020-03-09 11:40:14 pm: Error in setTimeout (line:-157): attempt to index a nil value (global 'coroutine')

 

 

 

Link to post
Share on other sites

 rule([[$PresentState=='Home' & wday('fri-sun') & officedeskLight:isOn =>
    || 22:00..23:00 >> officedeskLight:color={0,255,0,0}
    || 23:01..00:00 >> officedeskLight:color={0,119,155,0}
    || 00:01..01:00 >> officedeskLight:color={129,70,0,0}
    || 01:01..02:00 >> officedeskLight:color={215,0,255,0}
   ]])

 

In the above rules

Error

 

[DEBUG] 10.03.2020 13:23:35: [ERROR] Error in 'officemotion:breached & 22:00..02:00 =>  officedeskLight:value=50': EventRunner4.lua:714: attempt to concatenate a nil value
Program completed in 1.45 seconds (pid: 20528).
EventRunner4.lua:2631: Main ERROR:EventScript4.lua:1019: EventRunner4.lua:714: attempt to concatenate a nil value
stack traceback:
    [C]: in function 'error'
    EventRunner4.lua:2631: in function 'cont'
    EventRunner4.lua:2641: in function 'cont'
    EventRunner4.lua:1304: in function 'installExternalModules'
    EventRunner4.lua:2622: in function 'initEventExtension'
    EventRunner4.lua:2646: in function 'onInit'
    fibaroapiHC3.lua:1048: in function 'fun'
    fibaroapiHC3.lua:536: in function 'start'
    fibaroapiHC3.lua:2877: in function 'start'
    EventRunner4.lua:2651: in main chunk
Debugging session completed (traced 0 instructions).
 

Edited by minsad79
Link to post
Share on other sites
2 hours ago, minsad79 said:

 rule([[$PresentState=='Home' & wday('fri-sun') & officedeskLight:isOn =>
    || 22:00..23:00 >> officedeskLight:color={0,255,0,0}
    || 23:01..00:00 >> officedeskLight:color={0,119,155,0}
    || 00:01..01:00 >> officedeskLight:color={129,70,0,0}
    || 01:01..02:00 >> officedeskLight:color={215,0,255,0}
   ]])

 

In the above rules

Error

 

[DEBUG] 10.03.2020 13:23:35: [ERROR] Error in 'officemotion:breached & 22:00..02:00 =>  officedeskLight:value=50': EventRunner4.lua:714: attempt to concatenate a nil value
Program completed in 1.45 seconds (pid: 20528).
EventRunner4.lua:2631: Main ERROR:EventScript4.lua:1019: EventRunner4.lua:714: attempt to concatenate a nil value
stack traceback:
    [C]: in function 'error'
    EventRunner4.lua:2631: in function 'cont'
    EventRunner4.lua:2641: in function 'cont'
    EventRunner4.lua:1304: in function 'installExternalModules'
    EventRunner4.lua:2622: in function 'initEventExtension'
    EventRunner4.lua:2646: in function 'onInit'
    fibaroapiHC3.lua:1048: in function 'fun'
    fibaroapiHC3.lua:536: in function 'start'
    fibaroapiHC3.lua:2877: in function 'start'
    EventRunner4.lua:2651: in main chunk
Debugging session completed (traced 0 instructions).
 

It's the rule that starts 'officemotion:breached & 22:00..02:00 =>  officedeskLight:value=50'

that gives the error. Can you post it?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...