Home Assistant Quick-Start Guide

Projects related to Solar Power
Post Reply
jonathan
Posts: 189
Joined: Thu Feb 01, 2018 1:12 am

Home Assistant Quick-Start Guide

Post by jonathan »

The Snektek Solar Dashboard can be used as a sensor entity on Home Assistant.
homeassistant_on_snektek_solar_dashboard.PNG
Add this to your configuration.yaml:

Code: Select all

###############################
### Snektek Solar Dashboard ###
###############################

rest:
 - resource: http://192.168.10.30/cur_data
   scan_interval: 5
   sensor:
     - name: "Solar Voltage"
       #unique_id: snektek_solardashboard_solar_voltage
       value_template: '{{ (value_json["pv.v"] | float -0.0 | float) | round (2)}}'
       device_class: voltage
       state_class: measurement
       unit_of_measurement: "V"
     - name: "Solar Power"
       #unique_id: snektek_solardashboard_solar_power
       value_template: '{{ value_json["pv.p"] }}'
       device_class: power
       state_class: measurement
       unit_of_measurement: "W"
     - name: "Solar Current"
       #unique_id: snektek_solardashboard_solar_current
       value_template: '{{ value_json["pv.c"] }}'
       device_class: current
       state_class: measurement
       unit_of_measurement: "A"
     - name: "Battery Voltage"
       #unique_id: snektek_solardashboard_battery_voltage
       value_template: '{{ (value_json["bt.v"] | float +0.04 | float) | round (2)}}'
       device_class: voltage
       state_class: measurement
       unit_of_measurement: "V"
     - name: "Battery Temp"
       #unique_id: snektek_solardashboard_battery_temp
       value_template: '{{ value_json["bt.t"] }}'
       device_class: temperature
       state_class: measurement
       unit_of_measurement: "°C"
     - name: "Battery Current"
       #unique_id: snektek_solardashboard_battery_current
       value_template: '{{ value_json["bt.c"] }}'
       device_class: current
       state_class: measurement
       unit_of_measurement: "A"
     - name: "Load Voltage"
       #unique_id: snektek_solardashboard_load_voltage
       value_template: '{{ (value_json["ld.v"] | float -0.0 | float) | round (2)}}'
       device_class: voltage
       state_class: measurement
       unit_of_measurement: "V"
     - name: "Load Power"
       #unique_id: snektek_solardashboard_load_power
       value_template: '{{ value_json["ld.p"] }}'
       device_class: power
       state_class: measurement
       unit_of_measurement: "W"
     - name: "Load Current"
       #unique_id: snektek_solardashboard_load_current
       value_template: '{{ value_json["ld.c"] }}'
       device_class: current
       state_class: measurement
       unit_of_measurement: "A"
     - name: "Solar Generation Today"
       #unique_id: snektek_solardashboard_gen_today
       value_template: '{{ value_json["genToday"] }}'
       device_class: energy
       state_class: measurement
       unit_of_measurement: "kWh"
     - name: "Solar Generation This Month"
       #unique_id: snektek_solardashboard_gen_month
       value_template: '{{ value_json["genMonth"] }}'
       device_class: energy
       state_class: measurement
       unit_of_measurement: "kWh"
     - name: "Solar Generation This Year"
       #unique_id: snektek_solardashboard_gen_year
       value_template: '{{ value_json["genYear"] }}'
       device_class: energy
       state_class: measurement
       unit_of_measurement: "kWh"
randr
Posts: 5
Joined: Sat Dec 04, 2021 4:51 pm

Re: Home Assistant Quick-Start Guide

Post by randr »

This code works great! thanks Jonathan!!!
randr
Posts: 5
Joined: Sat Dec 04, 2021 4:51 pm

Re: Home Assistant Quick-Start Guide

Post by randr »

here is code in my home assistant dashboard for gauges. You would need to adjust severity values to fit your solar system but gives you an idea of display in HA I have a renogy controller so the Total moth and year sadly dont work.

type: grid
cards:
- type: gauge
entity: sensor.solar_voltage
min: 0
max: 54.16
name: PV Volts
needle: true
severity:
green: 25
yellow: 7
red: 0
- type: gauge
entity: sensor.solar_current
min: 0
max: 20.32
name: PV Amps
needle: true
severity:
green: 10.16
yellow: 5
red: 0
- type: gauge
entity: sensor.solar_power
min: 0
max: 480
needle: true
severity:
green: 260
yellow: 115
red: 1
name: PV Watts
- type: gauge
max: 14.4
entity: sensor.battery_voltage
needle: true
name: Battery Voltage
severity:
green: 13
yellow: 12.5
red: 10
min: 12
- type: gauge
entity: sensor.solar_generation_today
min: 0
max: 2
name: Today
needle: true
- type: gauge
entity: sensor.battery_current
needle: true
min: 0
max: 50
severity:
green: 10
yellow: 20
red: 45
- type: gauge
entity: sensor.solar_generation_this_month
- type: gauge
entity: sensor.solar_generation_this_year
columns: 3
square: false
Attachments
Untitled.png
EricaBajo123
Posts: 12
Joined: Tue Aug 02, 2022 4:16 am

Re: Home Assistant Quick-Start Guide

Post by EricaBajo123 »

I appreciate you spending some time and effort to put this informative article together.

kashibox2.com
EricaBajo123
Posts: 12
Joined: Tue Aug 02, 2022 4:16 am

Re: Home Assistant Quick-Start Guide

Post by EricaBajo123 »

I appreciate you spending some time and effort to put this informative article together.
yourdailystrength.com
Post Reply