Page 1 of 1

dummy device (?) cannot trigger event

Posted: Monday 07 August 2017 13:45
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...

Re: dummy device (?) cannot trigger event

Posted: Tuesday 08 August 2017 0:46
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.

Re: dummy device (?) cannot trigger event

Posted: Tuesday 08 August 2017 9:46
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.

Re: dummy device (?) cannot trigger event

Posted: Tuesday 08 August 2017 20:16
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.

Re: dummy device (?) cannot trigger event

Posted: Wednesday 09 August 2017 1:30
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

Re: dummy device (?) cannot trigger event

Posted: Thursday 10 August 2017 0:21
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.

Re: dummy device (?) cannot trigger event

Posted: Sunday 01 October 2017 13:23
by mitkodotcom
BTW, the new event system dzVents ("next generation Lua") also does not work with virtual sensors. We are stuck to Lua

Re: dummy device (?) cannot trigger event

Posted: Tuesday 03 October 2017 18:27
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.;-)