Hi folks,
I want to control my garage doors with 2 ESP01 and an RFID with another ESP01.
The setup basically works but not reliably, esp. the triggering of the event.
So there is an ESP01 which collects the RFID TAG information from the terminal. => works perfectly
Based on the RFID Tag number it sends a command to another ESP01 to open the door. (Via Rules)
SendTo,10,"event,rechts"
UPD Port is configured, both ESPs are visible to each other.
"rechts" is obviously the event which opens the right garage door at the ESP with unit number 10
So this works ..sometimes, sometimes not. sometimes it needs several attempts to work. Looking at the log file the RFID Tag was always identified correctly and the command was sent.
Is there a delay on sending via UPD? As it is mainly used for sensor data, maybe I should use the Sendtohttp instead?
As I am using domoticz, it is also possible to make a script in Domoticz, but I wanted to avoid it so far...
Any suggestions?
use of sendto , sendtoudp or sendtohttp
Moderators: grovkillen, Stuntteam, TD-er
Re: use of sendto , sendtoudp or sendtohttp
As SendTo and SendToUDP are using UDP for transport, where messages are not guaranteed to arrive at the destination, it's 'fire and forget'.
To try and solve this you could switch to using SendToHTTP (with adjusted arguments) and probably enable 'SendToHTTP wait for ack:' on Tools/Advanced page. SendToHTTP uses TCP.
To try and solve this you could switch to using SendToHTTP (with adjusted arguments) and probably enable 'SendToHTTP wait for ack:' on Tools/Advanced page. SendToHTTP uses TCP.
/Ton (PayPal.me)
Re: use of sendto , sendtoudp or sendtohttp
What Ton means is you have to try to call the "command" URL of the other ESP.
To get the full url, try to run the event command first on the ESP via the command field on the Tools page.
This will cause a reload of the page with the full command encoded in the URL.
You can use this URL in the sendtohttp command, by stripping away the host part (starting at the first / after the host in the URL)
And don't forget to use the port (80) in the sendtohttp command.
See: https://espeasy.readthedocs.io/en/lates ... sendtohttp
To get the full url, try to run the event command first on the ESP via the command field on the Tools page.
This will cause a reload of the page with the full command encoded in the URL.
You can use this URL in the sendtohttp command, by stripping away the host part (starting at the first / after the host in the URL)
And don't forget to use the port (80) in the sendtohttp command.
See: https://espeasy.readthedocs.io/en/lates ... sendtohttp
Re: use of sendto , sendtoudp or sendtohttp
Thanks for your help.
Sendtohttp works fine, but it did not on the first run, but has nothing to do with this rule.
The problem seemed to be the following:
I used the RFID Wiegand input for quite a while with a very old build. (R147) It never worked good, and the ESP01 did not work after a few days.
No I was using the newest release and I could configure more options.
No using the RFID only worked if the Tag was recognized first. not afterwards. So i had to enable the automatic Tag removal. Then it worked perfectly.
I assume now that this is the reason why the SendtoUDP or Sendto did not work either. However, as the http (with ackn) now works, no reason to change.
I found this after looking at the log file and the protocol of Domoticz...
this is the syntax that worked for me:
SendToHTTP 192.168.6.140,80,"/control?cmd=event,rechts"
I have used as much events in the rules as I have Tags. but would something like:
if [RFID#Tag] = xxxxxxx,yyyyyyyy
possible?
or do i need to make OR statements or simply, as I do it now, for each Tag # a new event?
Sendtohttp works fine, but it did not on the first run, but has nothing to do with this rule.
The problem seemed to be the following:
I used the RFID Wiegand input for quite a while with a very old build. (R147) It never worked good, and the ESP01 did not work after a few days.
No I was using the newest release and I could configure more options.
No using the RFID only worked if the Tag was recognized first. not afterwards. So i had to enable the automatic Tag removal. Then it worked perfectly.
I assume now that this is the reason why the SendtoUDP or Sendto did not work either. However, as the http (with ackn) now works, no reason to change.
I found this after looking at the log file and the protocol of Domoticz...
this is the syntax that worked for me:
SendToHTTP 192.168.6.140,80,"/control?cmd=event,rechts"
I have used as much events in the rules as I have Tags. but would something like:
if [RFID#Tag] = xxxxxxx,yyyyyyyy
possible?
or do i need to make OR statements or simply, as I do it now, for each Tag # a new event?
Re: use of sendto , sendtoudp or sendtohttp
Please use the %eventvalue% in the rules instead of looking at the task values [taskname#varname] syntax.
See: https://espeasy.readthedocs.io/en/lates ... eventvalue
See: https://espeasy.readthedocs.io/en/lates ... eventvalue
Who is online
Users browsing this forum: No registered users and 97 guests