Giter Site home page Giter Site logo

Comments (25)

sanitariu avatar sanitariu commented on July 28, 2024

I think i need help with config.properties setting things for RS485 port. It must be /dev/ttyUSB0

from bms-to-inverter.

sanitariu avatar sanitariu commented on July 28, 2024

This is my last changes. I think i am little ahead. Seems like the problem is opening serial port.

root@sol:~/test # java -jar bms-to-inverter-main-0.0.1-SNAPSHOT.jar
20:11:10.622 INFO : WELD-000900: 5.1.1 (Final)
20:11:11.140 WARN : WELD-ENV-002008: Bean class module-info found in multiple bean archives - this may result in incorrect behavior:

  • WeldBeanDeploymentArchive [id=/root/test/lib/email-javamail-1.0.5.jar],
  • WeldBeanDeploymentArchive [id=/root/test/lib/email-api-1.0.5.jar]
    20:11:11.377 INFO : WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
    20:11:12.473 INFO : WELD-ENV-002003: Weld SE container 8212513e-97f5-477c-ac0c-93827d7aaee7 initialized
    20:11:13.056 INFO : AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=data/journal,bindingsDirectory=data/bindings,largeMessagesDirectory=data/largemessages,pagingDirectory=data/paging)
    20:11:13.074 INFO : AMQ221045: libaio is not available, switching the configuration into NIO
    20:11:13.148 INFO : AMQ221057: Global Max Size is being adjusted to 1/2 of the JVM max size (-Xmx). being defined as 129761280
    20:11:13.220 INFO : AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
    20:11:13.222 INFO : AMQ221043: Protocol module found: [artemis-mqtt-protocol]. Adding protocol support for: MQTT
    20:11:13.224 INFO : AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
    20:11:13.358 INFO : AMQ601138: User anonymous@unknown is getting notification info on target resource: null
    20:11:13.360 INFO : AMQ601019: User anonymous@unknown is getting mbean info on target resource: org.apache.activemq.artemis.core.management.impl.ActiveMQServerControlImpl@1c29daa
    20:11:13.361 INFO : AMQ601138: User anonymous@unknown is getting notification info on target resource: ActiveMQServerImpl::name=localhost
    20:11:13.443 INFO : AMQ601019: User anonymous@unknown is getting mbean info on target resource: org.apache.activemq.artemis.core.management.impl.AddressControlImpl@4ccef7
    20:11:13.613 INFO : AMQ601019: User anonymous@unknown is getting mbean info on target resource: org.apache.activemq.artemis.core.management.impl.AcceptorControlImpl@5cbff2
    20:11:13.959 INFO : AMQ221020: Started NIO Acceptor at 127.0.0.1:61616 for protocols [CORE,MQTT,STOMP]
    20:11:13.960 INFO : AMQ221007: Server is now live
    20:11:13.960 INFO : AMQ221001: Apache ActiveMQ Artemis Message Broker version 2.30.0 [localhost, nodeID=3065f73d-87d0-11ee-8259-22551d751e71]
    20:11:14.279 INFO : AMQ601767: CORE connection e29de773 for user [email protected]:48510 created
    20:11:14.325 INFO : AMQ601267: User [email protected]:48510 is creating a core session on target resource ActiveMQServerImpl::name=localhost with parameters: [312cc9b0-87d0-11ee-8259-22551d751e71, null, ****, 102400, RemotingConnectionImpl [ID=e29de773, clientID=null, nodeID=3065f73d-87d0-11ee-8259-22551d751e71, transportConnection=org.apache.activemq.artemis.core.remoting.impl.netty.NettyServerConnection@ae8165[ID=e29de773, local= /127.0.0.1:61616, remote=/127.0.0.1:48510]], true, true, false, false, null, org.apache.activemq.artemis.core.protocol.core.impl.CoreSessionCallback@16ddc9a, true, {}]
    20:11:14.506 INFO : AMQ601065: User [email protected]:48510 is creating a queue on target resource: ServerSessionImpl() with parameters: [QueueConfiguration [id=null, name=energystorage, address=energystorage, routingType=null, filterString=null, durable=true, user=null, maxConsumers=-1, exclusive=null, groupRebalance=null, groupRebalancePauseDispatch=null, groupBuckets=null, groupFirstKey=null, lastValue=null, lastValueKey=null, nonDestructive=null, purgeOnNoConsumers=false, enabled=null, consumersBeforeDispatch=null, delayBeforeDispatch=null, consumerPriority=null, autoDelete=null, autoDeleteDelay=null, autoDeleteMessageCount=null, ringSize=1, configurationManaged=null, temporary=false, autoCreateAddress=null, internal=null, transient=null, autoCreated=false, fqqn=null]]
    20:11:14.518 INFO : AMQ601019: User [email protected]:48510 is getting mbean info on target resource: org.apache.activemq.artemis.core.management.impl.AddressControlImpl@710eda
    20:11:14.618 WARN : AMQ222165: No Dead Letter Address configured for queue energystorage in AddressSettings
    20:11:14.618 WARN : AMQ222166: No Expiry Address configured for queue energystorage in AddressSettings
    20:11:14.660 INFO : AMQ601019: User [email protected]:48510 is getting mbean info on target resource: org.apache.activemq.artemis.core.management.impl.QueueControlImpl@1d414f0
    20:11:14.709 INFO : AMQ601768: CORE connection e29de773 for user [email protected]:48510 destroyed
    20:11:14.735 INFO : AMQ601767: CORE connection 1e190608 for user [email protected]:48520 created
    20:11:14.749 INFO : AMQ601267: User [email protected]:48520 is creating a core session on target resource ActiveMQServerImpl::name=localhost with parameters: [31708974-87d0-11ee-8259-22551d751e71, null, ****, 102400, RemotingConnectionImpl [ID=1e190608, clientID=null, nodeID=3065f73d-87d0-11ee-8259-22551d751e71, transportConnection=org.apache.activemq.artemis.core.remoting.impl.netty.NettyServerConnection@821afb[ID=1e190608, local= /127.0.0.1:61616, remote=/127.0.0.1:48520]], true, true, false, false, null, org.apache.activemq.artemis.core.protocol.core.impl.CoreSessionCallback@2e2dde, true, {}]
    20:11:14.864 ERROR: Error requesting data!
    java.lang.NullPointerException: Cannot invoke "com.fazecast.jSerialComm.SerialPort.getRTS()" because "this.port" is null
    at com.airepublic.bmstoinverter.protocol.rs485.JSerialCommPort.sendFrame(JSerialCommPort.java:140) ~[protocol-rs485-0.0.1-SNAPSHOT.jar:?]
    at com.airepublic.bmstoinverter.daly.rs485.DalyBmsRS485Processor.sendMessage(DalyBmsRS485Processor.java:52) ~[bms-daly-rs485-0.0.1-SNAPSHOT.jar:?]
    at com.airepublic.bmstoinverter.daly.common.AbstractDalyBmsProcessor.process(AbstractDalyBmsProcessor.java:54) ~[bms-daly-common-0.0.1-SNAPSHOT.jar:?]
    at com.airepublic.bmstoinverter.BmsToInverter.lambda$start$0(BmsToInverter.java:125) ~[bms-to-inverter-main-0.0.1-SNAPSHOT.jar:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
    at java.lang.Thread.run(Thread.java:840) [?:?]
    20:11:14.893 ERROR: Error requesting data!
    java.lang.NullPointerException: Cannot invoke "com.fazecast.jSerialComm.SerialPort.getRTS()" because "this.port" is null
    at com.airepublic.bmstoinverter.protocol.rs485.JSerialCommPort.sendFrame(JSerialCommPort.java:140) ~[protocol-rs485-0.0.1-SNAPSHOT.jar:?]
    at com.airepublic.bmstoinverter.daly.rs485.DalyBmsRS485Processor.sendMessage(DalyBmsRS485Processor.java:52) ~[bms-daly-rs485-0.0.1-SNAPSHOT.jar:?]
    at com.airepublic.bmstoinverter.daly.common.AbstractDalyBmsProcessor.process(AbstractDalyBmsProcessor.java:54) ~[bms-daly-common-0.0.1-SNAPSHOT.jar:?]
    at com.airepublic.bmstoinverter.BmsToInverter.lambda$start$1(BmsToInverter.java:132) ~[bms-to-inverter-main-0.0.1-SNAPSHOT.jar:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
    at java.lang.Thread.run(Thread.java:840) [?:?]
    20:11:14.915 INFO :
    BMS SOC V A CellMinV CellMaxV CellDiff
    1 0.0 0.0 0.0 0.0(#0) 0.0(#0.0) 0.0
    2 0.0 0.0 0.0 0.0(#0) 0.0(#0.0) 0.0
    3 0.0 0.0 0.0 0.0(#0) 0.0(#0.0) 0.0
    4 0.0 0.0 0.0 0.0(#0) 0.0(#0.0) 0.0
    5 0.0 0.0 0.0 0.0(#0) 0.0(#0.0) 0.0
    6 0.0 0.0 0.0 0.0(#0) 0.0(#0.0) 0.0
    7 0.0 0.0 0.0 0.0(#0) 0.0(#0.0) 0.0
    8 0.0 0.0 0.0 0.0(#0) 0.0(#0.0) 0.0
    9 0.0 0.0 0.0 0.0(#0) 0.0(#0.0) 0.0
    10 0.0 0.0 0.0 0.0(#0) 0.0(#0.0) 0.0
    11 0.0 0.0 0.0 0.0(#0) 0.0(#0.0) 0.0
    12 0.0 0.0 0.0 0.0(#0) 0.0(#0.0) 0.0
    13 0.0 0.0 0.0 0.0(#0) 0.0(#0.0) 0.0
    14 0.0 0.0 0.0 0.0(#0) 0.0(#0.0) 0.0
    15 0.0 0.0 0.0 0.0(#0) 0.0(#0.0) 0.0
    16 0.0 0.0 0.0 0.0(#0) 0.0(#0.0) 0.0

20:11:14.950 ERROR: Failed to perform initial reading of BMS values!
java.lang.NoClassDefFoundError: android/content/Context
at java.lang.Class.getDeclaredFields0(Native Method) ~[?:?]
at java.lang.Class.privateGetDeclaredFields(Class.java:3297) ~[?:?]
at java.lang.Class.getDeclaredFields(Class.java:2371) ~[?:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:237) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130) ~[gson-2.10.1.jar:?]
at com.google.gson.Gson.getAdapter(Gson.java:556) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130) ~[gson-2.10.1.jar:?]
at com.google.gson.Gson.getAdapter(Gson.java:556) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130) ~[gson-2.10.1.jar:?]
at com.google.gson.Gson.getAdapter(Gson.java:556) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:55) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:196) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:368) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:70) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.ArrayTypeAdapter.write(ArrayTypeAdapter.java:104) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:70) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:196) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:368) ~[gson-2.10.1.jar:?]
at com.google.gson.Gson.toJson(Gson.java:842) ~[gson-2.10.1.jar:?]
at com.google.gson.Gson.toJson(Gson.java:812) ~[gson-2.10.1.jar:?]
at com.google.gson.Gson.toJson(Gson.java:759) ~[gson-2.10.1.jar:?]
at com.google.gson.Gson.toJson(Gson.java:736) ~[gson-2.10.1.jar:?]
at com.airepublic.bmstoinverter.core.bms.data.EnergyStorage.toJson(EnergyStorage.java:82) ~[core-api-0.0.1-SNAPSHOT.jar:?]
at com.airepublic.bmstoinverter.BmsToInverter.start(BmsToInverter.java:142) [bms-to-inverter-main-0.0.1-SNAPSHOT.jar:?]
at com.airepublic.bmstoinverter.BmsToInverter$Proxy$_$$_WeldClientProxy.start(Unknown Source) [bms-to-inverter-main-0.0.1-SNAPSHOT.jar:?]
at com.airepublic.bmstoinverter.BmsToInverter.main(BmsToInverter.java:68) [bms-to-inverter-main-0.0.1-SNAPSHOT.jar:?]
Caused by: java.lang.ClassNotFoundException: android.content.Context
at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[?:?]
at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]
... 30 more

from bms-to-inverter.

ai-republic avatar ai-republic commented on July 28, 2024

I have checked your config.properties.
Do you really have 16 battery packs? A battery pack consists (usually) of more lithium cells like 4 for 12V, 8 for 24V and 16 for 48V, etc. I assume you have 1 battery pack consisting of 16 x 3.6V cells (1P16S), so the numBatteryPacks parameter should be 1.

If you need to change the MQTT broker locator port (61616) please be aware to change it also in the application.properties of the webserver project if you want use the web-app.

Also, please pull the latest version, I just fixed an issue in the JSerialCommPort to ensure the port is open. That was lost in the commit yesterday and should work now.

from bms-to-inverter.

sanitariu avatar sanitariu commented on July 28, 2024

Thank you very much for the support ! I hope we will make it working ... even if you need remote shell i can arrange it ! Now seems like ttyUSB0 is opened and much better. Still there is something wrong in reading or sending data from the com port.
Attaching the log files with debug enabled.

config.properties.txt
debug.txt
pom.xml.txt

from bms-to-inverter.

sanitariu avatar sanitariu commented on July 28, 2024

I think something should be added like protocol RS232 instead 485 ...

from bms-to-inverter.

ai-republic avatar ai-republic commented on July 28, 2024

My bad, the port wasn't initialized properly with the frameLength, baudrate and startFlag. I committed the fix.

I will try and setup another PI today with the RS485/CAN hat so I can retest the RS485. I've been concentrating on CAN lately and only had one PI ready for testing.

from bms-to-inverter.

sanitariu avatar sanitariu commented on July 28, 2024

Hello, now is littler better ... we have some responses :)
09:28:44.140 WARN : Command 0x50 to BMS 1 successfully sent and received!
09:28:44.219 WARN : Command 0x53 to BMS 1 successfully sent and received!
09:28:44.289 WARN : Command 0x5a to BMS 1 successfully sent and received!
09:28:44.379 WARN : Command 0x5b to BMS 1 successfully sent and received!

But still have errors for id. Attaching the file.

debug1.txt

from bms-to-inverter.

ai-republic avatar ai-republic commented on July 28, 2024

Could you run this in debug mode please, then I can have a look what the frame looks like that has been received and why the msg.cmd is null. Thanks Todor!
BTW I've got my 2nd PI setup with the RS485 hat now so I can do some effective debugging again tomorrow

from bms-to-inverter.

sanitariu avatar sanitariu commented on July 28, 2024

Here is full debug. I see some good data !
10:03:09.365 DEBUG: ratedCellmV=3200, ratedCapacitymAh=280000
This is my battery 280AH
10:03:09.444 DEBUG: battery type={}=0 - this one is emtpy ?
10:03:09.612 DEBUG: maxPackChargeCurrent=2400, maxPackDischargeCurrent=-2400 - this i am not sure ...
Anyway i see the light in the tunnel :)

fulldebug.txt

from bms-to-inverter.

ai-republic avatar ai-republic commented on July 28, 2024

Ok, I fixed the issue with the RS485 msg.cmd (id). Please pull again :)
More tomorrow....

from bms-to-inverter.

sanitariu avatar sanitariu commented on July 28, 2024

Thanks. Much much better ! Now i see info like this
10:41:10.911 INFO :
BMS SOC V A CellMinV CellMaxV CellDiff
1 1.7 52.2 7.4 3.259 - 2 3.271(#0.009) 0.012

Seems like USB (RS232) is working too :)

Here is the log file

fulldebug.txt

from bms-to-inverter.

ai-republic avatar ai-republic commented on July 28, 2024

Ok - that looks all good :)

I think I know where the last exception (gson - android/content/Context) is coming from. I fixed it

from bms-to-inverter.

sanitariu avatar sanitariu commented on July 28, 2024

Here is the latest debug log. Also i have tested webserver and it shows some data. I think data is not correct.
Maybe this is wrong ?
10:41:17.731 DEBUG: BMS 1, Frame No.: 5, Cell No: 17. 3253mV
10:41:17.731 DEBUG: BMS 1, Frame No.: 5, Cell No: 18. 3255mV

I have noticed that it is reading data too fast. Is it possible that some data is not returned from the serial port ? Can we put reading like each 10 seconds or something like that ? Maybe it is crashing from that ?! (bad data)

Here it stops - java.lang.NoClassDefFoundError: android/content/Context

fulldebug.txt
Screenshot 2023-11-23 at 10 46 47

from bms-to-inverter.

ai-republic avatar ai-republic commented on July 28, 2024

I fixed the gson error now and made the code more resilient against errors.

The data that's received is correct. That's what's reported by the BMS. The 'Cell 17/18' is actually reported in the 5th frame but can be ignored. It's only because Daly sends a 5th frame to send the 16th cells value. I guess they don't clear their buffer properly - that's where cell 17 and 18 result

from bms-to-inverter.

sanitariu avatar sanitariu commented on July 28, 2024

Hello,
tested again with latest fixes. Now it is working better. Actually it is flooding the console with info each second which i think is too fast sending / getting data. It should be maybe 5-10 seconds interval. Anyway it was working for 2-3 minutes then stops. Do you know how i can log all the output ?

These are the last lines received:

09:39:52.438 DEBUG: Validation of frame failed!
09:39:52.438 DEBUG: Ignoring frame: RX Buffer (HEX): [0x00, 0x01, 0x95, 0x08, 0x05, 0x0C, 0xCD, 0x0C, 0xC7, 0x0C, 0xCC, 0x01, 0x95]

09:40:06.981 DEBUG: Scanning for expires on energystorage
09:40:06.982 DEBUG: Scanning for expires on energystorage done

Also on the webserver i noticed that you have BMS8 but they should be only 1. Maybe config.properties is not read by the webserver.
It is serial 9600 and maybe too fast or some result is not good. When it stops it does not continue / retry

from bms-to-inverter.

ai-republic avatar ai-republic commented on July 28, 2024

Hi Todor,
I could put in a configurable poll interval - that's no problem.

I guess that when it stops maybe the buffers are full on the PI. I'll have a look into that.

You can also log everything to file. I added a configuration to log to console and rotational log file.
You'll find the log file in the logs folder.

from bms-to-inverter.

sanitariu avatar sanitariu commented on July 28, 2024

Here is the lates log file. I have tried 4-5 seconds but it does not help. I think it is stopping at the same time. Maybe buffer ?! You can login to my machine and test if you like. It is okay for me.

BMS-to-Inverter.log.gz

from bms-to-inverter.

ai-republic avatar ai-republic commented on July 28, 2024

I've checked the log file and I guess its shutting down the BMS and inverter processing threads because of an uncaught exception coming from the MQTT service. I've generalized the exception handling so there shouldn't be any exceptions falling through.

Also I noticed that there are still 8 battery packs in your system. Is that correct? Or is it only 1? In that case you might need to check the numBatteryPacks configuration in config.properties and set it to 1.

from bms-to-inverter.

sanitariu avatar sanitariu commented on July 28, 2024

Hello, i have 1 pack and i fixed it now. Still it reads some data 5-6 times then it does not try anymore.

BMS-to-Inverter.log.gz

BMS-to-Inverter.log-2.gz

Second one is crashing on email but i have disabled email at all ...

from bms-to-inverter.

sanitariu avatar sanitariu commented on July 28, 2024

Ok i setup email and seems like it is working from 5 minutes :))) I put bms/inverter read data to 10 seconds.
On the webserver you must fix the number of packs. Maybe they are hardcoded. For the above crash maybe it was because email info was empty. You can fix it i think.
I was too hurry :( ... Crashed again but this time it took longer time.
Here is the log

BMS-to-Inverter-3.log.gz

from bms-to-inverter.

sanitariu avatar sanitariu commented on July 28, 2024

I tested today with latest fixes. Working for some minutes then it stops.
I think it is from "2023-11-29 18:48:00.909 | DEBUG | 2-thread-1 | s485.JSerialCommPort:132 | Validation of frame failed!" Maybe some data is corrupted or lagged but it should ignore data from that time and do not send to inverter anything ... then just retry on the next period ?
Attaching log file if you need it. Maybe you should try different approach like open com port , read data , close com port , then after the period open/read/close. I think com ports are more unstable than can and sometimes stuck for some period maybe ?!

BMS-to-Inverter.log.gz

from bms-to-inverter.

ai-republic avatar ai-republic commented on July 28, 2024

Hi Todor,
sorry for the late reply - I was very busy the last few days.
I logged in, tested and updated the application on your PI. Also made a small script in the home folder to speed things up with pulling a new version, building and starting the app.

Now to the problem. I've observed this also on my PI when running RS485 that Daly starts sending rubbish messages addressed to ID FF (255) or messages that are to short. I've tried to compensate the short messages by reading data from the stream and searching for the start flag (0xA5) and restarting from there but it didn't make any difference because the data was rubbish.

The next approach I want to try would be to read the RS485 stream and buffer it locally and start reading the messages from there (also better for debugging) and when it starts sending rubbish try to send a reset command and see if it starts sending correct messages again.

I will try to implement this on the weekend, since I'm still busy the next couple of days.

from bms-to-inverter.

sanitariu avatar sanitariu commented on July 28, 2024

Thank you very much for the support ! Waiting for stable 485 version so we can continue with the inverter :)

from bms-to-inverter.

sanitariu avatar sanitariu commented on July 28, 2024

Hello,
Tested latest fixes and data is read only once. Maybe the number of bytes is wrong always.

debug.log

from bms-to-inverter.

ai-republic avatar ai-republic commented on July 28, 2024

Closed this issue. All is fixed in the current version.

from bms-to-inverter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.