fwolfst / read-APSystems-YC600-QS1-DS3

Measure ☀️ sun harvest ☀️ DIY

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ESP-ECU

ABout this project

This project is a fork of patience4711 awesome read-APSystems-YC600-QS1-DS3.

It compiles under Linux with Arduino IDE 2.0.4. Check out like

  git clone https://github.com/fwolfst/read-APSystems-YC600-QS1-DS3 ESP-ECU

for the sketch to load and compile painlessly (well, you need to add a bag full of libraries).

Changes made (see commit history)

  • use lowercase .h for header files to allow compilation with Arduino IDE in Linux
  • renamed the main .ino file into ESP-ECU.ino, such that Arduino IDE can easily work with these files as a sketch.
  • removed a couple of unused variables and changed return values in response to compiler warnings.

Notes

  • If you use a CC2350 with a CC2591 range extender, use the respective firmware (the CC2350...hex without range extender will not work)
  • Wemos/LOLIN D1 R1 does not work out of the box (NodeMCU v3.4 does)
  • Despite different information, you can use flash_cc3531 with default pins on a Raspberry Pi 2 B.
  • The sunMoon library needs to be installed via zip file into Arduino IDE

read APS inverters

This project is for reading APS Systems inverters. The program can pair and poll YC600 QS1 and DS3 inverters, up to 9 pieces. The read values are displayed on a web page and sent via mosquitto in a Json format. The program has a lot of smart features. All settings can be done via the webinterface. It has a console that can be used for debugging and sending/receiving zigbee messages.
See the WIKI for information on building it, the working, etc.

See it in action on YouTube

This program runs on different platforms, there is ESP32-ECU and RPI-ECU that runs on a Raspberry (Zero). Each have its advantages over the others. If you have many inverters you are probably better off with the raspberry implementation.

compile this sketch

You can use the provided binary but if you must compile it yourself: Use arduino ide with the esp822 version 2.7.1 installed under boardmanager. The ota updates won't work with other versons.
Please note: by popular demand I have published the code here but i do not feel responsible for problems as to compiling. Impossible for me to know why it doesn't compile in your situation.

downloads

april 14 2023: There is a new version v9_8b available, See changelog.
Download ESP-ECU-v9_8

april 1 2023: There is a new experimental version ESP-ECU_v9_7_beta available. This version has output of all inverters together in the frontpage. Look here for more info.

march 24 2023: 18:00hr There is a recompiled version v9_6c available, See changelog.
Download ESP-ECU-v9_6c


In case someone wants to print the housing, here is an stl file This is for a nodemcu board 31x58mm.

features

  • Simply to connect to your wifi
  • Easy add, delete and pair inverters
  • automatic polling or on demand via mqtt or http
  • data can be requested via http and mosquitto
  • There are 4 different mqtt json formats
  • Fast asyc webserver
  • a very smart on-line console to send commands and debugging
  • Smart timekeeping
  • A lot of system info on the webpage

the hardware

It is nothing more than an esp device like nodemcu, wemos or its relatives and a prepared cc2530, cc2531 zigbee module. And a powersupply. The zigbeemodule should be flashed with a firmware that is developped by kadsol : CC25xx_firmware. The firmware is also available here. Much more info as to the development of this software can be found here Koenkk/zigbee2mqtt#4221.

For info on how to build and use it, please see the WIKI

minhw

how does it work

APS works with their own zigbee implementation. The ESP-ECU sends zigbee commands (wireless) to the inverters and analyzes the answers, extracting the values. The ESP communicates with the zigbee module through the alternative serial port (wired). The ESP-ECU starts a coordinator (an entity that can start a zigbee network). The coordinator binds the inverters and sends the poll requests to them. The interesting values are send via mqtt and displayed on the main page.

frontpage graph2

changelog

version ESP-ECU_V9_8:

  • fix for the zigbee crashes
  • improved frontpage with buttons to see details.
  • fixed memory issues, more free heap.

version ESP-ECU_V9_6c:

  • fixed a typo in the help page of mosquitto settings
  • added 2 mqtt json formats, numeric values are included as float now.
  • added the retain flag to mqtt formats 3 and 4
  • changed the format of the returned json when http request.
  • added an option to have an mqtt topic for each inverter.
  • some changes to improve the polling process
  • added a forced zigbee reset every midnight.

version ESP-ECU_V9_5:

  • added a mqtt command for polling all inverters
  • added a signal quality value

version ESP-ECU_V9_4:

  • fixed failed polling after power cycle
  • fine-tuned some dc values of the DS3
  • default conversion factor now 1.66

version ESP-ECU_V9_3:

  • fixed a bug with a negative poll offset
  • added the poll- begin and end time on the main page

version ESP-ECU_V9_2:

  • made it suitable for the DS3 inverter.
  • fixed polling intervall of 5 minutes.
  • bug repaired, sq1 dc data panels 2 and 3

As of version 8 the value of total energy is no longer directly comming from the inverter's register. Instead all energy increases are added up in a total energy value. This way that value is not sensitive to inverter resets that will happen in twilight or due to an eclips etc.

About

Measure ☀️ sun harvest ☀️ DIY


Languages

Language:C++ 93.2%Language:C 6.8%