{"id":16266008,"url":"https://github.com/robinck/solax2ha","last_synced_at":"2025-09-05T19:47:02.237Z","repository":{"id":241704091,"uuid":"806747110","full_name":"RobinCK/solax2ha","owner":"RobinCK","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-24T06:36:27.000Z","size":38,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-31T10:44:48.939Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobinCK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2024-05-27T20:18:44.000Z","updated_at":"2024-10-24T06:36:30.000Z","dependencies_parsed_at":"2024-10-27T09:02:42.115Z","dependency_job_id":null,"html_url":"https://github.com/RobinCK/solax2ha","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"65e2678a6fb7c9727da6eac0f93fa18e75877922"},"previous_names":["robinck/solax2ha"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RobinCK/solax2ha","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinCK%2Fsolax2ha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinCK%2Fsolax2ha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinCK%2Fsolax2ha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinCK%2Fsolax2ha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobinCK","download_url":"https://codeload.github.com/RobinCK/solax2ha/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinCK%2Fsolax2ha/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273812587,"owners_count":25172878,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-10T17:21:28.287Z","updated_at":"2025-09-05T19:47:02.193Z","avatar_url":"https://github.com/RobinCK.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Solax2HA\n\nSolax2HA is a service that integrates Solax inverters with Home Assistant by creating sensors through the Home Assistant API. The service is built and run on a separate machine and uses cron to run periodically.\n\n## Features\n\n- **Real-time Monitoring**: Fetch data from your Solax inverter every 10 seconds.\n- **Easy Integration**: Create sensors in Home Assistant via the API.\n- **Automatic Execution**: Use cron for automatic periodic execution.\n\n## Requirements\n\n- A machine with network access to HA and Solax inverter\n- Solax Inverter\n- Home Assistant\n- Node.js and npm (for building the service)\n\n## Installation\n\n### 1. Clone the repository:\n```bash\ngit clone git@github.com:RobinCK/solax2ha.git\ncd solax2ha\n```\n\n### 2. Install dependencies:\n```bash\nnpm install\n```\n\n### 3. Build the project:\n```bash\nnpm run build\n```\n\n### 4. Create a `.env` file:\nCreate a `.env` file in the root directory with the following content:\n```env\nSOLAX_URL=http://192.168.100.2\nSOLAX_PASSWORD=password\nHA_URL=https://192.168.100.3:8123\nHA_TOKEN=eyJ\nHA_SENSOR_BASE_NAME=solax\nHA_SENSOR_BASE_UNIQUE_ID=solax_id\nHA_DEVICE_NAME=Solax G2 Inverter\nHA_DEVICE_IDENTIFIER=Solax G2 Inverter\nHA_DEVICE_MANUFACTURER=Solax\nHA_DEVICE_MODEL=G2 3-Phase\n```\n\n### 5. Run the service:\n```bash\nnode ./dist/index.js\n```\n\n### 6. Set up periodic execution:\nCreate a bash script to run the service:\n```bash\n#!/bin/bash\ncd /path/to/solax2ha\nnode ./dist/index.js\n```\n\n#### Using cron:\nOpen crontab for editing:\n```bash\ncrontab -e\n```\n\nAdd the following line to run the service every 1 minute:\n```bash\n* * * * * /path/to/bash /path/to/your/script.sh\n```\n\n#### Using systemd:\nIf you need to transmit more often than 1 minute, you can create your own service\n\n##### Step 1: Create a systemd Service File\nCreate a service file for your script, for example, `/etc/systemd/system/solax.service`, and add the following content:\n```ini\n[Unit]\nDescription=Run Solax solax2ha\n\n[Service]\nExecStart=/path/to/bash /path/to/your/script.sh\n```\n\n##### Step 2: Create a systemd Timer File\nCreate a timer file to run the service every 10 seconds, for example, `/etc/systemd/system/solax.timer`, and add the following content:\n```ini\n[Unit]\nDescription=Run Solax script every 10 seconds\n\n[Timer]\nOnBootSec=10sec\nOnUnitActiveSec=10sec\nUnit=solax.service\n\n[Install]\nWantedBy=timers.target\n```\n\n##### Step 3: Start and Enable the Timer\nRun the following commands to start the timer and set it to start automatically at boot:\n```sh\nsudo systemctl daemon-reload\nsudo systemctl start solax.timer\nsudo systemctl enable solax.timer\n```\n\n##### Step 4: Check the Status of the Timer\nTo verify that the timer is working, run:\n```sh\nsudo systemctl status solax.timer\n```\n\n## Usage\n\nAfter installation and configuration, the service will automatically create sensors in Home Assistant, allowing you to monitor your Solax inverter in real-time.\n\n## Contributing\n\nWe welcome contributions to Solax2HA! If you have any ideas or want to make changes, please fork the repository and submit a pull request. Ensure your code adheres to the existing style and includes tests where applicable.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor questions, issues, or suggestions, please open an issue on GitHub or contact the maintainer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinck%2Fsolax2ha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobinck%2Fsolax2ha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinck%2Fsolax2ha/lists"}