PV Hosola inverter sensors

Hosola is a product from Igen and works with their solarman & solarmanpv website. Tried to get the data from the Hosola inverter into HA:

  1. Scrape:
    Scraping from their website looks simple but does no longer works with the HA scrape sensor (even if you have set your PV site to public).

  2. Rest:
    There is a API functionality and you can request ([email protected]) to send your apiid and apikey, but again this is not straight forward (PV Data from Solarman WiFi logger - with API).

Screen Shot 2021-02-19 at 16.54.40

Looking through all the various inverter integrations from Igen , I noticed that the (local)websites are very similar. Triggered by Omink inverter in Home assistant, decided to test this on the Hosola inverter:

http://192.168.2.66/js/status.js

this gave me a screen full of data!

So I installed the great https://github.com/robbinjanssen/home-assistant-omnik-inverter from @robbinjanssen and guess what, the Hosola inverter data is available in HA without sending the data to China.

Alternatively you can use the @gerard33 setup by creating three command line sensors:

sensors:

  - platform: command_line
    name: Hos Power Current
    scan_interval: 60
    command: 'curl http://192.168.2.66/js/status.js'
    value_template: >-
      {{ ((value | regex_findall_index('var webData=".*?(?=";)')).split(',')[5] | float) | int }}
    unit_of_measurement: 'W'
    
  - platform: command_line
    name: Hos Power Today
    scan_interval: 300
    command: 'curl http://192.168.2.66/js/status.js'
    value_template: >-
      {{ (value | regex_findall_index('var webData=".*?(?=";)')).split(',')[6] | float / 100 }}
    unit_of_measurement: 'kWh'
    
  - platform: command_line
    name: Hos Power Total
    scan_interval: 600
    command: 'curl http://192.168.2.66/js/status.js'
    value_template: >-
      {{ (value | regex_findall_index('var webData=".*?(?=";)')).split(',')[7] | float / 10 }}
    unit_of_measurement: 'kWh'    
    
1 Like