Sunday, March 3, 2013

Dyson AM02 Tower Fan and it's IR codes

A while ago I bought Dyson AM02. I already had a tower fan but I like Dyson's fan design. Especially with big tower fan the design gives you more sense of open space when you can see through the fan.

I also needed fan that can be controlled with IR remote so I could integrate it with my home automation system based on Eventghost.

The best review I could find about Dyson AM02 was this:
GadgetNutz:The Dyson AM02 Tower Fan Review

Last autumn it was on sale for 300 euros so I decided to buy one. Dirty cheap! ;)

The fan works fine but what the reviews did not tell was you cannot teach it's IR codes to another remote! The remote uses some kind of changing code that you cannot for instance start the fan first with a IR code and then stop it with the same IR code. The codes rotate somehow in groups of four IR codes. You can test this. Start the fan with remote. Then put your another hand to cover the remote and press start/stop button three more times. Then uncover the remote and try to push start/stop button again. Nothing happens. The fan does not allow the same code that started the fan to be used to stop it. And somehow it considers every fourth press of the remote to be the same IR codes.

I mailed to Dyson support about this and asked if they could give me some kind of technical detail how the IR codes work but I never got any answer. I paid 300 euros for state-of-the-art tower fan and I got no support!

Dear Dyson, I like your tower fan but your customer support sucks.

If you are planning to use AM02 with an ordinary universal IR learning remote, forget about it. You cannot. Don't buy Dyson then. Dyson AM02 does not work with universal remotes. Period.

Because I wanted to use Dyson with home automation system,  it was possible to get around this design 'feature'.

With Eventghost I use USB-UIRT to receive and transmit IR codes. I modified Eventghost USB-UIRT plugin a little bit so it started logging the IR codes I was trying to teach to it. Then it was much easier to capture to IR codes and figure out how the codes change.

The USB-UIRT plugin is file
C:\Program Files (x86)\EventGhost\plugins\USB-UIRT\
(I've only include the changes. They are between <MM and MM> tokens.)
import eg
# <MM
import logging
# MM>

# <MM
logging.basicConfig(filename='usb-uirt.log', level=logging.INFO, format=FORMAT)
log = logging.getLogger('usb-uirt')
# MM>

class USB_UIRT(eg.IrDecoderPlugin):

    def OnLearnSuccess(self, code):
        self.code = code
# <MM'Accepted Code:%s',code)
# MM>
I'm using Eventghost version 0.4.1. They have changed the plugin architecture a bit in newer versions so this might not work in those. The IR codes I logged are at the end of my post.

With Eventghost it is possible the create commands that 'rotate'.  I created command sets that rotate three different IR codes. The IR codes I picked random from the log. When I run the first IR code, the command also enables the next IR code and disables the current and so on. So when I try to run the command next time it executes the second IR, then the third and then the first again.

It is not a perfect solution because I still don't know the logic how the codes work. I had to try several codes that they would work together flawlessly. But in my solution there's no programmed logic between different commands. I might be possible that one IR code that starts the fan prevents the next IR code to 'oscillate' not to work. But then you can simply press 'oscillate' again.

It's not possible to import/export Eventghost setups but the settings are saved in XML file and you can copy/paste the solution to your settings XML file. But then you have to be careful that id fields of the commands are unique and the enable/disable commands have right id's.

Eventghost XML settings:
Eventghost Dyson AM02 IR commands.xml

PS. Here's the IR codes I logged:

Dyson AM02 IR codes.txt

1 comment:

  1. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
    Home Automation in Chennai
    smart home in Chennai
    Home security in Chennai
    Burglar alarm in Chennai
    Door sensors Chennai