kounch / homebridge-mitsubishi-vac-ir

Arduino Mitsubishi VAC IR Plugin for HomeBridge
5 stars 0 forks source link

[Help] How to install #1

Closed GorkaMM closed 6 years ago

GorkaMM commented 6 years ago

Hi!

I came across this project and it's really cool, great job! I'm struggling though to make it work on a Raspberry Pi 3 and an Arduino One. I'm using a TMP36 temp sensor (should behave like LM35) and a 940nm LED emitter, as described in your "Control Remoto Mitsubishi.fzz".

I'm able to run homebridge with the accessory but the Air Conditioner is not responding. I tested the LED was working by replacing it with one on visible light (red LED) and it seemed to work. Might the Air Conditioner not be compatible with the commands? Should I specify the model on the config.json? It's a Mitsubishi AC in any case.

I'm attaching some debugging logs from homebridge:

screenshot

Thanks a lot in advance!

kounch commented 6 years ago

You must install the sketch available in https://github.com/kounch/homebridge_mitsubishi_ir_arduino

which uses a slightly modified version of the libraries available at https://github.com/r45635/HVAC-IR-Control

and emulates the protocol for a remote similar to Mitsubishi model KD06ES

What remote control does your VAC use?

GorkaMM commented 6 years ago

Thanks for the response, @kounch!

I had installed the Arduino Sketch already when I tested. My remote control model is 002CP though (https://www.ebay.es/itm/Mitsubishi-Aire-Acondicionado-IR-Controlador-pKa-RP-por-infrarrojos-mano-002CP-remoto-/322718101574). Is that compatible? If not, how could I support it?

Thanks a lot in any case! :)

kounch commented 6 years ago

I think that it should be compatible with that remote. Make sure that your IR led points directly to the VAC IR receiver. If in doubt, try to get as close as possible. I also have found, for some IR leds, that putting a resistor makes the signal weaker. So if you have put one, try after removing it

As you are using a Pi, you can try the python script in

https://github.com/kounch/Homebridge-Mitsubishi-IR/blob/master/HomebridgeMitsubishi.py

To make quick tests, without having to use homebridge. Adjust with the name of your serial port, and the speed that you had set in the sketch, before using.

For example, to turn off the VAC ir:

python2 ./HomebridgeMitsubishi.py 'S,0,22,0,0,0'

GorkaMM commented 6 years ago

Hi @kounch,

Thanks for the help again! I tested with the Python script and the Air Conditioner does not respond to any command. I put the IR LED very very close to the receiver but still no success. I also changed the light to a visible range and it actually lit, so it shouldn't be an emitting problem.

Might commands not be compatible? The AC model is PKA-RP35HAL

Thanks in advance!

kounch commented 6 years ago

I really cannot tell, since the libraries are not mine. You can check in the other repository the protocol specification: https://github.com/r45635/HVAC-IR-Control/tree/master/Protocol

Apart from that, unless you have an infrared receiver so you can try to analyze your IR remote signals, i can't think of any other way that i could help

kounch commented 6 years ago

Also, you can check here, which is the source investigation that led to the GitHub project i took the protocol library from:

https://www.analysir.com/blog/2015/01/06/reverse-engineering-mitsubishi-ac-infrared-protocol/

GorkaMM commented 6 years ago

Hi @kounch,

I finally found a solution. The problem was the IR remote was not compatible with my Mitsubishi AC. I found out the GitHub project you shared, HVAC-IR-Control, had it within this pull request: https://github.com/r45635/HVAC-IR-Control/pull/18

I adapted your code to use those new methods and it's working now. Thanks a lot for the help! :)

kounch commented 6 years ago

Thank you for the info! Using that, I think that i have a working version that may add support for your remote.

You can check it here: https://github.com/kounch/homebridge_mitsubishi_ir_arduino/tree/develop

uncomment line 57 of the sketch file before compiling (#define MITSUBISHI_W001CP)

GorkaMM commented 6 years ago

That's great! Thank you for the work! :)