Events system thread (questions and feedback)

Moderator: leecollings

User avatar
CopyCatz
Developer
Posts: 123
Joined: Thursday 11 July 2013 17:28
Target OS: -
Domoticz version:
Location: Outer Heaven
Contact:

Re: Events system feedback thread

Post by CopyCatz »

Your blockly event is incorrect. You can't use a text box for value checking, use the integer block (the last one under logic). I still have to correct all this because people start making combo's that aren't really working. I'm planning a complete workover to take out the pieces that are confusing, but unfortunately that will break most existing events so I'm still thinking about it.
NiklasO
Posts: 67
Joined: Friday 16 August 2013 18:34
Target OS: -
Domoticz version:
Location: Stockholm, Sweden
Contact:

Re: Events system feedback thread

Post by NiklasO »

Ah, ok. Good. Did you find the problem with groups not showing up?
Great work btw! I like how easy it is when you know what to do. ;-)
User avatar
CopyCatz
Developer
Posts: 123
Joined: Thursday 11 July 2013 17:28
Target OS: -
Domoticz version:
Location: Outer Heaven
Contact:

Re: Events system feedback thread

Post by CopyCatz »

Can you try to make a new group with a simple name (no comma and in plain ascii without diacritics) to see if that works? I can't reproduce your issue in my system.
NiklasO
Posts: 67
Joined: Friday 16 August 2013 18:34
Target OS: -
Domoticz version:
Location: Stockholm, Sweden
Contact:

Re: Events system feedback thread

Post by NiklasO »

CopyCatz wrote:Can you try to make a new group with a simple name (no comma and in plain ascii without diacritics) to see if that works? I can't reproduce your issue in my system.
All my groups shows up if i have at least one scene. Only groups shows nothing.
Image
Image

So, this one is also wrong?
Image

Code: Select all

Error: Wed Sep 25 14:07:09 2013 Lua script error: [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: ')' expected near 'comparevariable'
Error: Wed Sep 25 14:07:09 2013 Lua script error: [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: ')' expected near 'comparevariable'
Wed Sep 25 14:07:09 2013 (RFXtrx) Lighting 2 (Fönster, kök)
Wed Sep 25 14:07:10 2013 (RFXtrx) Receiver/Transmitter Message
subtype = Transmitter Response
Sequence nbr = 6
response = ACK, data correct transmitted
User avatar
CopyCatz
Developer
Posts: 123
Joined: Thursday 11 July 2013 17:28
Target OS: -
Domoticz version:
Location: Outer Heaven
Contact:

Re: Events system feedback thread

Post by CopyCatz »

NiklasO wrote: All my groups shows up if i have at least one scene. Only groups shows nothing.
That was the problem, thanks. I just uploaded a fix. The Lua error about the comparevariable is a more complicated one, I don't know the cause yet. Edit: in your case the daglsjus thing is a utility device judging from the color of the block, those don't work yet.
NiklasO
Posts: 67
Joined: Friday 16 August 2013 18:34
Target OS: -
Domoticz version:
Location: Stockholm, Sweden
Contact:

Re: Events system feedback thread

Post by NiklasO »

CopyCatz wrote:
NiklasO wrote: All my groups shows up if i have at least one scene. Only groups shows nothing.
That was the problem, thanks. I just uploaded a fix. The Lua error about the comparevariable is a more complicated one, I don't know the cause yet. Edit: in your case the daglsjus thing is a utility device judging from the color of the block, those don't work yet.
Yes. It is a 1-wire A/D device. I read my light sensor using it. I need to turn off/on my lights based on that one, not sunrise or sunset.
Image
The device has 4 inputs so i can measue 4 voltages 0 - 5v. It has many uses. :)

Could you please add this to your to-do? ;-)

Thanks again!
User avatar
CopyCatz
Developer
Posts: 123
Joined: Thursday 11 July 2013 17:28
Target OS: -
Domoticz version:
Location: Outer Heaven
Contact:

Re: Events system feedback thread

Post by CopyCatz »

The main problem is that those devices can have all sorts of values and not just a single one. In the temp/baro/hum devices we can split those, but I can't reall foresee all the different values in the other devices. You might want to try lua for this and parse the svalues numbers yourself.
NiklasO
Posts: 67
Joined: Friday 16 August 2013 18:34
Target OS: -
Domoticz version:
Location: Stockholm, Sweden
Contact:

Re: Events system feedback thread

Post by NiklasO »

CopyCatz wrote:The main problem is that those devices can have all sorts of values and not just a single one. In the temp/baro/hum devices we can split those, but I can't reall foresee all the different values in the other devices. You might want to try lua for this and parse the svalues numbers yourself.
It can have 0 - 5000mW. How do you mean?
Does it have to be some stand alone device just for the AD-converter?

More ppl using it: http://www.domoticz.com/forum/viewtopic.php?f=4&t=553 :)
gertjuhh

Re: Events system feedback thread

Post by gertjuhh »

Don't use a time input to specify the minutes but an integer input.
User avatar
CopyCatz
Developer
Posts: 123
Joined: Thursday 11 July 2013 17:28
Target OS: -
Domoticz version:
Location: Outer Heaven
Contact:

Re: Events system feedback thread

Post by CopyCatz »

See, this is one of the situations where I wish the time block wouldn't fit in the for .. minutes block (blockly doesn't support it). Otherwise I have to program in a calculation from time notation to int, but once we go down that road...

I'm thinking of removing the time and int blocks completely and just offer a text box in the relevant block, so you'd only have to type in the value and not choose a value block first. This will however break all existing blockly events...
gertjuhh

Re: Events system feedback thread

Post by gertjuhh »

Is there no way to restrict which blocks go where in the blocky UI?
jfcjfc
Posts: 10
Joined: Monday 15 July 2013 14:37
Target OS: -
Domoticz version:
Location: France
Contact:

Re: Events system feedback thread

Post by jfcjfc »

Copycatz,

"""" v1.1023: Scenes and groups on/off/active/inactive via events, fixed bug where inactive event would still trigger
when multiple events apply. Comma now supported in event OpenURL. events now triggered by security state change
implemented script_security_name.lua for sec panel triggers in lua. """""

in v1.1026
Security panel :

Where is 'script_security_name.lua' or 'script_security_demo.lua ??

Not in /scripts/lua.

Please give examples in lua (disarm, arm home arm away, clear)
Where are security passwords ? In sqlite3 [no security table]?

Thanks
jfcjfc
User avatar
CopyCatz
Developer
Posts: 123
Joined: Thursday 11 July 2013 17:28
Target OS: -
Domoticz version:
Location: Outer Heaven
Contact:

Re: Events system feedback thread

Post by CopyCatz »

There is no security example (yet). I've added info to the wiki.

I used this to test:

script_security_test.lua

Code: Select all

commandArray = {}
if (globalvariables['Security'] == 'Armed Home') then
	commandArray['Staande lamp']='On'
	commandArray['SendNotification']='subject#body'
end

return commandArray
Security code has been in preferences for some time now...
jfcjfc
Posts: 10
Joined: Monday 15 July 2013 14:37
Target OS: -
Domoticz version:
Location: France
Contact:

Re: Events system feedback thread (security panel)

Post by jfcjfc »

it's OK (1026).

commandArray = {}
if (globalvariables['Security'] == 'Armed Home' and otherdevices['TEST_1'] == 'Off') then
commandArray['TEST_1']='On'
commandArray['TEST_2']='Off'
end
if (globalvariables['Security'] == 'Disarmed' and otherdevices['TEST_1'] == 'On') then
commandArray['TEST_1']='Off'
commandArray['TEST_2']='On'
end
return commandArray
marcdg
Posts: 2
Joined: Saturday 13 July 2013 9:56
Target OS: -
Domoticz version:
Contact:

Re: Events system feedback thread

Post by marcdg »

Is it possible to have an event started if time is between 22:00 and 07:00 ?
I have tried this in blocly, but it will not work, perhaps because of the daychange ?
gertjuhh

Re: Events system feedback thread

Post by gertjuhh »

marcdg wrote:Is it possible to have an event started if time is between 22:00 and 07:00 ?
I have tried this in blocly, but it will not work, perhaps because of the daychange ?
If
(time > 22:00 OR time < 07:00) AND ...
Then
...
marcdg
Posts: 2
Joined: Saturday 13 July 2013 9:56
Target OS: -
Domoticz version:
Contact:

Re: Events system feedback thread

Post by marcdg »

gertjuhh wrote:
marcdg wrote:Is it possible to have an event started if time is between 22:00 and 07:00 ?
I have tried this in blocly, but it will not work, perhaps because of the daychange ?
If
(time > 22:00 OR time < 07:00) AND ...
Then
...

thanks ! That did it.
NiklasO
Posts: 67
Joined: Friday 16 August 2013 18:34
Target OS: -
Domoticz version:
Location: Stockholm, Sweden
Contact:

Re: Events system feedback thread

Post by NiklasO »

Is there a block that can read the group status? I need one for "if group on do this" and "if group off do that"
The group status could be mixed too but i still want to know if i should turn the lights on or off based on the group status... hm. If the event system turns the group on and i manually turns one light off i get the status mixed. So i would need if group status = "if group on OR mixed do."

Now, i do this:
Image

If I turn the "Fönster, kök" off manually the script will turn it on again within a minute because i only got status for one light, I don't want that. How to do?
User avatar
CopyCatz
Developer
Posts: 123
Joined: Thursday 11 July 2013 17:28
Target OS: -
Domoticz version:
Location: Outer Heaven
Contact:

Re: Events system feedback thread

Post by CopyCatz »

As the mouseover on groups and scene states, they can only be used in a "set" command. Check individual devices from a group/scene (or all of them) to do what you want.
NiklasO
Posts: 67
Joined: Friday 16 August 2013 18:34
Target OS: -
Domoticz version:
Location: Stockholm, Sweden
Contact:

Re: Events system feedback thread

Post by NiklasO »

CopyCatz wrote:As the mouseover on groups and scene states, they can only be used in a "set" command. Check individual devices from a group/scene (or all of them) to do what you want.
Mouseover? Cant see anything. ;-)

I can check all but if one has a different state it will turn everything on?
Edit: Ah, i could use a dummy device. :)

This one works:
Image
I could include the dummy device in the group but I want blockly to be the only thing that changes it (unless i toggle the device directly of course. hehe).

Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest