Using the RESTful integration to get data from a Solis inverter with a wifi stick

This is for versions of the Solis data logging stick that provide data over http from a url like this: http://ip_address/inverter.cgi

For example, if your data logging stick’s ip address is 192.168.0.120, then you can check if it is going to work by going to http://192.168.0.120/inverter.cgi in your browser. The username is ‘admin’ and the password defaults to your wifi password. Check if you get a response such as:

;860041;205;20.1;790;0.300000;d;NO;

Add the following to your configuration.yaml, modifying the ip address:

rest:
  - authentication: basic
    username: 'admin'
    password: !secret inverter_password
    resource: 'http://192.168.0.120/inverter.cgi'
    sensor:
      - unique_id: inverter_temperature
        name: 'Inverter Temperature'
        value_template: '{{ value.split(";")[3] | float }}'
        unit_of_measurement: '°C'
        icon: mdi:thermometer
      - unique_id: inverter_power
        name: 'Inverter Power'
        value_template: '{{ value.split(";")[4] | float / 1000 }}'
        unit_of_measurement: 'kW'
        icon: mdi:flash
      - unique_id: inverter_energy_today
        name: 'Inverter Energy Today'
        value_template: '{{ value.split(";")[5] | round(5) }}'
        unit_of_measurement: 'kWh'
        icon: mdi:lightning-bolt
      - unique_id: inverter_alerts
        name: 'Inverter Alerts'
        value_template: '{{ value.split(";")[7] | title }}'
        icon: mdi:flash-alert

And add a line like this to secrets.yaml:

inverter_password: your_password

The RESTful integration defaults to a polling interval of 30s, and a timeout of 10s. Check the docs if you want to change them. The data logging stick only updates its values every 5 mins, so the values you see only change that often.

Other ways to get data from Solis inverters:

Using AppDaemon to scrape http://ip_address/status.html or inverter.cgi: https://community.home-assistant.io/t/getting-data-from-a-solis-ginlong-inverter/461672

The Solarman integration works with some other versions of the data logging sticks, the ones with serial numbers 17xxxxxxx, 21xxxxxxx or 40xxxxxxx.
https://github.com/StephanJoubert/home_assistant_solarman

Or you could go via SolisCloud:

SolisCloud integration: https://github.com/hultenvp/solis-sensor
SolisCloud to MQTT: https://github.com/ZuinigeRijder/SolisCloud2PVOutput