Fehler bein senden von Infrarotdaten

Here we can discuss about the problem found
User avatar
Electroguard
Posts: 835
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 267 times
Been thanked: 317 times

Re: Fehler bein senden von Infrarotdaten

Post by Electroguard »

Hi,
It was a long time ago since I played around with Annex IR, but it did work for me back then.
So you might want to try using an old version of the firmware while you are waiting for an update, to see if that might work for you.

I seem to remember recording and transmitting raw IR data, and having a problem that it recorded exactly what was sent from the IR button press, which was often a string of repeat codes.
This gives a complication because many IR devices send an original code immediately followed by repeat codes which are different so that the receiver knows a button is accidentally held longer than it took to send the signal, rather than it being intentional held to repeatedly keep toggling something on and off.
So only the first code of a longer raw code may be valid, and IR equipment may ignore the rest if the original code is not recognised.
Therefore keep raw code recordings short by not holding the button too long.

I bought some cheap universal IR Learning remote controllers from ebay for about a fiver each.
The original intention was to 'learn' all the required IR codes from all the different remotes we used to make a single device for controlling everything.
That actually worked great.
It had multiple 'pages' so you could learn each of your remote controllers on a different IR 'page'.
But it also allowed integrating required features from different remotes all on one page, ie: we could control CCTV cameras, and also switch lights on and off, using some of the unused buttons of the TV page.
But I also noticed that the learning remote had a more sophisticated algorithm to allow it to cope with the many different IR controllers.
That meant it could record IR signals more accurately, recognise valid repeat codes, and emit just the correct IR code, rather than also including a string of accidental repeats.
So I used to teach IR signals to the Annex device from the learning remote rather than the original remote, cos it gave better results.


If you are creating an IR extender pair then you will have an Annex IR receiver sending a decoded data signal over the network to an Annex IR emitter.
You will be using an Annex device to receive IR codes, or emit IR codes, but not both on the same device because that would be pointless.

So a universal learning remote offers another advantage that you can teach it to recognise any code you choose, which is then decoded and sent via network to the IR emitter, BUT when the Annex device receives that code it can recognise the code and respond to it however you choose, which could be by emitting another completely different IR code.
The point is that if you have problems recording codes which need to be sent raw via the network, use an entirely different code that can be recognised without being sent raw, then just get the receiving Annex device to translate and emit the required code.


I don't know if this info below might be any use, its an IR monitor, but I haven't actually used it myself.
It's an appimage, which is a portable linux app that doesn't need installing.
And you can boot an MX linux ISO live on USB without needing to install it, then just run the IRscrutiniser appimage to examine IR codes.
It uses an arduino to read the IR codes and send them to the IRscrutiniser app via serial, which is not the end of the world, but perhaps Annex might be able to do the same job anyway. It could put your IR code under the microscope.

IrScrutinizer https://github.com/bengtmartensson/IrScrutinizer
IrScrutinizer Guide http://www.hifi-remote.com/wiki/index.p ... de#Arduino
IRScrutinizer APPimage https://www.appimagehub.com/p/1311155
arduino IR reader http://www.harctoolbox.org/arduino_nano.html
User avatar
Electroguard
Posts: 835
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 267 times
Been thanked: 317 times

Re: Fehler bein senden von Infrarotdaten

Post by Electroguard »

Here's an old IR Extender project I did a long time ago, which may have something that could be relevant...
https://sites.google.com/site/annexwifi ... --infrared

The section marked Script notes says that all the IR sensors I tried were prone to reporting spurious IR codes which had not actually occured.
So I had to include a way to filter out the wanted code from the unwanted noise.
Maybe you could hack out the relevant bit of script to see if it might help with your situation.

Script notes:
The same script is used as an IRsensor and/or an IRemitter, by selecting the appropriate IR.INIT instruction to enable the required hardware.

'ir.init 4,5 'uses IR detector on gpio4 input AND IR emitter on gpio5 output
ir.init 4 'uses IR detector only on gpio4, without any emitter
'ir.init 4 OFF,5 'IR detector is turned OFF, so is using just IR emitter only,

In the IRsensor: branch there is a commented 'wlog' line that can be uncommented to show all IR signals that the detector 'thinks' it has received.
Uncomment that line to display all received signals, then press your IR remote controllers buttons - it should become obvious what 'type' and 'bits' your genuine signals are, which will allow you to mask out just those types and bit lengths you are interested in on the line below it.
This was certainly necessary on the IR receivers I tried, which gave a continuous stream of unwanted spurious signals which could quickly flood the processing if not filtered out ... but the genuine signals were always hidden in amongst the noise. Didn't seem to make any difference whether they were powered from 3.3v or 5v, they still seemed to keep generating a busy stream of IR interrupts which can quickly fill up the Annex buffers.
Pull-up resistor did not help, either. So allow time for buffers to settle down after clicking STOP before attempting to do anything else.
I got into the habit of doing a Select All, then Copy, then doing a Reconnect, then Paste back contents, then Save.
Also slow the Retry timer to something more reasonable like 5000 (5 secs).

When able to filter out just the signals you are interested in, they can all be routed on to any waiting IRblaster receiving nodes...
Willi55
Posts: 21
Joined: Mon Apr 12, 2021 4:57 pm
Has thanked: 13 times
Been thanked: 1 time

Re: Fehler bein senden von Infrarotdaten

Post by Willi55 »

Vielen Dank für die Infos Electroguard.
Können Sie sich noch daran erinnern, mit welcher Version von Annex das Senden von IR-Daten funktioniert hat?

An CiccioCB
Das Senden mit einem ESP32 funktioniert tatsächlich. Meine Fehlermeldung für den ESP32 bezog sich nur auf den Speicherfehler.
Sorry, dass ich mich da etwas unklar ausgedrückt habe.
Beim ESP8266 habe ich allerdings immer noch die gleichen Sendeprobleme.
User avatar
Electroguard
Posts: 835
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 267 times
Been thanked: 317 times

Re: Fehler bein senden von Infrarotdaten

Post by Electroguard »

I've been including the version number in my scripts for a long time now, but the IR Extender doesn't state the version, so it must have been a very long time ago, and therefore be a very early version of Annex.
User avatar
cicciocb
Site Admin
Posts: 1889
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 405 times
Been thanked: 1260 times
Contact:

Re: Fehler bein senden von Infrarotdaten

Post by cicciocb »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Thu May 19, 2022 4:58 pm Vielen Dank für die Infos Electroguard.
Können Sie sich noch daran erinnern, mit welcher Version von Annex das Senden von IR-Daten funktioniert hat?

An CiccioCB
Das Senden mit einem ESP32 funktioniert tatsächlich. Meine Fehlermeldung für den ESP32 bezog sich nur auf den Speicherfehler.
Sorry, dass ich mich da etwas unklar ausgedrückt habe.
Beim ESP8266 habe ich allerdings immer noch die gleichen Sendeprobleme.

I'll check the ESP8266
User avatar
cicciocb
Site Admin
Posts: 1889
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 405 times
Been thanked: 1260 times
Contact:

Re: Fehler bein senden von Infrarotdaten

Post by cicciocb »

Hi Willi55,
could you test this version for the ESP8266 and check if the IR works as expected?
annex.bin
You do not have the required permissions to view the files attached to this post.
Willi55
Posts: 21
Joined: Mon Apr 12, 2021 4:57 pm
Has thanked: 13 times
Been thanked: 1 time

Re: Fehler bein senden von Infrarotdaten

Post by Willi55 »

An cicciocb
Super, Fehler behoben. Das Programm läuft jetzt wie geplant.
Vielen Dank für die investierte Zeit.

An Electroguard
Die Idee mit der Fernbedienung für mehrere Geräte finde ich sehr gut. Bei Gelegenheit werde ich sie für meine Belange realisieren.
Auch an sie vielen Dank.
User avatar
cicciocb
Site Admin
Posts: 1889
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 405 times
Been thanked: 1260 times
Contact:

Re: Fehler bein senden von Infrarotdaten

Post by cicciocb »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Wed May 25, 2022 10:52 am An cicciocb
Super, Fehler behoben. Das Programm läuft jetzt wie geplant.
Vielen Dank für die investierte Zeit.
Good news, I'll include this fix in the next official release
Post Reply