I'm working on infrared support for Tasmota.
They are using MQTT + JSON as control interface, thus not very good at processing long messages like raw timings (might even overflow buffer). Instead they integrated IRremoteESP8266 to do protocol package construct on the device (raw is still supported though).
JSON for sending IR look like these (grabbed from https://github.com/tasmota/docs/blob/master/docs/Codes-for-IR-Remotes.md):
{"Protocol":"SAMSUNG","Bits":32,"Data":"0xE0E040BF"}
{"Protocol":"NIKAI","Bits":24,"Data":"0xD5F2A","DataLSB":"0xB0FA54","Repeat":0}
{"Protocol":"PANASONIC","Bits":48,"Data":0x100BCBD}
{"Protocol":"SONY","Bits":12,"Data":"0xA50"}
{"Protocol":"NEC","Bits":32,"Data":"0x00FEA857"}
{"Protocol":"PANASONIC","Bits":48,"Data":"0x40040D00BCB1","DataLSB":"0x220B0003D8D","Repeat":0}
To achieve this, I come up with 2 paths:
- Make hatasmota lightweight proxy, do the complex type matching things on the
homeassistant repo side, my preferred solution
- Use
protocol_name = type(command).__name__-ish thing to do the matching in hatasmota, kind of dirty and I don't want depencency on infrared_protocols in hatasmota, but seems to more align with how currently esphome infrared integration works?
Also some work can be done in infrared_protocols to make such matching smoother and safer, love to hear your opinion.
I'm working on infrared support for Tasmota.
They are using MQTT + JSON as control interface, thus not very good at processing long messages like raw timings (might even overflow buffer). Instead they integrated IRremoteESP8266 to do protocol package construct on the device (raw is still supported though).
JSON for sending IR look like these (grabbed from https://github.com/tasmota/docs/blob/master/docs/Codes-for-IR-Remotes.md):
{"Protocol":"SAMSUNG","Bits":32,"Data":"0xE0E040BF"} {"Protocol":"NIKAI","Bits":24,"Data":"0xD5F2A","DataLSB":"0xB0FA54","Repeat":0} {"Protocol":"PANASONIC","Bits":48,"Data":0x100BCBD} {"Protocol":"SONY","Bits":12,"Data":"0xA50"} {"Protocol":"NEC","Bits":32,"Data":"0x00FEA857"} {"Protocol":"PANASONIC","Bits":48,"Data":"0x40040D00BCB1","DataLSB":"0x220B0003D8D","Repeat":0}To achieve this, I come up with 2 paths:
homeassistantrepo side, my preferred solutionprotocol_name = type(command).__name__-ish thing to do the matching inhatasmota, kind of dirty and I don't want depencency oninfrared_protocolsinhatasmota, but seems to more align with how currentlyesphomeinfrared integration works?Also some work can be done in
infrared_protocolsto make such matching smoother and safer, love to hear your opinion.