{"id":16863810,"url":"https://github.com/nazar-pc/solax-local-api-docs","last_synced_at":"2025-03-18T16:39:24.977Z","repository":{"id":147723419,"uuid":"589271594","full_name":"nazar-pc/solax-local-api-docs","owner":"nazar-pc","description":"Solax local API docs","archived":false,"fork":false,"pushed_at":"2024-11-23T17:20:51.000Z","size":9,"stargazers_count":47,"open_issues_count":6,"forks_count":7,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-15T15:18:07.344Z","etag":null,"topics":["home-automation","iot","photovoltaic","solar","solax"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nazar-pc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-01-15T16:34:29.000Z","updated_at":"2025-03-13T15:51:33.000Z","dependencies_parsed_at":"2023-04-03T14:49:33.203Z","dependency_job_id":null,"html_url":"https://github.com/nazar-pc/solax-local-api-docs","commit_stats":{"total_commits":3,"total_committers":2,"mean_commits":1.5,"dds":"0.33333333333333337","last_synced_commit":"fe4d46346fb3936963e8c31ada53b870f0d73b61"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazar-pc%2Fsolax-local-api-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazar-pc%2Fsolax-local-api-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazar-pc%2Fsolax-local-api-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazar-pc%2Fsolax-local-api-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nazar-pc","download_url":"https://codeload.github.com/nazar-pc/solax-local-api-docs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244261483,"owners_count":20424946,"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":["home-automation","iot","photovoltaic","solar","solax"],"created_at":"2024-10-13T14:39:49.997Z","updated_at":"2025-03-18T16:39:24.952Z","avatar_url":"https://github.com/nazar-pc.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Solax local API docs\n\nReverse-engineered documentation for local API on inverters built by Solax Power.\n\nManufacturer didn't want to provide documentation (and it would be mess, I can see why), but we (users) want to have\ncloud-free access to real-time data using existing APIs (for instance, to use in Home Assistant) and thus need a way to\ninterpret the data anyway.\n\nThe route I took was to extract information from official Android application (version 0.4.5), which turns out is built\nwith Apache Cordova and contains all the necessary logic in minified JavaScript.\n\nThis approach allows us to not guess what values mean what and to support all inverters that official app supports.\n\nThe information contained in this repository is the result of un-tangling that minified JavaScript and transforming into\nhuman-readable pseudo-code.\n\nIn order to get the data you'll need to make request to your inverter:\n```bash\ncurl -d \"?optType=ReadRealTimeData\u0026pwd=PASSWORD\" -X POST http://IP_ADDRESS\n```\n\n* `PASSWORD` is the password used for local access to the data in the app, it defaults to the serial number of the Pocket\nWi-Fi (I don't have Pocket Lan, but it likely works the same way).\n* `IP_ADDRESS` is the IP address of the inverter given by your router, something like `192.168.1.105`\n\nTypical response from API looks something like this (X1-Hybrid G4):\n```json\n{\n  \"sn\": \"SV********\",\n  \"ver\": \"3.003.02\",\n  \"type\": 15,\n  \"Data\": [ A LOT OF NUMBERS HERE ],\n  \"Information\": [ 5.000, 15, \"H4************\", 8, 1.30, 0.00, 1.28, 1.04, 0.00, 1]\n}\n```\n\n# Known inverter types\n\nInverter type is both contained in `type` field of the response and, apparently, in `Information` field as well.\nAt least this is true for most inverters.\n\nThese are the known inverter types based on https://github.com/squishykid/solax, please add yours in PR:\n* `3`\n  * Solax Power X1-Hybrid G1, G2, G3\n* `5`\n  * Solax Power X3-Hybrid G1, G2, G3\n  * PEIMAR NOCTIS PSI-X3\n* `8`\n  * Solax Power X1-Smart\n* `14`\n  * Solax Power X3-Hybrid G4\n  * Qcells Q.VOLT HYB-G3-3P\n  * PEIMAR NOCTIS PSI-X3S\n* `15`\n  * Solax Power X1-Hybrid G4\n  * Qcells Q.VOLT HYB-G3-1P\n  * PEIMAR NOCTIS PSI-X1\n\nHere is how they are named in the application's source code:\n\n| Name            | inverterType |\n|-----------------|--------------|\n| x1hybridg3      | 3            |\n| x1boostairmini  | 4            |\n| x3hybridg1      | 5            |\n| x320k30k        | 6            |\n| x3mic           | 7            |\n| x1boostpro      | 8            |\n| x1ac            | 9            |\n| a1hybrid        | 10,11,12     |\n| j1ess           | 13           |\n| x3hybridg4      | 14           |\n| x1hybridg4      | 15           |\n| x3micprog2      | 16           |\n| x1hybridsplitg4 | 17           |\n| x1boostminig4   | 18,22        |\n| a1hybridg2      | 19,20,21     |\n| x1hybridg5      | 23           |\n| x3hybridg5      | 24           |\n| x3big           | 100,101      |\n| x1hybridlv      | 102          |\n\n## Contents of this repository\n\nThere are a few key files listed below that contain mapping and pseudocode explaining usage or parsing algorithm.\nOnly information in the source code of the app was used to derive mappings, there might be other meaningful fields that\nare not present in the app.\n\nThere might be bugs, for instance I didn't include main battery serial number parsing because it returns garbage on my\ninverter and I can't guarantee that it makes sense on any model (application doesn't show it despite containing code\nthat parses it).\n\nThere are no promises whatsoever, so use this at your own risk.\n\nApplication also, naturally, contains code to control the inverter, but due to risks involved with changing those\nparameters, they are not (yet?) documented here. It would have been nice to automate things with Home Assistant though.\n\n### Information.txt\n\nThis file helps to get some high-level information about inverter and understand how to interpret the rest of the data\nbased on `Information` field of the response.\n\nBy knowing which inverter type it is, you can look into `Data1.txt` or `Data2.txt` for further details.\n\n### Data1.txt\n\nSeems to be older version of the API for some earlier inverter models, has generic mapping for all matching models and\nshould be assumed to have many of the fields as optional since I was not able to deduce clear mapping between different\nmodels.\n\n### Data2.txt\n\nSeems to be modern version of the API, has clear mapping between inverter type and decoding rules.\nThe same parameter doesn't always occupy the same offset in `Data` field, hence more boilerplate would be necessary to\nparse it.\n\n### DataEvCharger.txt\n\nSerial number can apparently be in either `sn` or `SN` fields of the response.\n\nSerial numbers starting with \"SC\" and \"SQ\" appear to be related to EV chargers.\nSerial numbers starting with \"SD\" appear to be related to Adapter Box.\n\n`DataEvCharger.txt` contains mapping to decode real-time data from such EV chargers.\n\n## License\n\nPublic Domain\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnazar-pc%2Fsolax-local-api-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnazar-pc%2Fsolax-local-api-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnazar-pc%2Fsolax-local-api-docs/lists"}