Event Triggered every Second

Moderator: leecollings

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

Event Triggered every Second

Post by dozen »

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: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Event Triggered every Second

Post by jvdz »

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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
dozen
Posts: 11
Joined: Sunday 28 May 2017 21:06
Target OS: Windows
Domoticz version:
Contact:

Re: Event Triggered every Second

Post by dozen »

canvas.png
canvas.png (63.88 KiB) Viewed 1298 times
i dont know how to put the Blockly Event here so i take a Photo ;)
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Event Triggered every Second

Post by jvdz »

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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
dozen
Posts: 11
Joined: Sunday 28 May 2017 21:06
Target OS: Windows
Domoticz version:
Contact:

Re: Event Triggered every Second

Post by dozen »

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: 16
Joined: Saturday 02 September 2017 8:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Vollenhove, nederland
Contact:

Re: Event Triggered every Second

Post by gerardsoraya »


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

Rpi 4
rflink 433 mhz
Philips hue
p1 smart meter cable
P1 smart meter solar
Lyric t6
dozen
Posts: 11
Joined: Sunday 28 May 2017 21:06
Target OS: Windows
Domoticz version:
Contact:

Re: Event Triggered every Second

Post by dozen »

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: 67
Joined: Wednesday 10 May 2017 17:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Event Triggered every Second

Post by terrorsource »

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.
mrf68

Re: Event Triggered every Second

Post by mrf68 »

But remove one of the = , because using “if >= 5” and “else if <= 5” would be nasty when usage = 5. ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests