Events system thread (questions and feedback)

Must be cleaned all topics go to the right subforum
User avatar
Leeuwerik
Posts: 3
Joined: Friday 05 June 2015 14:02
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Events system thread (questions and feedback)

Postby Leeuwerik » Friday 18 December 2015 23:44

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.

User avatar
epierre
Posts: 726
Joined: Wednesday 05 March 2014 14:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: Events system thread (questions and feedback)

Postby epierre » Tuesday 02 February 2016 10:12

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 ?
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter

User avatar
epierre
Posts: 726
Joined: Wednesday 05 March 2014 14:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: Events system thread (questions and feedback)

Postby epierre » Tuesday 02 February 2016 11:07

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'])
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter

Eloque
Posts: 41
Joined: Monday 05 January 2015 13:55
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Events system thread (questions and feedback)

Postby Eloque » Sunday 21 February 2016 1:35

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
event.png (13.64 KiB) Viewed 1219 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?

Jan Jansen
Posts: 103
Joined: Wednesday 30 April 2014 20:27
Target OS: Raspberry Pi
Domoticz version: V3.5837
Location: The Netherlands
Contact:

Re: Events system thread (questions and feedback)

Postby Jan Jansen » Sunday 21 February 2016 16:22

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
Knipsel 1.PNG (73.06 KiB) Viewed 1211 times


I want to use user variable "Season" , no success! The following event will not work.

Knipsel 3.PNG
Knipsel 3.PNG (30.34 KiB) Viewed 1211 times


1. What am I doing wrong?
2. I saw the next block:
Knipsel 4.PNG
Knipsel 4.PNG (2.42 KiB) Viewed 1211 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.

schroedinger
Posts: 1
Joined: Wednesday 23 March 2016 23:58
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Events system thread (questions and feedback)

Postby schroedinger » Thursday 05 May 2016 13:18

Hi,

I try to use a Pushover event with Blocky.
The following Blocky is not working.
notify.JPG
notify.JPG (31.69 KiB) Viewed 1063 times


But when I change the "notify" into a switch command it works well...
Any suggestions?

thanks

User avatar
gizmocuz
Posts: 8117
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi
Domoticz version: beta
Location: Top of the world
Contact:

Re: Events system thread (questions and feedback)

Postby gizmocuz » Thursday 05 May 2016 13:26

Can you try with 'High priority'
Quality outlives Quantity!

tozzke
Posts: 97
Joined: Friday 02 January 2015 10:22
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Events system thread (questions and feedback)

Postby tozzke » Friday 12 August 2016 3:44

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 https://www.domoticz.com/forum/viewtopi ... ter#p75008
This place seems better.


Image
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 :)

Jan Jansen
Posts: 103
Joined: Wednesday 30 April 2014 20:27
Target OS: Raspberry Pi
Domoticz version: V3.5837
Location: The Netherlands
Contact:

Re: Events system thread (questions and feedback)

Postby Jan Jansen » Saturday 13 August 2016 15:36

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 .

HBrandt
Posts: 8
Joined: Tuesday 15 November 2016 23:54
Target OS: -
Domoticz version:
Contact:

Re: Events system thread (questions and feedback)

Postby HBrandt » Thursday 17 November 2016 13:47

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
Attachments
ControlEnter.PNG
ControlEnter.PNG (12.46 KiB) Viewed 479 times

jake
Posts: 186
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: RE: Re: Events system thread (questions and feedback)

Postby jake » Thursday 17 November 2016 20:14

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.

HBrandt
Posts: 8
Joined: Tuesday 15 November 2016 23:54
Target OS: -
Domoticz version:
Contact:

Re: Events system thread (questions and feedback)

Postby HBrandt » Thursday 17 November 2016 20:17

@jake thank you for confirming. Can you show an example just to be sure what you mean.

Mvh Henrik

jake
Posts: 186
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: Events system thread (questions and feedback)

Postby jake » Thursday 17 November 2016 20:31

No, I can't at the moment, but in the IF statement I use another trigger together with the variable in an AND.

HBrandt
Posts: 8
Joined: Tuesday 15 November 2016 23:54
Target OS: -
Domoticz version:
Contact:

Re: Events system thread (questions and feedback)

Postby HBrandt » Thursday 17 November 2016 22:07

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

User avatar
sisaenkov
Posts: 50
Joined: Friday 27 May 2016 7:21
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Moscow, Russia
Contact:

Re: RE: Re: Events system thread (questions and feedback)

Postby sisaenkov » Thursday 01 December 2016 13:22

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?

User avatar
gizmocuz
Posts: 8117
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi
Domoticz version: beta
Location: Top of the world
Contact:

Re: Events system thread (questions and feedback)

Postby gizmocuz » Thursday 01 December 2016 15:32

It is designed like this
Quality outlives Quantity!

User avatar
sisaenkov
Posts: 50
Joined: Friday 27 May 2016 7:21
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Moscow, Russia
Contact:

Re: Events system thread (questions and feedback)

Postby sisaenkov » Thursday 01 December 2016 17:56

gizmocuz wrote:It is designed like this

Is it possible to make only variable trigger for IF condition in future releases?

korniza
Posts: 180
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi
Domoticz version: V3.6028
Location: Greece
Contact:

Re: Events system thread (questions and feedback)

Postby korniza » Saturday 03 December 2016 19:29

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. :cry:
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?
Attachments
variable_domo.png
variable_domo.png (21.69 KiB) Viewed 325 times
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)

User avatar
sisaenkov
Posts: 50
Joined: Friday 27 May 2016 7:21
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Moscow, Russia
Contact:

Re: Events system thread (questions and feedback)

Postby sisaenkov » Saturday 03 December 2016 19:32

korniza wrote:Does anybody has this issue or is it only me?


Same on v3.5877 release.

korniza
Posts: 180
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi
Domoticz version: V3.6028
Location: Greece
Contact:

Re: Events system thread (questions and feedback)

Postby korniza » Saturday 03 December 2016 20:53

I really need it as I try to build an AI alarm system :(
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)


Return to “Scripts [cleaning in progress]”

Who is online

Users browsing this forum: No registered users and 1 guest