xoseperez / espurna

Home automation firmware for ESP8266-based devices
http://tinkerman.cat
GNU General Public License v3.0
2.99k stars 637 forks source link

Add support for calculating RFBridge codes #229

Open xoseperez opened 6 years ago

xoseperez commented 6 years ago

Originally reported by: 0xFelix (Bitbucket: 0xFelix, GitHub: 0xFelix)


As discussed in your blog, we should add support to calculate codes for 433MHz devices based on their protocol and known parameters instead of using the learning function which does not always work correctly.

I have looked up all protocols implemented by rfcontroljs [1], which should also be supported by the RFBridge. They are switch 14, 15, 16, 19, 2, 20, 22, 24, 26, 27, 28, 3, 30, 4, 5, 6, 7 and 8.

The basic parameters which determine if the RFBridge can support the protocol are: Exactly 3 different pulse lenghts (Short/Tlow, Long/Thigh, Sync/Tsyn) Exactly 50 pulses including the sync part (maybe less also supported when sending zeroes? We have 24bit for data excluding the sync part)

How should it be implemented in the webinterface with regard to the limited space in the flash? Maybe a dialog? Or similiar to the WiFi Config with a "..." button?

xoseperez commented 6 years ago

Original comment by 0xFelix (Bitbucket: 0xFelix, GitHub: 0xFelix):


Hi,

I think jQuery includes a dialog plugin by default But then again there are some plugins which seem to enhance jQuerys functionality like Bootstrap (too much bloat?) or this. Before I start modifying the RFBridge tab, maybe you better start first with your enhancements? I guess both of us working on it will lead to conflicts in the code.

xoseperez commented 6 years ago

Hi Adding a dialog could be interesting, not only for this feature but to add new features in the future or redo some parts of the web interface. I usually prefer to use an existing jQuery plugin but the requirement is that is should be as lightweight as possible. Then maybe a new button would make it popup so you caould configure the code. The buttons on the RFBridge tab will change since they are not working fine on mobile devices, but this is a different issue.