OpenMarine
EPsolar/ tracer SignalK - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: CAN-USB Stick (https://forum.openmarine.net/forumdisplay.php?fid=11)
+--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=12)
+--- Thread: EPsolar/ tracer SignalK (/showthread.php?tid=846)

Pages: 1 2


EPsolar/ tracer SignalK - ddelorme - 2017-11-05

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?


RE: EPsolar/ tracer SignalK - jim321 - 2017-11-06

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..


RE: EPsolar/ tracer SignalK - tocan - 2017-11-09

Hallo important yesssss... So we can together share results...

Gesendet von meinem SM-G900F mit Tapatalk


RE: EPsolar/ tracer SignalK - tocan - 2017-11-16

Can you explain yours way a bit more...

Gesendet von meinem SM-G900F mit Tapatalk


RE: EPsolar/ tracer SignalK - ddelorme - 2017-11-16

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.


RE: EPsolar/ tracer SignalK - tocan - 2017-11-16

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


RE: EPsolar/ tracer SignalK - ddelorme - 2017-11-16

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.


RE: EPsolar/ tracer SignalK - opampca - 2018-09-25

I am using Tracer BN for many years on sailboat, and also Triron 40a now. So interested in having this integrated into Openplotter


RE: EPsolar/ tracer SignalK - ddelorme - 2018-09-26

(2018-09-25, 07: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.


RE: EPsolar/ tracer SignalK - opampca - 2018-09-26

(2018-09-26, 02:30 AM)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