Page 11 of 16
Re: Events system feedback thread
Posted: Wednesday 25 September 2013 13:58
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.
Re: Events system feedback thread
Posted: Wednesday 25 September 2013 14:00
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.
Re: Events system feedback thread
Posted: Wednesday 25 September 2013 14:05
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.
Re: Events system feedback thread
Posted: Wednesday 25 September 2013 14:11
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.
So, this one is also wrong?
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
Re: Events system feedback thread
Posted: Wednesday 25 September 2013 14:25
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.
Re: Events system feedback thread
Posted: Wednesday 25 September 2013 14:34
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.
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!
Re: Events system feedback thread
Posted: Wednesday 25 September 2013 14:41
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.
Re: Events system feedback thread
Posted: Wednesday 25 September 2013 14:43
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
Re: Events system feedback thread
Posted: Thursday 26 September 2013 9:52
by gertjuhh
Don't use a time input to specify the minutes but an integer input.
Re: Events system feedback thread
Posted: Thursday 26 September 2013 11:20
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...
Re: Events system feedback thread
Posted: Thursday 26 September 2013 11:41
by gertjuhh
Is there no way to restrict which blocks go where in the blocky UI?
Re: Events system feedback thread
Posted: Thursday 26 September 2013 16:43
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
Re: Events system feedback thread
Posted: Thursday 26 September 2013 18:34
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...
Re: Events system feedback thread (security panel)
Posted: Friday 27 September 2013 1:39
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
Re: Events system feedback thread
Posted: Wednesday 02 October 2013 9:57
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 ?
Re: Events system feedback thread
Posted: Wednesday 02 October 2013 10:01
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
...
Re: Events system feedback thread
Posted: Thursday 03 October 2013 9:24
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.
Re: Events system feedback thread
Posted: Thursday 03 October 2013 10:16
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:
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?
Re: Events system feedback thread
Posted: Thursday 03 October 2013 11:03
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.
Re: Events system feedback thread
Posted: Thursday 03 October 2013 11:13
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:
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!