You might want to make a short how to? I’m really not that familiar with arduino. Got it working but not sure what and how I did it
Hi
I’ve grabbed the new code and had a look. The “home/sensors/ir” MQTT feed now relays the transmitted IR code which is great. However when I used this feed as my state loop my switch seems to turn off for a second and then bounce back to on. I suspect this is due to both states (on/off) being triggered by the same payload value (the same IR code).
I might try using a if then else statement to publish back either a On or Off to designate the two states.
e.g.
if (signalSent == true && String(state) == “Off”){
char state[] = “On”;
trc("State changed to " + String(state));
boolean result = client.publish(subjectGTWIRtoMQTT, state); //datacallback);
if (result)trc(F(“Acknowedgement of reception published”));
} else if (signalSent == true && String(state) == “On”){
char state[] = “Off”;
trc("State changed to " + String(state));
boolean result = client.publish(subjectGTWIRtoMQTT, state); //datacallback);
if (result)trc(F(“Acknowedgement of reception published”));
}else{
trc(“State un-changed”);
trc(state);
}
if (result)trc(F(“Acknowedgement of reception published”));
}
Unfortunately my state variable stays as a constant and never changes (char state[] = ‘Off’), I think its cause the PubSub library publish function wants a constant char value as the message.
Hello,
Have you seen this wiki?
Hello,
Indeed as it is the same code for on and off i’m not sure this new acknowledgement function is usefull in this case, optimistic : true could be a bypass before finding another way.
i saw this wiki but couldnt figure out exactly how to change the files . a step by step would be great though …
Hello,
I have a request on the openmqttgateway github.
Asking to be compatible with homie convention
I’m investigating time on this but before going further i would like to know the degree of compatibility with home assistant.
My main concern is about the fact that several mqtt payload must be sent in case one needs to send a rf signal with some particular parameters.
Currently if you want to send a signal with a special protocol or pulselength you set it into the topic:
home/MQTTto433/433_1/PLSL_360 123456
In one mqtt message we are able to send 123456 and other parameters.
With the homie convention we will have to publish 3 messages:
homie/openmqttgateway/rf-send/plsl/set 360
homie/openmqttgateway/rf-send/protocol/set 1
homie/openmqttgateway/rf-send/set 123456
I would like to have your thoughts on that, can this example be implemented easily into home assistant ?
Hello,
Just added publication of advanced IR data to MQTT, now it will be easier to identify the protocol of the remote control.
home/sensors/ir 875849879
home/IRtoMQTTAdvanced Value 875849879 Bit 32 Protocol 7
The number returned by the gateway correspond to the position of the protocol in the enum decode_type_t of this file begining at RC5=1
In the case above it is a samsung one
Hello @1technophile im getting below error when compiling in IDE
WARNING: Spurious .github folder in 'Adafruit NeoPixel' library
C:\Users\Ashfaq\Downloads\OpenMQTTGateway-master\OpenMQTTGateway-master\OpenMQTTGateway\OpenMQTTGateway.ino: In function 'void receivingMQTT(char*, char*)':
OpenMQTTGateway:349: error: 'class IRsend' has no member named 'sendCOOLIX'
irsend.sendCOOLIX(data, 24);
^
OpenMQTTGateway:362: error: 'class IRsend' has no member named 'sendLG'
irsend.sendLG(data, 28);
^
exit status 1
'class IRsend' has no member named 'sendCOOLIX'
will you please help me?
Hello,
Please check the arduino ide version that you are using and library versions, in particular irremote for esp8266, you should have the last ones available.
Regards
it worked thanks. I’m using IR part what I’m trying to do is if my roommate turns off AC from remote then HA to turn it back ON. I tried reading the OFF button on Ac remote the numbers which I get is not same… it will be different every read. Anyway, I can do this automation?
Did you check the info published into ir advanced topic?
You should have the protocol also into this topic, when it is equal to -1 don’t take into account the value given.
Regarding your automation it should be possible but i let the ha expert answer your question.
The program is now able to remove duplicates even if you have several gateways installation, here is how it works
hi even in advance value it won’t be same every time. is there anything I need to change in user config to make it same value everytime?
this is what i receive
local/home/IRtoMQTTAdvanced Value 1234563567 Bit 32 Protocol -1
local/home/sensors/ir 1234563567
local/home/IRtoMQTTAdvanced Value 8275 Bit 16 Protocol 6
local/home/sensors/ir 8275
local/home/IRtoMQTTAdvanced Value 676528128 Bit 32 Protocol 3
local/home/sensors/ir 676528128
local/home/IRtoMQTTAdvanced Value 542310400 Bit 32 Protocol 3
nop nothing to change, you can exclude the first two lines.
What is the brand of your device?
its called classic ultra plus… even tried with set top box remote and pioneer car stereo remote it won’t be same.
Protocol 6 correspond to JVC
Protocol 3 to NEC which is the most common that I have seen.
Here is some ideas:
-put a normal led in place of your IR led and check if it light on when sending
-verify your wire and voltage with a multimeter
-try first with some basic device like your tv or hifi
Can anybody point me to more information on how to add libraries for IR devices that aren’t supported out of the box? I guess it probably has to do with the IRRemoteESP8266 library, but since this is such an active thread I thought I’d ask here I have an Arcadyan HMB2260 set top box from my interactive TV provider for which I found a LIRC file, I would very much like to integrate this in the OpenMQTTGateway and HA.
Today I’ve successfully installed an OpenMQTTGateway setup, everything’s working fine now but couldn’t have done it without all the information that is shared here so thanks all! And especially @1technophile for all the work so far, great job!
Hello @michielrutjes,
Thanks for the feedback, regarding the OpenMQTTGateway setup I would like to know what did you found on this thread in particular? So as to add is on the wiki and avoid other user to lose some time.
About your IR device did you try to see if your remote control appear as an unknown procotol by setting into user_config.h #define pubIRunknownPrtcl true
instead of false
If you see some value with that you can try to reproduce these values with different protocols (I will begin with the default one NEC and try others.
Hey @1technophile,
During the installation and setup I encountered some errors which I was able to resolve by searching this topic. I’m not exactly sure what the specific errors were, but I could find them just by searching this topic or the exact error
If there was anything I would like to be added to the wiki it is information on adding other/custom devices. Maybe I haven’t looked hard enough, but I couldn’t find the solution you proposed and I think it’s very useful information.
But mostly thanks for your reply, I’m going to try your solution and see if it works!
Edit: Tried it, but it doesn’t work unfortunately… Any other approaches you can suggest?
Hello,
Could you try the IRremote ESP8266 example IRrecvDumpV2.ino alone and check if you see something?