This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
EPsolar/ tracer SignalK
#1
Hi,
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?
  Reply
#2
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..
  Reply
#3
Hallo important yesssss... So we can together share results...

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

Gesendet von meinem SM-G900F mit Tapatalk
  Reply
#5
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.
code:


Code:
import logging
logging.basicConfig()
log = logging.getLogger()
log.setLevel(logging.DEBUG)
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)
client.connect()
#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)
client.close()




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.
  Reply
#6
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
  Reply
#7
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.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)