A module for interacting w/ the Enphase Enjoy solar controller. It currently has a simple program for logging data, such as production and per panel data.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

21 lines
492 B

  1. #!/bin/sh
  2. while sleep .1; do
  3. curl --no-buffer --digest -u installer:$(cat creds.inst.txt) http://$(read a b << EOF
  4. $(cat creds.txt)
  5. EOF
  6. echo $a)/stream/meter 2>/dev/null | python3.8 -c 'import time; import sys
  7. inp = sys.stdin
  8. inp.reconfigure(line_buffering=True)
  9. sys.stdout.reconfigure(line_buffering=True)
  10. for i in inp:
  11. i = i.strip()
  12. if not i:
  13. continue
  14. try:
  15. i = i.split(maxsplit=1)[1]
  16. except IndexError:
  17. continue
  18. print(time.time(), i)' > home.power.$(date +%Y%m%d%H%M).log
  19. done