IR Codes not Emitted

resolved

#1

I am unable to emit IR codes or raw. Therefore I tried another sketch with which I was able to emit NEC codes. I have set up openMQTTGateway on two boards. 1) to receive it is Wemos D1 Mivi V2.2 2) To Emit it is a Lolin Nodemcu v3. The receiver shows its output on MQTT when used with LG AC IR Remote and also the Nodemcu emitting with other programs. But not with OpenMQTTGateway Flashed. Since the other program was using D2 So I recompiled the OpenMQTTGateway to use the equivalant pin (changed emitter from 16 to 4). So what should I try next ?


#2

Could you post what you are publishing to mqtt and what you see in the serial monitor ?


#3

Thank You Very Much for your help.

I will try to upload a text file containing the required information:

I am Sorry I do not know how to toggle Bold Face on or off. Some parts are in Bold Face on their own. They ae not emphasised by me.

======================================================================
mounted file system
reading config file
opened config file
{“mqtt_server”:“192.168.1.49”,“mqtt_port”:“1883”,“mqtt_user”:“pi”,“mqtt_pass”:“xxxxxxxxxxxxxx”}
parsed json
*WM: Adding parameter
*WM: server
*WM: Adding parameter
*WM: port
*WM: Adding parameter
*WM: user
*WM: Adding parameter
*WM: pass
*WM:
*WM: AutoConnect
*WM: Connecting as wifi client…
*WM: Using last saved values, should be faster
*WM: Connection result:
*WM: 3
*WM: IP Address:
*WM: 192.168.1.129
connected…yeey :slight_smile:
saving config
{“mqtt_server”:“192.168.1.49”,“mqtt_port”:“1883”,“mqtt_user”:“pi”,“mqtt_pass”:“xxxxxxxxxxxx”}*WM: freeing allocated params!
OpenMQTTGateway mac:
84:F3:EB:53:1F:0B
OpenMQTTGateway ip:
2164369600
1883
Connecting to MQTT by IP adress
192.168.1.49
IR_EMITTER_PIN
4
IR_RECEIVER_PIN
2
ZgatewayIR setup done
MQTT connection…
Connected to broker
Subscription OK to the subjects
Remaining memory
42784
Remaining memory
42784

Command 1:

mosquitto_pub -u pi -P xxxxxxxxxx -t ranoX/OpenMQTTGatewayX/commands/IR_RAW -m “8572,4268,572,1652,544,560,544,560,544,562,542,1658,574,530,544,560,544,560,544,1658,576,1626,544,560,574,530,544,560,544,560,544,560,574,532,544,560,544,560,544,560,544,560,544,560,544,1658,574,530,544,1658,544,560,544,560,544,560,574,1628,544”

MQTT Response 1:

ranoX/OpenMQTTGatewayX/commands/IR_RAW 8572,4268,572,1652,544,560,544,560,544,562,542,1658,574,530,544,560,544,560,544,1658,576,1626,544,560,574,530,544,560,544,560,544,560,574,532,544,560,544,560,544,560,544,560,544,560,544,1658,574,530,544,1658,544,560,544,560,544,560,574,1628,544

Serial Output 1:

Hey I got a callback
8572,4268,572,1652,544,560,544,560,544,562,542,1658,574,530,544,560,544,560,544,1658,576,1626,544,560,574,530,544,560,544,560,544,560,574,532,544,560,544,560,544,560,544,560,544,560,544,1658,574,530,544,1658,544,560,544,560,544,560,574,1628,544
Remaining memory
42784

======================================================================

Command2:

mosquitto_pub -u pi -P xxxxxxxxxx -t ranoX/OpenMQTTGatewayX/commands/IR_LG -m “143392849”

MQTT Response 2:

ranoX/OpenMQTTGatewayX/commands/IR_LG 143392849
ranoX/OpenMQTTGatewayX/IRtoMQTT 143392849

Serial response 2:

Hey I got a callback
143392849
MQTTtoIR ack pub.

======================================================================

Command 3:

mosquitto_pub -u pi -P xxxxxxxxxxxx -t ranoX/OpenMQTTGatewayX/commands/IR_LG/IR_BITS28 -m “143392849”

MQTT Response 3:

ranoX/OpenMQTTGatewayX/commands/IR_LG/IR_BITS28 143392849
ranoX/OpenMQTTGatewayX/IRtoMQTT 143392849

Serial Response 3"

Hey I got a callback
143392849
MQTTtoIR ack pub.

======================================================================

Command 4:

mosquitto_pub -u pi -P xxxxxxxxxx -t ranoX/OpenMQTTGatewayX/commands/IR_LG/IR_BITS_28/RPT_4 -m “143392849”

MQTT Response 4:

ranoX/OpenMQTTGatewayX/commands/IR_LG/IR_BITS_28/RPT_4 143392849
ranoX/OpenMQTTGatewayX/IRtoMQTT 143392849

Serial Response 4:

42640
Hey I got a callback
143392849
IR repeat:
4
MQTTtoIR ack pub.


#4

Did you modified pubsubclient.h to handle raw code ?
Modifying max packet size to 512 or 1024 ?


#5

Thank you very much once again.

I had the problem because of using two boards.

Each one constructed the MQTT topic based on their own Hostname.

Consequently I was publishing and subscribing to different topics.

So this issue is resolved.

Regards.

PS. Now the issue is of IR Receiver working only at a very short distance. Can you please direct me to the appropriate topic or forum ?


#6

Great,

Are you sure it is an issue with the receiver and not your emitter ?
I ve never heard about ir distance receiving issues ?


#7

There is no problem with the receiver. It is picking up and publishing all signals anywhere in the room.

However with the Nodemcu OpenMQTTGateway the receiver needs to be very close.

I am also looking at transistor and resistance specifications.

If there is a forum or topic that is helpful, do point me to it.

Regards.


#8

Hmmm this is what i was saying no ; -)

Did you checked the schematic in the wiki and the associatives specifications for the ir components ?


#9

OK.
Thanks.
Regards.