Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional features #7

Open
medicalwei opened this issue Aug 18, 2022 · 5 comments
Open

Additional features #7

medicalwei opened this issue Aug 18, 2022 · 5 comments

Comments

@medicalwei
Copy link

Offset  Description            Length     Example        Decoding
========================================================================================================
00-03   Header                 4          11 da 27 00
04      Message Identifier     1          00	
05      Mode, On/Off, Timer    1          49             49 = Heat, On, No Timer
06      Temperature            1          30             It is temperature x2. 0x30 = 48 / 2 = 24°C
08      Fan / Vert Swing       1          30             30 = Fan 1/5 No Vert Swing. 3F = Fan 1/5 + Vert Swing. 
09      Hori Swing             1          0F             00 = No Horizontal Swing. 0F = Horizontal Swing 
0a-0c   Timer delay            3          3c 00 60           
0d      Silent / Powerful      1          01             01 = Powerful enabled, 20 = Silent enabled
10      Econo / Eco Sensing    1          84             84 = Econo, 82 = Eco Sensing
12      Checksum               1          8e             Add all previous bytes and do a OR with mask 0xff

Added Horizontal/Vertical swing, Silent outdoor unit feature (denoted as Silent), Eco Sensing feature.

The second frame seems to be related to timer feature, which mine has a byte ticking to the minute, but I am not yet sure.

@mildsunrise
Copy link

Hi! I added these features and also #9 in my python implementation: https://gist.github.com/mildsunrise/a53bd50d529d92631fdaaed2368f903f

@zoff99
Copy link

zoff99 commented Feb 9, 2024

@mildsunrise can you give a usage example of your python script?

@mildsunrise
Copy link

Just call encode_remote_control_transmission() with the parameters you want.
Simple example:

import daikin

frames = daikin.encode_remote_control_transmission(
	power=True, mode=daikin.Mode.HEAT,
	temperature=21*2, fan_speed=daikin.FanSpeed.AUTO,
)

@zoff99
Copy link

zoff99 commented Feb 9, 2024

ah ok. but how do you actually send that to an IR interface on the raspi for example?

@mildsunrise
Copy link

mildsunrise commented Feb 9, 2024

you'll want to pass your frames to frames_to_signal():

daikin.frames_to_signal(frames)

and this will return an IR signal, such as:

[450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 25000, 3500, 1700, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 1286, 450, 1286, 450, 420, 450, 1286, 450, 1286, 450, 1286, 450, 1286, 450, 1286, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 1286, 450, 1286, 450, 420, 450, 1286, 450, 420, 450, 1286, 450, 1286, 450, 35000, 3500, 1700, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 1286, 450, 1286, 450, 420, 450, 1286, 450, 1286, 450, 1286, 450, 1286, 450, 1286, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 1286, 450, 420, 450, 1286, 450, 420, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 1286, 450, 1286, 450, 1286, 450, 420, 450, 1286, 450, 35000, 3500, 1700, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 1286, 450, 1286, 450, 420, 450, 1286, 450, 1286, 450, 1286, 450, 1286, 450, 1286, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 1286, 450, 420, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 420, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 1286, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 420, 450, 1286, 450, 1286, 450, 420, 450, 1286, 450, 420, 450, 420, 450, 1286, 450, 420, 450]

which you would then emit through your blaster.

I have never used a raspi as an IR blaster, so I don't know what are the steps to emit a signal with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants