Jump to content

GAC

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by GAC

  1. Have a look at this thread https://www.navitron.org.uk/forum/index.php?topic=31519.0 I tried it but could not get it to work. I now have another problem where I am not getting any response from the ME3000 'Failed to read from device', it was working fine.
  2. Sorry I've only just seen this:- The main issue I have is the battery capacity jumps from 89% to 99%, i.e. it doesn't show intermediate values in this range, the battery current is updated continually so I don't suspect a read problem. This is my code, running on a pi3 connected to Sofar with a USB<>RS485 converter #!/usr/bin/python import minimalmodbus from time import sleep import paho.mqtt.client as mqtt ME3000 = minimalmodbus.Instrument('/dev/ttyUSB1', 2) ME3000.serial.baudrate = 9600 ME3000.serial.bytesize = 8 ME3000.serial.parity = minimalmodbus.serial.PARITY_NONE ME3000.serial.stopbits = 1 ME3000.serial.timeout = 1 ME3000.debug = False ME3000.mode = minimalmodbus.MODE_RTU #print ME3000 #mqtt stuff mqttPubName="sofar" # publish data client =mqtt.Client("", True, None, mqtt.MQTTv31) client.username_pw_set("user",password="pass") client.connect("192.168.0.61",1883,60) # addresses of data batCapacity=0x0210 batVoltage=0x20E batCurrent=0x020F #signed #------------------------------------------------------ def getReg(addr,dec,signed): # get one 16bit register to dec decimal places, signed determines if signed or unsigned integer try: data=ME3000.read_register(addr,dec,3,signed) if data!=None: return data except IOError: print("Failed to read from instrument") #------------------------------------------------------ while True: cur = getReg(batCurrent,2,True) sleep(.2) cap = getReg(batCapacity,0,False) sleep(.2) vol = getReg(batVoltage,2,False) sleep(.2) client.publish(mqttPubName+"/capacity",cap) client.publish(mqttPubName+"/amps",cur) client.publish(mqttPubName+"/volts",vol) sleep(5)
  3. I have a Sofar ME3000 running successfully with 4kW array and 8xPylontech batteries. I'd like to add more PV but it would not be practical to run the output through the CT sensor on the Sofar due to the distance from the source. Does anyone have experience of this problem or a potential solution? Thanks
  4. Update, the communication side of it works ok as I have got a python program talking to the inverter successfully (not decoded the data though). So it must be some issue with node-red. I would still like to use node-red but will pursue the python route in the meantime. P.S. I should have put SOFAR ME3000SP in the title.
  5. Hi, I am trying to read data from the inverter via rs485/modbus but not having much luck, has anyone done this successfully? What I've tried so far:- I've set the communication settings (presumably rs485) to an address of 3 with 9600,8,N,1 (Address is confirmed in System Information) I presume the connector to use is the 2 pin 485s, the plug had a label saying TX- TX+, I've connected this to an RS485-USB converter +to+ -to- (also tried putting a termination resistor on and reversing connections, just in case) USB is then plugged into a raspberry pi running node-red with the node-red-contrib-modbus nodes. I have a node-red flow set up with a modbus getter using the comms params above and trying to read 64 input registers starting at 518 (which seems where the interesting data is according to the SOFARSOLAR modbus spec pdf). Nothing happens! (see error messages below) I should say I'm successfully using a similar setup to read data from an Eastron energy meter Any ideas help gratefully received. Thanks 3/15/2020, 9:01:19 PMnode: 2b51544c.0fb72cmsg : error "Error: FSM Not Ready To Read At State init" 3/15/2020, 9:01:21 PMnode: 2b51544c.0fb72cmsg : string[65] "FSM Reset On State {"value":"failed","actions":[],"changed":true}"
×
×
  • Create New...