Skip to content

Commit 9770679

Browse files
committed
Merge branch 'master' of github.com:jbuehl/solaredge
Add GPL
2 parents 02a9714 + 673c06d commit 9770679

20 files changed

Lines changed: 515 additions & 75 deletions

.circleci/config.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
jobs:
10+
integration:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
lfs: true
16+
- uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.10'
19+
cache: 'pip'
20+
- run: pip install -r requirements.txt
21+
- run: test/test.sh

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![CircleCI](https://circleci.com/gh/jbuehl/solaredge.svg?style=svg)](https://circleci.com/gh/jbuehl/solaredge)
1+
![CI](https://github.com/jbuehl/solaredge/actions/workflows/test.yml/badge.svg)
22

33
SolarEdge Monitoring
44
====================

conversion/pickle2graphite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
"""
33
Send SolarEdge performance metrics to Graphite via the graphite/carbon pickle listener port.
44

conversion/se2MQTT.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
# Send JSON performance data to Mosquitto MQTT Broker
44
#
@@ -10,11 +10,11 @@
1010
#
1111
#example:
1212
#
13-
# python2 se2MQTT.py -c solaredge -u solaredge -p s0lar3dg3 -s mosquitto.domain.local -t /ha/value/solaredge /root/solaredge/performance.json
13+
# python3 se2MQTT.py -c solaredge -u solaredge -p s0lar3dg3 -s mosquitto.domain.local -t /ha/value/solaredge /root/solaredge/performance.json
1414
#
1515
# follow /root/solaredge/performance.json file and publish to topic "/ha/value/solaredge" on server "mosquitto.domain.local" with client id "solaredge" and user "solaredge" and password "s0lar3dg3"
1616
#
17-
# python2 semonitor.py -t 4 -d /root/solaredge/selog.txt -s 7f123456 -vvvv /dev/ttyUSB0 | python2 se2MQTT.py -c solaredge -u solaredge -p s0lar3dg3 -s mosquitto.domain.local -t /ha/value/solaredge
17+
# python3 semonitor.py -t 4 -d /root/solaredge/selog.txt -s 7f123456 -vvvv /dev/ttyUSB0 | python3 se2MQTT.py -c solaredge -u solaredge -p s0lar3dg3 -s mosquitto.domain.local -t /ha/value/solaredge
1818
#
1919
# pipe output from semonitor directly into se2MQTT.py and publish to topic "/ha/value/solaredge" on server "mosquitto.domain.local" with client id "solaredge" and user "solaredge" and password "s0lar3dg3"
2020

conversion/se2csv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
# Convert SolarEdge inverter performance monitoring data from JSON to CSV
44

conversion/se2graphite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
# send a SolarEdge performance metrics to Graphite
44

conversion/se2state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
# Maintain a file containing the current state and selected statistics
44
# of SolarEdge inverters and optimizers

requirements.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
future==0.17.1
2-
netifaces==0.10.6
3-
pycrypto==2.6.1
4-
pyserial==3.4
1+
netifaces==0.11.0
2+
pycryptodome==3.16.0
3+
pyserial==3.5

scripts/se2influx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash -
2+
3+
set -eu -o pipefail
4+
5+
INVERTERS=012345AB
6+
USB_DEVICE=/dev/ttyUSB0
7+
INFLUX_HOST=influxdb
8+
INFLUX_USER=semonitor
9+
INFLUX_PASS=XXXXXXXXX
10+
SEMONITOR_LOG=/var/log/semonitor/semonitor.log
11+
12+
/usr/local/bin/solaredge/semonitor.py -m -t 4 -s $INVERTERS $USB_DEVICE | \
13+
/usr/local/bin/solaredge/utilities/se2influx.py \
14+
--host $INFLUX_HOST \
15+
--username $INFLUX_USER \
16+
--password $INFLUX_PASS \
17+
--stat_timer_secs 300 \
18+
--log_path $SEMONITOR_LOG

0 commit comments

Comments
 (0)