Full Version: EPsolar/ tracer SignalK
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am working on a python app that reads data from a epsolar tracer mppt unit and puts the data into signalK.

data can be displayed in node-red or signalK diagnostics in OP
would this be of interest to any one else?
post the code when you get it done..
i dont know if the manufacturers use different ways of making the data available from there mppt's but it could help other people who would like that info..a generic version may come out of it..
Hallo important yesssss... So we can together share results...

Gesendet von meinem SM-G900F mit Tapatalk
Can you explain yours way a bit more...

Gesendet von meinem SM-G900F mit Tapatalk
Hi ,
I am using Pymodbus module to access the Tracer A via USB/485 cable then parse the data into a SK update stream i am using node-red to display the data and trigger the code as i am still working out some connection bugs before i go further.

import logging
log = logging.getLogger()
from pymodbus.client.sync import ModbusSerialClient as ModbusClient
#from pymodbus.mei_message import *
import socket
client = ModbusClient(method='rtu', port='/dev/ttyXRUSB0', baudrate=115200, stopbits = 1, bytesize = 8, timeout = 1)
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
#request = ReadDeviceInformationRequest(unit=1)
#response = client.execute(request)
#print repr(response.information)

result = client.read_input_registers(0x3100,10,unit=1)
pvVolts = float(result.registers[0] / 100.0)
pvAmps = float(result.registers[1] / 100.0)
batVolts = float(result.registers[4] / 100.0)
batchgAmps = float(result.registers[5] / 100.0)
ldVolts = float(result.registers[8] / 100.00)
ldAmps = float(result.registers[9] / 100.00)
ldnetAmps = batchgAmps-ldAmps
result2 = client.read_input_registers(0x3110,1,unit=1)
batTemp = float((result2.registers[0] / 100)+ 273.15)
#print 'send'
SignalK = '{"updates": [{"source": {"type": "CHARGER","src" : "epsolar"},"values":['
SignalK += '{"path": "electrical.chargers.tracer.batteries.main.voltage","value":'+str(round(batVolts, 2))+'}'
SignalK += ',{"path": "electrical.chargers.tracer.batteries.charge.current","value":'+str(batchgAmps)+'}'
SignalK += ',{"path": "electrical.chargers.tracer.pv.voltage","value":'+str(round(pvVolts,2))+'}'
SignalK += ',{"path": "electrical.chargers.tracer.pv.current","value":'+str(pvAmps)+'}'
SignalK += ',{"path": "electrical.chargers.tracer.load.voltage","value":'+str(ldVolts)+'}'
SignalK += ',{"path": "electrical.chargers.tracer.load.current","value":'+str(ldAmps)+'}'
SignalK += ',{"path": "electrical.chargers.tracer.loadnet.current","value":'+str(ldnetAmps)+'}'
SignalK += ',{"path": "electrical.chargers.tracer.batteries.temp","value":'+str(batTemp)+'}'
SignalK += ']}]}\n'
sock.sendto(SignalK, ('localhost', 55559))
#print pvVolts
#print pvAmps
#print result2.registers[0]/100
#print batteryAmps
print (batTemp)

there is more i could include but right now i am getting an error every second run and need to solve that issue first. this code should also work with the BN series as well.
I suggest not to run every second. I suggest to try every minute. York rasping is very busy and you will because of writing processes get an unstable system. It depends also the SD you use. We did have this experience with fail2ban in our secure raspberry pbx so a common agreement in pbx is not to use fail2ban or heavy writing processes. Just for idea. Ask yourself how often you have to write date. There exist also I guess was someone in England that implement a failure procedure.

Gesendet von meinem SM-G900F mit Tapatalk
i was planing on reading every 10 to 30 seconds. then once it is set up every minute or so. i dont plan on saving the data.