Open medicalwei opened 2 years ago
Hi! I added these features and also #9 in my python implementation: https://gist.github.com/mildsunrise/a53bd50d529d92631fdaaed2368f903f
@mildsunrise can you give a usage example of your python script?
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,
)
ah ok. but how do you actually send that to an IR interface on the raspi for example?
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.
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.