Skip to content

Latest commit

 

History

History
96 lines (80 loc) · 2.92 KB

README.md

File metadata and controls

96 lines (80 loc) · 2.92 KB

☀️ solarshed

solarshed

Component Description
renogy.py Renogy charge controller / inverter monitoring software
cadence.py Simple HTTP metrics service
timeseries.py Time series data storage and retrieval
solar_monitor.py Solar metrics logger

Renogy Wanderer RS232

RJ12 Pinout

The 6 pins on the RJ12 connector are TX | RX | GND | GND | PWR | PWR from left to right. You should also be able to identify the orientation by measuring ~+5.65V from TX to GND and ~+15V from PWR to GND. Only TX, RX, and GND will need to be connected to the serial port for monitoring the charge controller.

DB9 Pin RJ12 Pin
1 (DC) -
2 (RX) 1 (TX)
3 (TX) 2 (RX)
4 (DT) -
5 (GND) 3 (GND)
6 (DSR) -
7 (RTS) -
8 (CTS) -
9 (RI) -

Renogy Modbus

Attribute Address Scale Units Notes
SYS_MAX_VOLTS 0x00A 1 V High order byte
SYS_MAX_AMPS 0x00A 1 A Low order byte
SYS_MAX_DISCHARGE 0x00B 1 A High order byte
SYS_TYPE 0x00B 1 -
BATT_SOC 0x100 1 % -
BATT_VOLTS 0x101 0.1 V -
CHARGING_AMPS 0x102 0.01 A -
CONTROLLER_TEMP 0x103 1 C -
LOAD_WATTS 0x106 1 W -
PANEL_VOLTS 0x107 0.1 V -
PANEL_AMPS 0x108 0.01 A -
PANEL_WATTS 0x109 1 W -
BATT_MIN_VOLTS 0x10B 0.1 V -
BATT_MAX_VOLTS 0x10C 0.1 V -
DAY_CHARGE 0x10F 1 W -
DAY_DISCHARGE 0x110 1 W -
DAY_GEN_POWER 0x113 1 W -
DAY_CON_POWER 0x114 1 W -
UPTIME_DAYS 0x115 1 -
BATT_FULL_COUNT 0x117 1 -
CHARGING_STATE 0x120 1 -
BATT_CAPACITY 0xE002 1 W -
SYS_BATT_VOLTS 0xE003 1 V -
RECON_BATT_VOLTS 0xE003 1 V -
BATT_TYPE 0xE004 1 -
OVER_VOLTS 0xE005 0.1 V -
CHARGE_VOLTS 0xE006 0.1 V -
EQUALIZE_VOLTS 0xE007 0.1 V -
BOOST_VOLTS 0xE008 0.1 V -
FLOAT_VOLTS 0xE009 0.1 V -
BOOST_RECOV_VOLTS 0xE00A 0.1 V -
DISCH_RECOV_VOLTS 0xE00B 0.1 V -
UNDER_WARN_VOLT 0xE00C 0.1 V -
OVER_DISCH_VOLTS 0xE00D 0.1 V -
DISCH_WARN_VOLTS 0xE00E 0.1 V -
BOOST_TIME 0xE012 1 -

Solar Monitoring

import requests
import pandas as pd
import plotly.graph_objects as go

def plot(df, x, y):
    fig = go.Figure([go.Scatter(x=df[x], y=df[y], marker_color='black', opacity=0.6)])
    fig.update_layout(title=y)
    fig.show()

response = requests.get('http://192.168.1.195:5000/metric/solarshed')
df = pd.DataFrame(response.json())
df['time'] = pd.to_datetime(df['time'], unit='s')

plot(df, 'time', 'panel_volts')

panel_volts

plot(df, 'time', 'charging_state')

charging_state