dummy device (?) cannot trigger event

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

dummy device (?) cannot trigger event

Post by lumjajo » Monday 07 August 2017 13:45

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: 146
Joined: Thursday 28 January 2016 23:25
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: NL
Contact:

Re: dummy device (?) cannot trigger event

Post by niceandeasy » Tuesday 08 August 2017 0:46

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: 6
Joined: Wednesday 26 April 2017 20:09
Target OS: Raspberry Pi
Domoticz version:
Location: Germany
Contact:

Re: dummy device (?) cannot trigger event

Post by lumjajo » Tuesday 08 August 2017 9:46

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: 6
Joined: Wednesday 26 April 2017 20:09
Target OS: Raspberry Pi
Domoticz version:
Location: Germany
Contact:

Re: dummy device (?) cannot trigger event

Post by lumjajo » Tuesday 08 August 2017 20:16

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: 127
Joined: Wednesday 25 January 2017 0:00
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Australia
Contact:

Re: dummy device (?) cannot trigger event

Post by markjgabb » Wednesday 09 August 2017 1:30

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 3.8153 RPI 3
RFlink 334 mhz
mysensors
broadlink
wemo

niceandeasy
Posts: 146
Joined: Thursday 28 January 2016 23:25
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: NL
Contact:

Re: dummy device (?) cannot trigger event

Post by niceandeasy » Thursday 10 August 2017 0:21

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: 3
Joined: Thursday 14 September 2017 17:50
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: dummy device (?) cannot trigger event

Post by mitkodotcom » Sunday 01 October 2017 13:23

BTW, the new event system dzVents ("next generation Lua") also does not work with virtual sensors. We are stuck to Lua

lumjajo
Posts: 6
Joined: Wednesday 26 April 2017 20:09
Target OS: Raspberry Pi
Domoticz version:
Location: Germany
Contact:

Re: dummy device (?) cannot trigger event

Post by lumjajo » Tuesday 03 October 2017 18:27

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 2 guests