dummy device (?) cannot trigger event

Moderator: leecollings

Post Reply
lumjajo
Posts: 67
Joined: Wednesday 26 April 2017 20:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: Germany
Contact:

dummy device (?) cannot trigger event

Post by lumjajo »

I have a blockly programming Topic.
I can ready RFID Tags wich will be sent to Domoticz. For this I created two dummy devices: 1 Counter and one Text device (in fact just for testing purpose of course)
For both, the Counter as well as the text Devie I can see the RFID Tag Number in Domotics, so this works perfectly.

If I am programming a blockly like:

IF RFID = 12345
set Garagentor = on.

I also tried
IF RFID = "12345" [for the text dummy device only]
Set Garagentor = on

but both do not work.

By they way, on the callmonitor form Fritzbox, I can also see a Phone number, but if I try to Programm something like:

If Callmonitor = 01771234567
set Lamp = on.

absolutely nothing happens, although the phone number will be displayed in Domoticz.

Is it not possible to work in Blockly with the value submitted? Do I Need to Programm in Lua instead?

Many thanks for a short hint...
niceandeasy
Posts: 102
Joined: Thursday 28 January 2016 22:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: NL
Contact:

Re: dummy device (?) cannot trigger event

Post by niceandeasy »

First: Blockly (and also LUA) will probably only trigger on changes of the RFID.
So, the code that sends the RFID tags to the Domoticz dummy switches should send the tag number and a trigger, for example, an On to a dummy pushbutton.
The blockly should look like: IF RFIDtrigger=On AND RFID=12345 DO set Garagentor=On.

If this doesn't work, then maybe the Blockly text device checking is buggy. Try to do it with a uservariable, instead. If you like to have the output in a text device, the code that sends the RFID tags to Domoticz should send the code to the uservariable and to the textbox.

I hope this helps.
lumjajo
Posts: 67
Joined: Wednesday 26 April 2017 20:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: Germany
Contact:

Re: dummy device (?) cannot trigger event

Post by lumjajo »

This are basically my thoughts on this, so I will try the next days.

The idea with the uservariables is the one I wanted to go for, but how can I get Domoticz to change the uservariables if a device (like the RFID Dummy) gets a new Information (RFID TAG). Do I need to make a blockly event like : if (something happens) set (uservariable) = (RFID_Garage). But then I do not know what is the trigger (something happens) should be.

I know those questiosn are pretty basic, but I just cant get it working, although the hardware, like RFID Reader, the ESP8266 the Wiegand Protocol and the transmission of the TAG ID works like a charm.

I also try to do it in a LUA script, which should be two lines or so, but as a I am no expert, it also will take some time.

Anyway I keep you informed so many thanks so far.
lumjajo
Posts: 67
Joined: Wednesday 26 April 2017 20:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: Germany
Contact:

Re: dummy device (?) cannot trigger event

Post by lumjajo »

First of all i need to tell you that its really hard to log on to this forum.
The captchss are quite time consuming and I do not know why but every other time it does not recognize my PW.

Anyway, I found out Utilities cannot trigger set blocks, which means with Blockly you cannot use Utilities for anything else than sending messages, right.
So in Lua it works, its not so handy but anyway, I will do my best to get to what I want.
Many thanks for the patience so far.
markjgabb
Posts: 142
Joined: Tuesday 24 January 2017 23:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Australia
Contact:

Re: dummy device (?) cannot trigger event

Post by markjgabb »

this seems similar to an issue i have where a dummy temprature sensor also cannot trigger a blocky either....
i have a t/h sensor that is split using a script into two seperate dummy sensors, and neither of them can launch blocky either
V 2020.2 RPI 3
RFlink 334 mhz
mysensors
broadlink
Mirabella Genio Globes
niceandeasy
Posts: 102
Joined: Thursday 28 January 2016 22:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: NL
Contact:

Re: dummy device (?) cannot trigger event

Post by niceandeasy »

So, in LUA it works. That is indeed very useful, if you're not able to change the code that takes the RFID code to the text sensor.
You'll get used to LUA. It will be worth the effort learning it. It can do much more and it is not so buggy.
Just keep in mind that all of it is event-driven and have the Domoticz Events wiki open while programming LUA. And the online LUA reference manual, of course.
mitkodotcom
Posts: 6
Joined: Thursday 14 September 2017 17:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dummy device (?) cannot trigger event

Post by mitkodotcom »

BTW, the new event system dzVents ("next generation Lua") also does not work with virtual sensors. We are stuck to Lua
lumjajo
Posts: 67
Joined: Wednesday 26 April 2017 20:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: Germany
Contact:

Re: dummy device (?) cannot trigger event

Post by lumjajo »

Sorry for my late reply.
As the RFID Tag Number is submitted by an EASYESP to Domoticz, I just made a rule in the EasyESP to trigger an json event through Domoticz. This works so far.
However, I need to learn LUA, thats what i found out. Thanks for the support.;-)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests