Page 15 of 16
Re: Events system thread (questions and feedback)
Posted: Friday 18 December 2015 22:44
by Leeuwerik
Could be, but that can only be confirmed by someone who knows the blockly specs and implementation.
Facts are:
- The multisensor device triggered the blockly event
- The value that must be assigned to the user variable in the block points to the Humidity value ("73"- 2nd position in the string), not to the device string that contains 3 values ("20.0;73;3")
- The assignment of the Temperature value "20.0 "to the user variable of type float in a similar blockly completes without errors.
Since the multisensor device triggered the event, I would expect that the blockly implementation uses something like devicechanged['devicename_Humidity'] instead of otherdevices[...]. My expectation is based on what I've read in the
events documumentation.
Re: Events system thread (questions and feedback)
Posted: Tuesday 02 February 2016 9:12
by epierre
epierre wrote:Hello,
Is there a way to read the CO2 value ? otherdevices and _svalues does not report anything...
And more globally is it possible to have an otherdevices_nvalues[] in LUA so we could get all devices values with one or the other ?
thanks !
Hello,
I repost my question for this is still not solved, any idea ?
Re: Events system thread (questions and feedback)
Posted: Tuesday 02 February 2016 10:07
by epierre
epierre wrote:
Hello,
I repost my question for this is still not solved, any idea ?
ok found in the code, I guess the wiki has to be updated:
print(devicechanged['AqCO2_Utility'])
print(otherdevices_utility['AqCO2_Utility'])
Re: Events system thread (questions and feedback)
Posted: Sunday 21 February 2016 0:35
by Eloque
I am reposting this here, since in the original post, no comments were made after a few days, perhaps that was in the wrong spot;
My Smartwares radiator valves that I am using, don't show up in blocky. I mean, they are listed, but only as switches or utility, and in an event they do not update. So, I have this very simple event;

- event.png (13.64 KiB) Viewed 11149 times
But although it triggers, it never changes the value of the smartware valve. If I set it manually via the utility tab in the web interface, it works just fine. Is this something I am doing wrong? Should the valve be available as radiator?
Re: Events system thread (questions and feedback)
Posted: Sunday 21 February 2016 15:22
by Jan Jansen
Hi all,
For the first time I faced a limitation of blockly.
Using the wiki and an article in Computer Totaal I managed to create the following user variables:

- Knipsel 1.PNG (73.06 KiB) Viewed 11141 times
I want to use user variable "Season" , no success! The following event will not work.

- Knipsel 3.PNG (30.34 KiB) Viewed 11141 times
1. What am I doing wrong?
2. I saw the next block:

- Knipsel 4.PNG (2.42 KiB) Viewed 11141 times
It would be nice if there is a similar block for season.
Thanks in advance!
PS: Yesterday I posted a similar post in
viewtopic.php?f=23&t=7518&p=75842&hilit=winter#p75008
This place seems better.
Re: Events system thread (questions and feedback)
Posted: Thursday 05 May 2016 13:18
by schroedinger
Hi,
I try to use a Pushover event with Blocky.
The following Blocky is not working.

- notify.JPG (31.69 KiB) Viewed 10993 times
But when I change the "notify" into a switch command it works well...
Any suggestions?
thanks
Re: Events system thread (questions and feedback)
Posted: Thursday 05 May 2016 13:26
by gizmocuz
Can you try with 'High priority'
Re: Events system thread (questions and feedback)
Posted: Friday 12 August 2016 3:44
by tozzke
Jan Jansen wrote:Hi all,
For the first time I faced a limitation of blockly.
Using the wiki and an article in Computer Totaal I managed to create the following user variables:
Knipsel 1.PNG
I want to use user variable "Season" , no success! The following event will not work.
Knipsel 3.PNG
1. What am I doing wrong?
2. I saw the next block: Knipsel 4.PNG
It would be nice if there is a similar block for season.
Thanks in advance!
PS: Yesterday I posted a similar post in
viewtopic.php?f=23&t=7518&p=75842&hilit=winter#p75008
This place seems better.

I use this selector switch for this which I set with this lua script:
Code: Select all
-- script_time_seizoenen.lua
-- Dit script verandert de waarde van de keuzeschakelaar/selector 'Seizoen' naar het huidige seizoen
-- Lente, Zomer, Herfst en Winter
-- De seizoenen verlopen als volgt:
-- Lente (level 10): 21 maart t/m 20 juni
-- Zomer (level 20): 21 juni t/m 20 september
-- Herfst (level 30): 21 september t/m 20 december
-- Winter (level 40): 21 december t/m 20 maart
-- Het script wordt elke minuut aangeroepen maar triggert alleen op de 21e van Maart, Juni, September en December of als de keuzeschakelaar/selector 'Seizoen' niet het goede seizoen blijkt aan te geven (in geval deze handmatig veranderd is)
local seizoen_schakelaar = 'Seizoen'
local seizoen_lente = 'Set Level: 10'
local seizoen_zomer = 'Set Level: 20'
local seizoen_herfst = 'Set Level: 30'
local seizoen_winter = 'Set Level: 40'
commandArray = {}
time = os.time()
month = tonumber(os.date('%m', time))
day = tonumber(os.date('%d', time))
if (((month == 03 and day >= 21) or (month == 04 and day >= 01) or (month == 05 and day >= 01) or (month == 06 and day < 21)) and otherdevices[seizoen_schakelaar] ~= 'Lente')
then
commandArray[seizoen_schakelaar]=seizoen_lente
print('<font color="green">Het seizoen is veranderd, het is nu lente</font>')
elseif (((month == 06 and day >= 21) or (month == 07 and day >= 01) or (month == 08 and day >= 01) or (month == 09 and day < 21)) and otherdevices[seizoen_schakelaar] ~= 'Zomer')
then
commandArray[seizoen_schakelaar]=seizoen_zomer
print('<font color="green">Het seizoen is veranderd, het is nu zomer</font>')
elseif (((month == 09 and day >= 21) or (month == 10 and day >= 01) or (month == 11 and day >= 01) or (month == 12 and day < 21)) and otherdevices[seizoen_schakelaar] ~= 'Herfst')
then
commandArray[seizoen_schakelaar]=seizoen_herfst
print('<font color="green">Het seizoen is veranderd, het is nu herfst</font>')
elseif ((month == 12 and day >= 21) or ((month == 01 and day >= 01) or (month == 2 and day >= 1) or (month == 03 and day < 21)) and otherdevices[seizoen_schakelaar] ~= 'Winter')
then
commandArray[seizoen_schakelaar]=seizoen_winter
print('<font color="green">Het seizoen is veranderd, het is nu winter</font>')
end
return commandArray
perhaps this helps

Re: Events system thread (questions and feedback)
Posted: Saturday 13 August 2016 15:36
by Jan Jansen
Hi Tozzke,
Thanks for your attention. I already found a similar solution. I am interested in the icon that you use. Maybe you have even more in the same style .
Re: Events system thread (questions and feedback)
Posted: Thursday 17 November 2016 12:47
by HBrandt
Can it be confirmed that it is not possible to read the value of a variable in blockly? and do an action based on that?
Tried this without luck, but on the variable page I can see that the variable (integer) value changes between 0 and 1
Re: RE: Re: Events system thread (questions and feedback)
Posted: Thursday 17 November 2016 19:14
by jake
HBrandt wrote:Can it be confirmed that it is not possible to read the value of a variable in blockly? and do an action based on that?
Tried this without luck, but on the variable page I can see that the variable (integer) value changes between 0 and 1
You can read the variable, but it won't be a trigger for blockly. I always use the variable as a double check in an AND situation.
Re: Events system thread (questions and feedback)
Posted: Thursday 17 November 2016 19:17
by HBrandt
@jake thank you for confirming. Can you show an example just to be sure what you mean.
Mvh Henrik
Re: Events system thread (questions and feedback)
Posted: Thursday 17 November 2016 19:31
by jake
No, I can't at the moment, but in the IF statement I use another trigger together with the variable in an AND.
Re: Events system thread (questions and feedback)
Posted: Thursday 17 November 2016 21:07
by HBrandt
Weird, I have tried that but doesn't seem to work on my system. Maybe virtual switches is the way to do it. Although I feel that is the wrong way and messy too.
Mvh Henrik
Re: RE: Re: Events system thread (questions and feedback)
Posted: Thursday 01 December 2016 12:22
by sisaenkov
jake wrote:You can read the variable, but it won't be a trigger for blockly. I always use the variable as a double check in an AND situation.
Is it bug or feature?
Re: Events system thread (questions and feedback)
Posted: Thursday 01 December 2016 14:32
by gizmocuz
It is designed like this
Re: Events system thread (questions and feedback)
Posted: Thursday 01 December 2016 16:56
by sisaenkov
gizmocuz wrote:It is designed like this
Is it possible to make only variable trigger for IF condition in future releases?
Re: Events system thread (questions and feedback)
Posted: Saturday 03 December 2016 18:29
by korniza
Strange situation I found on the latests betas. Now I run Version: 3.6028 Build Hash: 4a938fc but I found it on 2 previous beta versions.
When I have a variable on blocky, it did not trigger this blocky when variable is changes. I tried to change by hand this variable on User Variables and worked as should be and this blocky was triggered.
But when it is performed by domoticz, nothing happen.
I tested also to change the way that blocky is triggered (All/device/uservariable), but it's still no action.
Does anybody has this issue or is it only me?
Re: Events system thread (questions and feedback)
Posted: Saturday 03 December 2016 18:32
by sisaenkov
korniza wrote:Does anybody has this issue or is it only me?
Same on v3.5877 release.
Re: Events system thread (questions and feedback)
Posted: Saturday 03 December 2016 19:53
by korniza
I really need it as I try to build an AI alarm system
