Skip to content

A Hacky script to fetch solar production information from SunPower

License

Notifications You must be signed in to change notification settings

iShiva-Dev/sunpower_hass

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hacky HomeAssistant SunPower sensor module

This is a quick sensor script that can be used by HomeAssistant (sorta).

SunPower does not provide a consumer accessible API.

They do provide a website you can use to monitor your panels, so a bit of hackery is required.

Installing

I'd recommend installing this using python virtualenv. If you're not familiar with the python installation incantation, it's:

$ virtualenv -p python3 venv
$ venv/bin/python setup.py install

Running

You can run the program either as

$ venv/python sunpower

or

$ venv/reading

Using in Home Assistant

In HASS, I've set up the following custom sensor:

sensor:
  - platform: command_line
    scan_interval: 300
    name: Solar Production
    command: reading
    unit_of_measurement: "kW"

NOTE: You'll have to specify the directory you installed in the command line. (e.g. if you installed on /home/bob/sunpower_hass/ you'd use

   ...
   command: /home/bob/sunpower_hass/venv/reading

)

##TODO:

  • Make this a proper HASS module.

About

A Hacky script to fetch solar production information from SunPower

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%