Page 5 of 16
Re: Events system feedback thread
Posted: Thursday 18 July 2013 18:36
by anderssan
Hi,
The event system is great but I agree with Jochen that you should enable this function again
This is not advanced programming, it is useful also for simple events.
For example if you have a motion sensor that triggers several lights..
IF motion detector = ON {
IF light A = OFF {
=> TURN light A = ON for X minutes }
IF light B = OFF {
=> TURN light B = ON for X minutes }
IF light C = OFF {
=> TURN light C = ON for X minutes }
}
Offcourse you can create three events but I think the readability is better with nestled if-statements..
//Anders
CopyCatz wrote:Jochen wrote:CopyCatz killed my blockly-events
Why you disable this? It was running very well.
Blockly creates a block of xml containing the statements. I have to parse all those statements and separate into 2 blocks: the conditions and the actions. Those are saved in the Domoticz database, so that Domoticz can evaluate the condition line and then execute the actions. If we would allow multiple if .. then's, then we would need multiple condition + action pairs per event, making it way more difficult. As said before, we want to keep the blockly interface simple for people who don't program for a living. If you want complexity, use scripts.
Re: Events system feedback thread
Posted: Friday 19 July 2013 12:29
by fl1p
Is it possible to give parameters in the text? Like, for example $CurrentTemperature or $StateOfLight ?
Re: Events system feedback thread
Posted: Friday 19 July 2013 13:15
by CopyCatz
- v1.873 Implemented sunrise/sunset in blockly, time blocks grouped, switches grouped by alphabet as workaround
for blockly not using scrollable dropdowns. In the show current states list devicenames now update when changed.
These changes will probably require the blockly events to be rebuilt through the interface by the user.
Re: Events system feedback thread
Posted: Friday 19 July 2013 18:06
by luckysession
Upps, missing devices "switches" for creating blockly events.
And thank fpr first step of my wish sunrise and sunset, but missing option BEFORE and AFTER sunrise/sunset.
Well done, great job!
Thanks LUCKYSESSION
Re: Events system feedback thread
Posted: Friday 19 July 2013 20:47
by SweetPants
luckysession wrote:Upps, missing devices "switches" for creating blockly events.
When selecting one, it disapears (1.876)
Harry
Re: Events system feedback thread
Posted: Friday 19 July 2013 22:23
by luckysession
SweetPants wrote:luckysession wrote:Upps, missing devices "switches" for creating blockly events.
When selecting one, it disapears (1.876)
Harry
Switches is not selectable in event creation.
Re: Events system feedback thread
Posted: Saturday 20 July 2013 8:53
by CopyCatz
Ok im at 876 now, switches in groups and working. Can you be more specific what is going wrong?
Re: Events system feedback thread
Posted: Saturday 20 July 2013 10:48
by SweetPants
CopyCatz wrote:Can you be more specific what is going wrong?
As soon as i try to select a switch, there is no drop-down list but the switch icon/menu disappears.
Re: Events system feedback thread
Posted: Saturday 20 July 2013 10:57
by CopyCatz
Which browser? Do you have only one device starting with a G?
Re: Events system feedback thread
Posted: Saturday 20 July 2013 11:04
by mec
- Schermafbeelding 2013-07-20 om 10.59.25.png (35.88 KiB) Viewed 6434 times
Same issue over here. Unable to select a switch. (OS X Mavericks / Safari)
Re: Events system feedback thread
Posted: Saturday 20 July 2013 11:06
by CopyCatz
Hmmm working here so I can't debug, if any of you has firebug or a similar tool, can you check if there's a javascript error when you get to the broken blocks?
Re: Events system feedback thread
Posted: Saturday 20 July 2013 11:07
by SweetPants
CopyCatz wrote:Which browser? Do you have only one device starting with a G?
Tried latest Chrome and Firefox.
yes, there is only one device starting with 'G = Garage_Rookmelder', but I have 13 switches installed and they where working in previous releases of the Eventt system.
Re: Events system feedback thread
Posted: Saturday 20 July 2013 11:14
by CopyCatz
I know it was working before, I'm trying to determine why it isn't now... I was trying to help people with large dropdown lists who cant select the devices at the bottom, since blockly's dropdown lists are bugged which they havent been able to repair since it was reported in october last year. If anyone has a better idea please drop it here.
Re: Events system feedback thread
Posted: Saturday 20 July 2013 11:19
by mec
- Schermafbeelding 2013-07-20 om 11.17.37.png (164.44 KiB) Viewed 6422 times
- Schermafbeelding 2013-07-20 om 11.17.22.png (130.08 KiB) Viewed 6422 times
This is what is can get from the Safari Errorconsole
Re: Events system feedback thread
Posted: Saturday 20 July 2013 11:52
by SweetPants
I'm not an expert on this but Firebug says:
TypeError: c is undefined
http://domoticz:8080/js/blockly_compressed.js
Line 849
Looks like the same error as above
Re: Events system feedback thread
Posted: Saturday 20 July 2013 12:00
by Jochen
I got this error when i´m load a saved blockly-event
Re: Events system feedback thread
Posted: Saturday 20 July 2013 12:01
by SweetPants
I had that too. Re-creating the event solves the problem for me.
Re: Events system feedback thread
Posted: Saturday 20 July 2013 13:00
by CopyCatz
Yeah as stated in the release notes all events will have to be rebuilt unfortunately, remember this is all still beta until things are efficient and stable.
Re: Events system feedback thread
Posted: Saturday 20 July 2013 13:09
by CopyCatz
Fix for switchblocks not appearing is in 880. I'm having a discussion with gizmo about the groups (A-F, etc), he thinks they mean more searching/work. This is the best fix I could come up with, anyone have a better idea or knows svg enough to fix the stupid blockly dropdowns in their project?
Re: Events system feedback thread
Posted: Saturday 20 July 2013 13:24
by SweetPants
Great job, works again