|
Post by toxicity on Jan 19, 2020 20:01:35 GMT
I bought an Renogy Rover 20A and I like to use the serial port for Data Collection, but I get no data. I've connected it with an Keyestudio FTDI Controller and used the correct Data Lines (TX/RX/GND/GND/+/+). And a lot of tools that I found, including the official one, but no chance. I get no Data.
Could you help me?
|
|
|
Post by tattoo on Jan 19, 2020 20:34:53 GMT
What else do you have? What panels and how many? What do you mean by a lot of tools?
|
|
|
Post by tattoo on Jan 19, 2020 20:41:44 GMT
Oh yea, Battery type and size you know everything you have in your system.............
|
|
|
Post by toxicity on Jan 19, 2020 21:00:05 GMT
|
|
|
Post by mediadogg on Jan 20, 2020 0:39:34 GMT
One common mistake is to forget to reverse the TX and RX lines for the serial connection. For bi-directional flow, TX -> RX and vice-versa between the two devices.
|
|
|
Post by retrodaredevil on Jan 20, 2020 1:38:23 GMT
So because you're getting time outs, that means that something isn't connected correctly. Basically what's happening is the program is asking the controller: "give me data", it waits, gets no data, and gives you an error.
Also as the person who made solarthing, it would be awesome if you could give me the stacktrace (the errors). If it's something on my end, I will try and fix it.
As mediadogg said, you need to connect the Rover's RX to your device's TX and the Rover's TX to your device's RX.
|
|
|
Post by toxicity on Jan 21, 2020 14:59:43 GMT
One common mistake is to forget to reverse the TX and RX lines for the serial connection. For bi-directional flow, TX -> RX and vice-versa between the two devices. Checked that, more than twice, also with an Oscilloscope, i see no Data stream. And TX shows a strange Voltage to Ground, -0.7V, Yes that is a negative. Because I thought that maybe the FTDI is faulty, i also tried it with an Buspirate. Also as the person who made solarthing, it would be awesome if you could give me the stacktrace (the errors). If it's something on my end, I will try and fix it. Sure thing: toxicity@Opeth 15:57 > /opt/solarthing/program/$ sudo java -jar solarthing.jar config/base.json
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. 2020-01-21 15:57:34.413 [main] INFO me.retrodaredevil.solarthing.program.SolarMain - [LOG] Beginning main [stdout] Beginning main 2020-01-21 15:57:34.517 [main] ERROR me.retrodaredevil.solarthing.program.SolarMain - (Fatal)Got exception! java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `me.retrodaredevil.io.serial.SerialConfig` (no Creators, like default construct, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information at [Source: (FileInputStream); line: 4, column: 20] (through reference chain: me.retrodaredevil.solarthing.config.io.SerialIOConfig["serial_config"]) at me.retrodaredevil.solarthing.program.SolarMain.createIOBundle(SolarMain.java:422) ~[solarthing.jar:?] at me.retrodaredevil.solarthing.program.SolarMain.doRoverProgram(SolarMain.java:299) [solarthing.jar:?] at me.retrodaredevil.solarthing.program.SolarMain.connectRoverSetup(SolarMain.java:275) [solarthing.jar:?] at me.retrodaredevil.solarthing.program.SolarMain.doMain(SolarMain.java:465) [solarthing.jar:?] at me.retrodaredevil.solarthing.program.SolarMain.main(SolarMain.java:475) [solarthing.jar:?] Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `me.retrodaredevil.io.serial.SerialConfig` (no Creators, like default construct, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information at [Source: (FileInputStream); line: 4, column: 20] (through reference chain: me.retrodaredevil.solarthing.config.io.SerialIOConfig["serial_config"]) at com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:67) ~[solarthing.jar:?] at com.fasterxml.jackson.databind.DeserializationContext.reportBadDefinition(DeserializationContext.java:1589) ~[solarthing.jar:?] at com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1055) ~[solarthing.jar:?] at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserialize(AbstractDeserializer.java:265) ~[solarthing.jar:?] at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138) ~[solarthing.jar:?] at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:369) ~[solarthing.jar:?] at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:194) ~[solarthing.jar:?] at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:161) ~[solarthing.jar:?] at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:130) ~[solarthing.jar:?] at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:97) ~[solarthing.jar:?] at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:254) ~[solarthing.jar:?] at com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:68) ~[solarthing.jar:?] at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4202) ~[solarthing.jar:?] at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3242) ~[solarthing.jar:?] at me.retrodaredevil.solarthing.program.SolarMain.createIOBundle(SolarMain.java:420) ~[solarthing.jar:?] ... 4 more
Which Java Version do you recommend? I tried openjdk v8, 10 and 13. All three don't work.
|
|
|
Post by mediadogg on Jan 21, 2020 15:54:16 GMT
One clue that I use for when something is wrong with my system or design is that everything that works for others fails for me ... I'm just saying ...
Try thinking outside the box: what cable / wire, connection, etc. are you assuming must be OK, in this case actually has that 1 in a million fault? Swap cables or check continuity wire by wire for pre-assembled cables, etc.
Also, have you tried one the cables that have been mentioned elsewhere in this forum that are known to work with the Rover serial output? and are you expecting TTL or true RS232 voltage levels?
|
|
|
Post by retrodaredevil on Jan 21, 2020 16:03:33 GMT
Thank you for that stacktrace. That is an error on my end and I will fix it. Java 8 or greater should work just fine. That error is not related to your Java version.
Because you gave me the stacktrace, you must be defining "serial_config" in your "io" file. You can set this to null or just don't define it and the default should work fine. (There is no reason to override the default)
You should be able to use default_linux_serial.json located in config_templates/io/default_linux_serial.json. If you don't see that, run a git pull because I updated solarthing a few days ago. As for your base.json file, I'm assuming it's working correctly because if it wasn't the error would have been from that file first.
If you can any more errors, if you could post your base.json file and your "io" file I can make sure it is correct. Thanks for trying out SolarThing.
Now, for your negative voltage, that is normal for RS232 communication. RS232 communication uses a positive voltage to represent a "0" and a negative voltage to represent a "1". I have no experience with a "Keyestudio FTDI Controller", but you should make sure that it supports RS232 communication. If it doesn't, you'll likely have to buy an adapter specifically for RS232 and wire it up manually.
|
|
|
Post by toxicity on Jan 21, 2020 16:20:42 GMT
The Keyestudio FTDI Controller features an FT232R Chip, which should support RS232 according to data sheet. Try thinking outside the box: what cable / wire, connection, etc. are you assuming must be OK, in this case actually has that 1 in a million fault? Swap cables or check continuity wire by wire for pre-assembled cables, etc. I made an custom cable, checked it and it works.
|
|
|
Post by toxicity on Jan 21, 2020 17:19:43 GMT
The Renogy sends something at bootup, but after that nothing.
|
|
|
Post by mediadogg on Jan 21, 2020 18:27:43 GMT
The Keyestudio FTDI Controller features an FT232R Chip, which should support RS232 according to data sheet. Try thinking outside the box: what cable / wire, connection, etc. are you assuming must be OK, in this case actually has that 1 in a million fault? Swap cables or check continuity wire by wire for pre-assembled cables, etc. I made an custom cable, checked it and it works. What does "works" mean? With what? Is there any reason you are not using the cables that others are using? See here.Apologies if you have already said, or if I got your scenario wrong.
|
|
|
Post by toxicity on Jan 21, 2020 18:56:03 GMT
There are no premade cables avalable, so i used an RJ-12 Cable, cut one side and soldered Dupoint connectors onto it. The RJ-12 Connector has this color coding (from left): White, Brown, Green, Yellow, Grey and Pink. Assumed White is TX, Brown is RX and Green is GND. Grey and Pink only shows 15V so I assume they are just the +/+. RX shows 0V and TX -5,6V.
|
|
|
Post by mediadogg on Jan 21, 2020 19:23:00 GMT
Ok, take a look at this, from elsewhere in the forum, for my DIY cable. Worked with all the Renogy BT ports I own. Notice that the RJ-12 pinout from the Rover jack is different from the RJ-12 FTDI cable pinout.
|
|
|
Post by toxicity on Jan 21, 2020 19:26:08 GMT
You should activate the sharing.
I bought an TTL to RS232 Converter, maybe it will help.
|
|