Skip to content

sfazzy/SAJInverter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

SAJ Inverter (Local) – Home Assistant Custom Integration

HACS badge HA min version IoT class

Live‑poll every SAJ solar inverter that hosts
english_main.htm, param.js and real_time_data.xml
on its built‑in web server (no cloud, no login).


✨ Features

  • Automatic discovery of all metrics – the integration reads the inverter’s own param.js to map every XML <value> to a friendly sensor
    (voltage, current, grid power, today energy, inverter state, …).
  • One‑minute polling (configurable) – values appear as normal Home‑Assistant sensors you can graph, automate, or feed into the Energy Dashboard (kWh sensors are flagged total_increasing).
  • Zero cloud & zero credentials – talks directly to the inverter over HTTP.
  • HACS‑ready – easy install & updates.

📥 Installation

Option A  – HACS (recommended)

  1. HACS → Integrations → “⋮” → Custom repositories
    URL: https://github.com/sfazzy/SAJInverter
    Category: Integration
  2. Click “Install”.
  3. Restart Home‑Assistant.

Option B  – Manual

config/
└─ custom_components/
   └─ saj_inverter/
      ├─ __init__.py
      ├─ api.py
      ├─ const.py
      ├─ coordinator.py
      ├─ sensor.py
      └─ manifest.json

Download / clone the repo and copy the folder above.

Restart Home‑Assistant.

🔧 Configuration Method Steps UI (preferred)

  1. Settings → Devices & Services → “Add Integration” → SAJ Inverter (Local).
  2. Enter the inverter’s IP address (192.168.XXX.XXX in the default install) and click Submit.

YAML (if you disabled config_flow in manifest.json) yaml

saj_inverter:
  host: 192.168.XXX.XXX # your inverter’s IP
  scan_interval: 60 # optional, seconds

Tip: if you don’t know the IP, check your router’s DHCP table or run a network scan (arp -a, Fing, etc.).

🖥️ Entities are prefixed for clarity, e.g.

+sensor.sajinv_vac_l1          248.5   V
+sensor.sajinv_iac_l1           16.85  A
+sensor.sajinv_p_ac          12 475    W
+sensor.sajinv_energy_today   102.3    kWh
+sensor.sajinv_inverter_state  Normal

+Use the _power_, _energy_, _vac_, _iac_ sensors in the Energy Dashboard +or automations as usual.

⚙️ Advanced options scan_interval 60 s Polling interval. debug_logging off Add to YAML if you want on: logger: → logs: → custom_components.saj_inverter: debug

🆘 Troubleshooting Symptom Fix: No entities after adding integration Settings → System → Logs – enable debug (see above). Check the inverter IP, that port 80 is reachable, and that param.js & real_time_data.xml load in a browser. Log shows Length mismatch Your inverter firmware added/removed values. Open an issue – include your param.js and real_time_data.xml. HACS says “Repository structure for master is not compliant” Your repo must contain custom_components/saj_inverter/manifest.json. See the Installation → Manual section for layout.

🤝 Contributing PRs & issues welcome!

Typical contributions: Special‑case friendly names, units or icons for additional IDs. Support for extra endpoints (day_trend.xml, month_trend.xml, …). Code review & refactor (async best‑practices, config‑flow enhancements).

📜 License Open Source - given to you by SfazzY
(Original SAJ HTML/JS belongs to its respective owner; this repo merely interfaces with it.)

🙏 Acknowledgements Inspired by the reverse‑engineering work of the Home‑Assistant community and Mucho Mas wine. Thanks to each tester who shared inverter logs & feedback.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages