irplus-remote / irplus-codes.github.io

Code updates for irplus
76 stars 47 forks source link

Philips IRT8050 lighting controller #328

Open Willem23 opened 7 years ago

Willem23 commented 7 years ago

The Philips IRT8050 is a remote control for office lighting systems. It uses RC5 codes with device IDs 29 or 30 for some microswitch settings. The IRT8050 has two buttons. Functions and codes change depending on an internal microswitch. I need to use them for dimming or increasing the lighting level (all 8 microswitches are in off position). The codes are 0x74A and 0x749. Pressing the button once will switch the lights off or on. Pressing the button continuously will dim or increase the level.

irt8050

I replicated the IRT8050 on a Samsung S6 using irplus and the settings below.

` <device manufacturer="PHILIPS" model="IRT8050" columns="12" format="WINLIRC_RC5" toggle-bit-pos="2" one-pulse="800" one-space="800" zero-pulse="800" zero-space="800" bits="13" repeat="8" frequency="36000" rowSplit="2" scaleRatio="4.0">

`

However, there are some issues:

Here is a capture of the spurious data that shows up after a set of 8 repeated codes irplus 74a repeat interval timing

Here is a zoomed in capture of the spurious data irplus 74a repeat interval spurious data

There are many other codes depending on the microswitch settings that could be added for other configurations of the lighting controllers. There are also other Philips lighting remotes that have more buttons. The Philips system is also sold under other brandnames.

irplus-remote commented 7 years ago

Hey, here are some answers to your questions:

irplus-remote commented 7 years ago

Example code:


<irplus>
    <device manufacturer="PHILIPS" model="IRT8050" columns="12" format="PRONTO_HEX">

        <button label="D29 OBC10" span="3">0000 0073 000A 0000 001F 001F 001F 001F 001F 001F 001F 001F 001F 001F 003E 003E 003E 001F 001F 003E 003E 003E 003E 0C88</button>
        <button label="D29 OBC9" span="3">0000 0073 000A 0000 001F 001F 003E 003E 001F 001F 001F 001F 003E 003E 003E 001F 001F 003E 003E 001F 001F 003E 001F 0C88</button>

    </device>
</irplus>

To repeat a pronto code you can just copy it's payload and increase the pronto counter by *2

0000 0073 0014 0000 001F 001F 003E 003E 001F 001F 001F 001F 003E 003E 003E 001F 001F 003E 003E 001F 001F 003E 001F 0C88 001F 001F 003E 003E 001F 001F 001F 001F 003E 003E 003E 001F 001F 003E 003E 001F 001F 003E 001F 0C88

image

Willem23 commented 7 years ago

Thanks for the reply. I tested the PRONTO version but have problems with that as well: When sending the code payload once (counter 0x000A) it shows up as 0x74A, a few bits of glitches, and a repetition after 500ms

When sending the sequence twice (counter 0x0014) it shows 0x74A, 0x74A, a few bits of glitches, 0x749, 0x749, 0x749, 0x749 and a repetition after 500ms

So there are still a few nasty glitches and even more trouble when sending the code multiple times. Maybe there is a problem in the Samsung driver, but are you sure there is no other issue when repeating sequences.

Also, I find it very difficult to edit the configuration files. It does not seem to be possible to easily access a stored irplus or pronto file from the phone or copy&paste anything received by email. The import method is not user friendly.

irplus-remote commented 7 years ago

Well I'm absolutely sure that the app will send exactly what is defined in the IRplus file. Note that the built-in IR diagram will show exactly what is sent.

This for example is the output of a single pronto file with 2 repeats. By the way the pronto-counter won't be parsed by the app at all. It's just for the sake of correctness. So you can re-import the IR code into irscrutinizer.

My suggestion will be to prepare the codes with irscrutinizer. When you're happy with them, export them to *.irplus. IrScrutinizer supports it as export format!

https://github.com/bengtmartensson/harctoolboxbundle/releases/tag/Version-1.4.1

image

What tool are you using to verify the IR output btw ?

If you have suggestions on how i should change the editing feature, i'm happy to hear them :) Currently there are several ways:

Edit the XML via the editor

image

Import .irplus files via file manager. The .irplus format will be registered as an Intent-filter for the view action

<intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
....
irplus-remote commented 7 years ago

Oh and by the way. The Samsung thing is not a "maybe" it's a fact unfortunately. I've did some research on it when i owned a samsung device with IR myself. I don't know what they messed up but they did. When you don't use repeats. Everything will just work fine, as each IR-code will overwrite the wrong values in the array anway. But if you use repeats it will mess up things..

Try to send a long "clear" cache pattern after each code e.g.

0000 0073 0000 0000 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8 0001 0CA8
Willem23 commented 7 years ago

I will do some more testing next week.

I am using an SFH506-36 IR receiver with a hardware logic analyser attached. The analyser shows the received demodulated 36 KHz IR signal, it shows timing and also conveniently decodes the manchester/bi-phase codes using the number of desired bits (ie 11 for RC5, skipping the 2 sync bits and the togglebit), see posted pictures. So what I see is what is coming out the phones IR port or from the original IRT8050.

As far as the editor is concerned, when I go to Import it takes me to github (irplus), sourceforge (lirc), tries to paste a filename/url (paste) or proposes some very convoluted filepath on SD which I cant find anywhere.. I would like to access the filemanager and browse for a local file. It would also be nice if you could at least just paste some previously copied source into the XML editor.

Willem23 commented 7 years ago

I have done some more testing. Using the RC5 format with a ''repeat'' does also show a glitch on the IRPLUS built in IR diagram:

screenshot_20170719-175717 That does not look like something in the Samsung driver, but points at some problem in the code.

Using the pronto version does result in serious glitches when using the 'repeat' option (see above). It seems to work when you just repeat the bit pattern a few times but still generates some spurious data. There is however another issue with Pronto_hex. It does not seem to use the togglebit. All keypresses result in the same code sequence. When using the toggle_bit or toggle_bit_mask options they are just ignored and deleted..

I still see no easy way to import codes prepared on the PC. The IRPLUS import options SD, URL etc are completely unclear to me.. They just go to some website or result in unexplained file errors. How do I simply import a file that I emailed to my phone.

irplus-remote commented 7 years ago

Hi, yes the single line you see is due to the pronto format. Pronto works with pulse width (space and pulse) and it would be "illegal" to use a completely zero-ed burst pair

http://www.remotecentral.com/features/irdisp2.htm

So to represent "empty" signals i'm using 0001 internally instead of 0000. Which causes the line after each signal. In reality its such a small IR pulse that all decoders will safely ignore.

Pronto also does not automatically set the toggle bit as you noted. But it is still possible to use it. However you have to specify it yourself. As said you can use Irscrutinizer to generate a valid irplus pronto file with toggle bit.

You can specify a pronto-format toggle bit by using a pipe e.g.

        <button label="&#xf011;" alt="POWER" backgroundColor="FFC84334" span="4">0000 006C 0000 000C 0005 011F 0005 00BD 0005 011F 0005 011F 0005 011F 0005 011F 0005 00BD 0005 00BD 0005 00BD 0005 00BD 0005 00BD 0005 07F8|0000 006C 0000 000C 0005 011F 0005 011F 0005 011F 0005 011F 0005 011F 0005 011F 0005 00BD 0005 00BD 0005 00BD 0005 00BD 0005 00BD 0005 07F8</button>

Are you using Gmail on Android? You can just click on the attachment (send an *.irplus file) and it will ask you to open it with irplus. No need to use the actual app to import. Its pretty easy.