Event Triggered every Second

Post Reply
dozen
Posts: 5
Joined: Sunday 28 May 2017 21:06
Target OS: Windows
Domoticz version:
Contact:

Event Triggered every Second

Post by dozen » Sunday 08 July 2018 21:00

Hi
I have run a Blockly Event with a Fibaro Plug that switches a 433mhz Plug on when there is kwh > 2

So if my Coffeemachine is going on the light above turns on.
The Function is Correct, but every Second the Log gets: EventSystem: Event triggered: Light Coffee
(RFX433) Lighting 1 (Diner LED Coffee)


Is that normal?

User avatar
jvdz
Posts: 1340
Joined: Tuesday 30 December 2014 20:25
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Westland/Netherlands
Contact:

Re: Event Triggered every Second

Post by jvdz » Sunday 08 July 2018 21:16

No, so you likely have a logic error testing for status and switching the same switch.
It would help when you show your blockly logic.
Jos

dozen
Posts: 5
Joined: Sunday 28 May 2017 21:06
Target OS: Windows
Domoticz version:
Contact:

Re: Event Triggered every Second

Post by dozen » Thursday 12 July 2018 16:31

canvas.png
canvas.png (63.88 KiB) Viewed 200 times
i dont know how to put the Blockly Event here so i take a Photo ;)

User avatar
jvdz
Posts: 1340
Joined: Tuesday 30 December 2014 20:25
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Westland/Netherlands
Contact:

Re: Event Triggered every Second

Post by jvdz » Thursday 12 July 2018 17:27

dozen wrote:
Thursday 12 July 2018 16:31
i dont know how to put the Blockly Event here so i take a Photo ;)
yea... stamp size ;)
Anyways, Just add an AND to both to test the status of "Diner LED Coffee" so it looks like:

Code: Select all

If "Fibaro gen5 kwh".actual >= 5 and "Diner LED Coffee" = "Off" then 
Set "Diner LED Coffee" = "On"
ElseIf "Fibaro gen5 kwh".actual <= 5 and "Diner LED Coffee" = "On" then 
Set "Diner LED Coffee" = "Off"
Jos

dozen
Posts: 5
Joined: Sunday 28 May 2017 21:06
Target OS: Windows
Domoticz version:
Contact:

Re: Event Triggered every Second

Post by dozen » Thursday 12 July 2018 20:33

I Think its a Problem with the Fibaro, he sends a lot of Status Messages

2018-07-12 20:27:14.478 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:15.142 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:15.442 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:17.210 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:17.524 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:19.159 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:19.464 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:20.425 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:20.729 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:42.160 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:42.466 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:43.161 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:43.456 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:44.231 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:44.510 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:45.173 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:45.470 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:51.181 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:51.794 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:28:12.140 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:28:12.440 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:28:14.510 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:28:14.812 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:28:15.213 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:28:15.519 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:28:16.160 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:28:16.459 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:28:18.158 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:28:18.443 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)

So now i have changed the Problem from event triggering to this :(

gerardsoraya
Posts: 8
Joined: Saturday 02 September 2017 8:06
Target OS: Linux
Domoticz version: v3.8763
Location: kampen, nederland
Contact:

Re: Event Triggered every Second

Post by gerardsoraya » Sunday 15 July 2018 19:21


dozen wrote:I Think its a Problem with the Fibaro, he sends a lot of Status Messages

2018-07-12 20:27:14.478 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:15.142 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:15.442 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:17.210 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:17.524 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:19.159 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:19.464 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:20.425 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:20.729 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:42.160 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:42.466 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:43.161 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:43.456 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:44.231 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:44.510 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:45.173 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:45.470 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:27:51.181 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:27:51.794 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:28:12.140 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:28:12.440 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:28:14.510 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:28:14.812 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:28:15.213 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:28:15.519 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:28:16.160 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:28:16.459 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)
2018-07-12 20:28:18.158 (Aeotec Z-Stick) Usage (Fibaro Gen5)
2018-07-12 20:28:18.443 (Aeotec Z-Stick) General/kWh (Fibaro Gen5 kw/h)

So now i have changed the Problem from event triggering to this :(
The way jos says it have to work because jou dont have a check right now. Every second the system sees the usage is above so i do an action.

Verstuurd vanaf mijn SM-G965F met Tapatalk

ubuntu
rflink 433 mhz
rflink 868 mhz
p1 smart meter cable
toon thermostaat
otgw
pretty noob but whit google i've done a lot

dozen
Posts: 5
Joined: Sunday 28 May 2017 21:06
Target OS: Windows
Domoticz version:
Contact:

Re: Event Triggered every Second

Post by dozen » Sunday 15 July 2018 20:54

jvdz wrote:
dozen wrote:
Thursday 12 July 2018 16:31
i dont know how to put the Blockly Event here so i take a Photo ;)
yea... stamp size ;)
Anyways, Just add an AND to both to test the status of "Diner LED Coffee" so it looks like:

Code: Select all

If "Fibaro gen5 kwh".actual >= 5 and "Diner LED Coffee" = "Off" then 
Set "Diner LED Coffee" = "On"
ElseIf "Fibaro gen5 kwh".actual <= 5 and "Diner LED Coffee" = "On" then 
Set "Diner LED Coffee" = "Off"
Jos
I must remove the „if its on then turn it off“ command because sometimes i need the Light Permanently ;)




Gesendet von iPhone mit Tapatalk

terrorsource
Posts: 43
Joined: Wednesday 10 May 2017 17:57
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Event Triggered every Second

Post by terrorsource » Monday 16 July 2018 13:38

You need to have some kind of check in your script. this way it always triggers each second because nothing changed. this is as designed.

The IF ELSE from @jdvz is what you need to use.

User avatar
mrf68
Posts: 263
Joined: Monday 23 February 2015 13:45
Target OS: Windows
Domoticz version: 3.4834
Location: Netherlands
Contact:

Re: Event Triggered every Second

Post by mrf68 » Tuesday 17 July 2018 8:16

But remove one of the = , because using “if >= 5” and “else if <= 5” would be nasty when usage = 5. ;)
----------
3x RPi
1x W2k12 (vm)
3x RFXcom433e
1x Razberry board
KAKU: 9x APA3-1500R, 2x ACDB-7000C, 3x AMST-606, 1x APIR-2150, 1x AWS-3500, 1x ATMT-502
Z-wave: 8x Everspring AN145
Misc: 2x wireless doorbells

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests