{"id":15638873,"url":"https://github.com/syssi/esphome-pipsolar","last_synced_at":"2025-04-05T22:03:29.825Z","repository":{"id":37913808,"uuid":"394238469","full_name":"syssi/esphome-pipsolar","owner":"syssi","description":"ESPHome component to monitor and control a pipsolar inverter via RS232","archived":false,"fork":false,"pushed_at":"2025-03-03T09:42:04.000Z","size":4066,"stargazers_count":120,"open_issues_count":63,"forks_count":46,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-03-29T21:22:10.677Z","etag":null,"topics":["epshome","esphome-component","esphome-config","hacktoberfest","pipsolar","qpigs"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syssi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"buy_me_a_coffee":"syssi"}},"created_at":"2021-08-09T09:58:06.000Z","updated_at":"2025-03-27T01:35:54.000Z","dependencies_parsed_at":"2023-02-19T07:01:10.391Z","dependency_job_id":"30c5bb6f-39e8-4a0a-8bab-8bb4f18e8bf6","html_url":"https://github.com/syssi/esphome-pipsolar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syssi%2Fesphome-pipsolar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syssi%2Fesphome-pipsolar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syssi%2Fesphome-pipsolar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syssi%2Fesphome-pipsolar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syssi","download_url":"https://codeload.github.com/syssi/esphome-pipsolar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406084,"owners_count":20933803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["epshome","esphome-component","esphome-config","hacktoberfest","pipsolar","qpigs"],"created_at":"2024-10-03T11:23:34.870Z","updated_at":"2025-04-05T22:03:29.797Z","avatar_url":"https://github.com/syssi.png","language":null,"funding_links":["https://buymeacoffee.com/syssi","https://www.buymeacoffee.com/syssi"],"categories":["Electricity Sensors"],"sub_categories":[],"readme":"# esphome-pipsolar\n\n![GitHub actions](https://github.com/syssi/esphome-pipsolar/actions/workflows/ci.yaml/badge.svg)\n![GitHub stars](https://img.shields.io/github/stars/syssi/esphome-pipsolar)\n![GitHub forks](https://img.shields.io/github/forks/syssi/esphome-pipsolar)\n![GitHub watchers](https://img.shields.io/github/watchers/syssi/esphome-pipsolar)\n[![\"Buy Me A Coffee\"](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg)](https://www.buymeacoffee.com/syssi)\n\nESPHome example configuration to monitor and control a pipsolar inverter via RS232\n\nKudos to [@andreashergert1984](https://github.com/andreashergert1984) for the great work!\n\n## Supported devices\n\n* PIP4048 compatible PV Inverter\n\n\n## Requirements\n\n* [ESPHome 2024.6.0 or higher](https://github.com/esphome/esphome/releases).\n* One half of an ethernet cable with RJ45 connector\n* RS232-to-TTL module (`MAX3232CSE` f.e.)\n* Generic ESP32 or ESP8266 board\n\n## Schematics\n\n\u003ca href=\"https://raw.githubusercontent.com/syssi/esphome-pipsolar/main/images/001.jpg\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/syssi/esphome-pipsolar/main/images/001.jpg\" height=\"172\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://raw.githubusercontent.com/syssi/esphome-pipsolar/main/images/002.jpg\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/syssi/esphome-pipsolar/main/images/002.jpg\" height=\"172\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://raw.githubusercontent.com/syssi/esphome-pipsolar/main/images/004.jpg\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/syssi/esphome-pipsolar/main/images/004.jpg\" height=\"172\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://raw.githubusercontent.com/syssi/esphome-pipsolar/main/images/005.jpg\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/syssi/esphome-pipsolar/main/images/005.jpg\" height=\"172\"\u003e\n\u003c/a\u003e\n\n```\n               RS232                     UART-TTL\n┌──────────┐              ┌──────────┐                ┌─────────┐\n│          │              │          │\u003c----- RX -----\u003e│         │\n│          │\u003c---- TX ----\u003e│  RS232   │\u003c----- TX -----\u003e│ ESP32/  │\n│   PIP    │\u003c---- RX ----\u003e│  to TTL  │\u003c----- GND ----\u003e│ ESP8266 │\n│          │\u003c---- GND ---\u003e│  module  │\u003c-- 3.3V VCC --\u003e│         │\u003c--- VCC\n│          │              │          │                │         │\u003c--- GND\n└──────────┘              └──────────┘                └─────────┘\n```\n\n### RJ45 connector\n\n| Pin     | Purpose      | MAX3232 pin       | Color T-568B |\n| :-----: | :----------- | :---------------- | :------------|\n|    1    | TX           | P13 (RIN1)        | White-Orange |\n|    2    | RX           | P14 (DOUT1)       | Orange       |\n|    3    |              |                   |              |\n|    4    | VCC 12V      | -                 | Blue         |\n|    5    |              |                   |              |\n|    6    |              |                   |              |\n|    7    |              |                   |              |\n|    8    | GND          | P15 (GND)         | Brown        |\n\nPlease be aware of the different RJ45 pinout colors ([T-568A vs. T-568B](images/rj45-colors-t568a-vs-t568.png)).\n\nThe inverter provides +12V on pin 4 or 7 depending on the model. You can use a cheap DC-DC converter to power the ESP with 3.3V.\n\nThe [source for the pinout is here](docs/HS_MS_MSX%20RS232%20Protocol.pdf).\n\n### MAX3232\n\n| Pin          | Label        | ESPHome     | ESP8266 example  | ESP32 example |\n| :----------- | :----------- | :---------- | :--------------- | :------------ |\n| P11 (DIN1)   | TXD          | `tx_pin`    | `GPIO4`          | `GPIO16`      |\n| P12 (ROUT1)  | RXD          | `rx_pin`    | `GPIO5`          | `GPIO17`      |\n| P16 (VCC)    | VCC          |             |                  |               |\n| P15 (GND)    | GND          |             |                  |               |\n\n## Installation\n\nUse the `esp32-example.yaml` / `esp8266-example.yaml` as proof of concept:\n\n```bash\n# Install esphome\npip3 install esphome\n\n# Clone this external component\ngit clone https://github.com/syssi/esphome-pipsolar.git\ncd esphome-pipsolar\n\n# Create a secret.yaml containing some setup specific secrets\ncat \u003e secrets.yaml \u003c\u003cEOF\nwifi_ssid: MY_WIFI_SSID\nwifi_password: MY_WIFI_PASSWORD\n\nmqtt_host: MY_MQTT_HOST\nmqtt_username: MY_MQTT_USERNAME\nmqtt_password: MY_MQTT_PASSWORD\nEOF\n\n# Validate the configuration, create a binary, upload it, and start logs\n# If you use a esp8266 run the esp8266-examle.yaml\nesphome run esp32-example.yaml\n\n```\n\nTake a look at the [official documentation of the component](https://esphome.io/components/pipsolar.html) for additional details.\n\n## Known issues\n\n1. If you configure a lot of the possible sensors etc. it could be that you run out of memory (on esp32). If you configure nearly all sensors etc. you run in a stack-size issue. In this case you have to increase stack size: https://github.com/esphome/issues/issues/855\n\n## Debugging\n\nIf this component doesn't work out of the box for your device please update your configuration to enable the debug output of the UART component and increase the log level to the see outgoing and incoming serial traffic:\n\n```\nlogger:\n  level: DEBUG\n  # Don't write log messages to UART0 (GPIO1/GPIO3) if the inverter is connected to GPIO1/GPIO3\n  baud_rate: 0\n\nuart:\n  id: uart_0\n  baud_rate: 2400\n  tx_pin: ${tx_pin}\n  rx_pin: ${rx_pin}\n  debug:\n    direction: BOTH\n    dummy_receiver: false\n    after:\n      delimiter: \"\\r\"\n    sequence:\n      - lambda: UARTDebug::log_string(direction, bytes);\n```\n\nIf you don't know the protocol of your inverter please use [this configuration](tests/esp8266-test-protocols.yaml) and try to identify to which request (`\u003e\u003e\u003e`) your inverter responds (`\u003c\u003c\u003c`). `NAK` is a negative response f.e. if the command isn't supported. If you have trouble to interpret the log please create an issue and provide your ESPHome log.\n\n## References\n\n* https://github.com/esphome/esphome/pull/1664\n* https://github.com/esphome/esphome-docs/pull/1084/files\n* https://github.com/andreashergert1984/esphome/tree/feature_pipsolar_anh\n* https://github.com/jblance/mpp-solar/tree/master/docs/protocols\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyssi%2Fesphome-pipsolar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyssi%2Fesphome-pipsolar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyssi%2Fesphome-pipsolar/lists"}