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..
mare liberum
  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
#8
I am using Tracer BN for many years on sailboat, and also Triron 40a now. So interested in having this integrated into Openplotter
Richard

Alberg 30 #597 on Lake of Two Mountains, Quebec, Canada
  Reply
#9
(09-25-2018, 02:41 PM)opampca Wrote: I am using Tracer BN for many years on sailboat, and also Triron 40a now. So interested in having this integrated into Openplotter

Winter is coming so I will start to code again. I have it sending data to SignalK It should work with BN. I have to update the code on Github. I want to add a ui so it is not so geeky. It realy needs a bit of a rewrite so i can set stuff like date/time and allow setting of custom parameters, log daily. power in and out, set alarms when the batteries drop below a given level.
I think it would work better as a signalK app as a charger is more related to SignalK then an addon to openplotter. I kind of gave up on nodered as it just ate resources but I might revisit it in the winter to.

Hey what are the Alberg 30 like to sail. There is a derelict one in our marina It looks very sturdy. Where do you sail it? I have a Tanzer 26 I like the stiffness, points well but when the water is rough it does beat me up a bit. more of a racer/cruiser and rigging is on the light side.
  Reply
#10
(09-25-2018, 09:30 PM)ddelorme Wrote: Hey what are the Alberg 30 like to sail. There is a derelict one in our marina It looks very sturdy. Where do you sail it? I have a Tanzer 26 I like the stiffness, points well but when the water is rough it does beat me up a bit. more of a racer/cruiser and rigging is on the light side.

Well I just bought the boat, sailed it once in Georgean bay where it is now... It is a sturdy boat, very heavy but slim...cant wait to bring it home next spring... Now riding an Hinteroeller HR25 that I also love for being tight...  2x 160 wartts solar panels from GMAsolar and 300ah sinopoly 12v LiFePO4 bank... self sufficient with a nova kool fridge
Richard

Alberg 30 #597 on Lake of Two Mountains, Quebec, Canada
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)