Coder Social home page Coder Social logo

daikins21's Introduction

A project to control Daikin split through S21 socket.

Daikin Model

I'm controlling three old FTXSxxG splits

Used hardware (under 10$):

  • esp8266mini
  • mini560 step down (5V output version)
  • mini breadboard
  • 4 dupont cables male-female

Used software

this is a platformio project.

Pinout

On my units the S21 port is:
1 - Seems unused
2 - TX (5V)
3 - RX (5V)
4 - VCC (14.5V)
5 - GND
Luckily, RX port accepts 3.3V levels so i did not need a level shifter.
I used D6 and D7 as serial port pins for the ESP8266.

Phisical setup

Well, this also fits inside the units, seems good!

Rationale

i did not want to use already available code since this is not fun enough, so i just wrote my code.

  • I kept a functional bootstrap-based web interface
  • i decided to keep the hardware serial functional for debugging, so i moved the control on a software serial
  • i included remotedebug library https://github.com/JoaoLopesF/RemoteDebug (please check the fixes!) to be able to debug the functioning also remotely
  • ota update available
  • all data exchange is json-ed: via websocket, via http call and via mqtt
  • commands are accepted (and data is published) in the web interface, via http call and via mqtt, same format is used.
  • since the starting point was the home assistant integration, this was achieved with https://www.home-assistant.io/integrations/climate.mqtt/ . For a couple of "limits" of the integration (power and swing management), the code implements a couple of custom calls.
  • wifi manager for wifi config

Home assistant integration

As said, the integration is done through MQTT, so i also added an example of code for integration and with templates. You'll probably need to redefine lists and for sure mqtt topics.

Fixes

Remotedebug library has some flows, please remember to:

  • modify the RemoteDebugCfg.h file, line 104, to disable websockets (or it's gonna conflict with the asyncwebserver websockets server)

#define WEBSOCKET_DISABLED true

  • comment out the part of the WebSocketsClient.cpp file between lines 700 and 710, since you are not using it but it gives exceptions with recent ESP8266 core.

/*#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
_client.tcp->setNoDelay(true);

if(_client.isSSL && _fingerprint.length()) {
if(!_client.ssl->verify(_fingerprint.c_str(), _host.c_str())) {
DEBUG_WEBSOCKETS("[WS-Client] certificate mismatch\n");
WebSockets::clientDisconnect(&_client, 1000);
return;
}
}
#endif */

Credits

i did not even know about the S21 socket, so i NEED to thank:
https://github.com/joshbenner/esphome-daikin-s21/tree/main
https://github.com/revk/ESP32-Faikin
As you'll see, i also took pieces of code, but i wasn't fully happy about it's structure, so i rewrote it as a states-machine to reduce blocking in code.

Disclaimer

i am NOT a programmer :) but i understand a lot of parts could be better written, and that some things could be done with higher security and bla bla bla.
I would not (and i don't) expose the controller on internet, this should clarify what i mean :)

Why publishing

someone asked, so why not?

Please

Since i'm not a programmer and i'm totally lost in git, please don't hesitate reporting any ANY issue in my code or anything wrong you see :)

daikins21's People

Contributors

massipi avatar

Stargazers

 avatar Gert Galjoen avatar Volker Hilsenstein avatar Joe Alden avatar  avatar  avatar Bluebunny avatar Diogo Morgado avatar

Watchers

 avatar  avatar Biloeloe avatar

Forkers

bluebunny vittyvk

daikins21's Issues

FVXM25F units

Hi,

I have been trying endlessly to get this to work...

I own 3 FVXM25F units.
S21 port pinout is

  1. 5V
  2. TX (5V)
  3. RX (5V)
  4. VCC (14.5V)
  5. GND

Components used:

  • D1 mini ESP8266
  • mini560-pro step down 5V
  • optionally: 8 channel level converter TXS0108e

Software was installed via Studio Code Server.

The D1 boots correctly, wifi changed to homenetwork, fixed ip adress given, ...
If I start the D1 powered via usb (connected to pc) and without any other connections software loads in a couple of seconds.
If I then connect the D1 to the Daikin unit (either with or without the level converter) the system either simply does not boot/connect to wifi or connects very slowly.
I can then eventually turn on the AC via the webpage, but when selecting a different setting (eg fan speed) AC turns off again.

All connections (power and other lines) were tested, retested and re-retested - even with different components.

Any suggestions? :-)

Thx!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.