1technophile / OpenMQTTGateway

MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility & LoRa.
https://docs.openmqttgateway.com
GNU General Public License v3.0
3.57k stars 786 forks source link

Problems with Sony IR #38

Closed phlash13 closed 7 years ago

phlash13 commented 7 years ago

I had to change the following code in "ZGatewayIR.ino" from if (strstr(topicOri, "IR_Sony") != NULL){ irsend.sendSony(data, 12); signalSent = true;

to

if (strstr(topicOri, "IR_Sony") != NULL){ irsend.sendSony(data, 15, 3); signalSent = true;

Because my Sony AVR relies on having IR signals repeated 3 times (this is the last parameter...) and uses 15bit signals...

Maybe you could generalize the function a bit more, or is there a way to tell how many repetitions and which bit-length to use via MQTT?

1technophile commented 7 years ago

there is not at this time, but it's a good idea I will add it

wolass commented 7 years ago

This actually is an issue in the IRremote library rather than openMQTTGateway see this issue: https://github.com/markszabo/IRremoteESP8266/issues/124

phlash13 commented 7 years ago

This was an issue with IRremote, and as you can see from my example it works with the additional parameter (which isn't used by openMQTTGateway...)! In addition to that openMQTTGateway uses fixed bit lengths which also isn't that great...

wolass commented 7 years ago

U R right @phlash13.

1technophile commented 7 years ago

Added: https://github.com/1technophile/OpenMQTTGateway/wiki/User-guide-IR#send-data-by-mqtt-with-advanced-ir-parameters

Waiting for your feedback

1technophile commented 7 years ago

@phlash13 could you close the issue if it is OK for you