EspEasy sending binary code with pulse length, possible?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
hoeby
Normal user
Posts: 33
Joined: 19 Sep 2018, 21:03

EspEasy sending binary code with pulse length, possible?

#1 Post by hoeby » 16 Sep 2021, 17:54

I have multi espeasy device in use, and love how easy the work.

For a new project, i am hoping that espeasy could be the code to use.
What i am looking for, is that the espeasy can send a binary code.

This is the binary code [32bits] : 00110000101111001101010110010011
The PulseLength should be: 713 microseconds
Protocol = { 650, { 1, 10 }, { 1, 2 }, { 2, 1 }, false }, // protocol 2
I tested it with the rcswitch library on an arduino uno. There i got the protocol info.
With the above information, this works beautifull, but on the wrong environment

Is something also possible with espeasy?
I have searched, the kaku plugin looks close, but differend. I can do small code changes, but building a complete plugin is to much.

hoeby
Normal user
Posts: 33
Joined: 19 Sep 2018, 21:03

Re: EspEasy sending binary code with pulse length, possible?

#2 Post by hoeby » 17 Sep 2021, 15:13

Had to look better.
It looks like plugin 144 is made for this

https://github.com/letscontrolit/ESPEas ... tch-TX.ino

Only have to find out, how to get that plugin with espeasy.
There is a nice wiki, only never done that. But will do my best

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: EspEasy sending binary code with pulse length, possible?

#3 Post by Ath » 17 Sep 2021, 17:19

That plugin is on the ESPEasyPlayground, meaning it is not part of the regular ESPEasy release. Quality of that software is not known, but if you know how to compile your own ESPEasy (you should get the source from https://github.com/letscontrolit/ESPEasy, or fork it to your Github account) you could include it and confirm that it is working as intended.

Most likely it is 'single instance', as it is using a static object to control it, and the usual guards (#ifdef USES_Pxxx) isn't in place, so it actually does need a bit of work before it is ready for prime time.
/Ton (PayPal.me)

hoeby
Normal user
Posts: 33
Joined: 19 Sep 2018, 21:03

Re: EspEasy sending binary code with pulse length, possible?

#4 Post by hoeby » 18 Sep 2021, 14:30

After some compile challenges to get the plugin working.
I have another challenge.

De esp is build in a chime, to activate the chime.
The command is send by url http://IP-address/control?cmd=gpio,13,1
When doing this for the PC (chrom browser) it takes about 5 seconds, before the browser gets the 200 OK (with data).
When the OK is received in the browser, then the doorbell rings.
Is this something about the speed espeasy works? Or something in my network?
The strange thing is, if have some espeasy running (older firmware) and it looks like they respond much faster then 5 seconds.

As a test i programmed it, that the signal first goes to domoticz. And domoticz sends the trigger by mqtt the espeasy.
Now the chime rings in 1 second.

But i prefer, not to use the mqtt server for the doorbell

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: EspEasy sending binary code with pulse length, possible?

#5 Post by Ath » 18 Sep 2021, 19:08

hoeby wrote: 18 Sep 2021, 14:30 After some compile challenges to get the plugin working.
I have another challenge.
Your new challenge should have better been in a new topic, now it will hardly be findable once a response is given...

hoeby wrote: 18 Sep 2021, 14:30 De esp is build in a chime, to activate the chime.
The command is send by url http://IP-address/control?cmd=gpio,13,1
When doing this for the PC (chrom browser) it takes about 5 seconds, before the browser gets the 200 OK (with data).
When the OK is received in the browser, then the doorbell rings.
Is this something about the speed espeasy works? Or something in my network?
The strange thing is, if have some espeasy running (older firmware) and it looks like they respond much faster then 5 seconds.

As a test i programmed it, that the signal first goes to domoticz. And domoticz sends the trigger by mqtt the espeasy.
Now the chime rings in 1 second.

But i prefer, not to use the mqtt server for the doorbell
The fact that when using MQTT is much more responsive then using direct WiFi is a clear indication that your network connection to the ESP isn't working as nice as it should be.
So, check the RSSI value in the main tab or Info page of your ESP (values > 78 indicate a rather poor signal, and anything > 80 is a bad signal, lower is better for RSSI), relocate the ESP by rotating it for 90 degrees in several directions, to determine if the antenna is direction sensitive (it usually is), make sure no 'dampening' of the WiFi signal is in place, f.e. a metal casing or large metal objects or water (fish tank?) is in close proximity of the ESP.
MQTT is probably working because it tries to keep the channel open once it's connected, explaining why it can be relatively fast (though 1 second is still not very fast, for MQTT)
And there is no reason to dismiss MQTT as a protocol, as that is one of the most used protocols in IoT & home automation because of it's (relative) simplicity and speed, but while Domoticz doesn't natively support MQTT, it is very often used in combination with Mosquitto, and that combo is working great together.

And then there is the case that some ESP modules just have poor WiFi antennas, or are very sensitive to signal overload from its own transmitter (some NodeMCU clones and Wemos D1 Pro clones have built quite a bad reputation on this subject).
/Ton (PayPal.me)

hoeby
Normal user
Posts: 33
Joined: 19 Sep 2018, 21:03

Re: EspEasy sending binary code with pulse length, possible?

#6 Post by hoeby » 18 Sep 2021, 22:24

Sorry for not opening a new thread.
I didn't do that, to minimize all those small threads because of the lack of my knowledge.

It is a esp12f.
Wifi signal is -58
I wrote that mqtt was 1 second. But it is a lot faster. When I push the doorbell, the chime already plays sound before i release the button.

Tried rotating. But i only can rotate it 180 degree.
It is in a digital chime. +/- 1cm from a other pcb and 4cm from the 230vac build in power supply. Not an ideal environment, i know.

For now i let it working with mqtt. Need to keep my wife happy, that it rings when there is someone at the door.

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: EspEasy sending binary code with pulse length, possible?

#7 Post by Ath » 18 Sep 2021, 23:37

Sounds ( :lol: ) to be working great then.

Yes, happy wife, happy life :)
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests