[SOLVED] Serial problem
-
Hi!,
Strange, never seen these....
- How often do you see these messages?
- Since when do the show up? (aka what has changed)
-
@skywatch This is should not happen for integer-String. This error puzzled me
-
-
Hmmmm....Happens with 2 digit node number as well....
2018-08-09 10:55:47,327 ERROR [Thread-7] [org.mycontroller.standalone.gateway.serial.SerialDataListenerjSerialComm:178] Exception, RawMessage:[2
Now that is interesting! - I highlighted the whole error section and copied to paste (in win 10 latest version) and this is all that pasted in!
Here is the full message copied a bit at a time....
2018-08-09 10:55:47,327 ERROR [Thread-7] [org.mycontroller.standalone.gateway.serial.SerialDataListenerjSerialComm:178] Exception, RawMessage:[24;1;1;0;0;22.23] java.lang.NumberFormatException: For input string: "24" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:580) at java.lang.Integer.valueOf(Integer.java:766) at org.mycontroller.standalone.provider.mysensors.MessageParserAbstract.update(MessageParserAbstract.java:112) at org.mycontroller.standalone.provider.mysensors.MessageParserSerial.getMessage(MessageParserSerial.java:32) at org.mycontroller.standalone.provider.mysensors.MessageParserSerial.getMessage(MessageParserSerial.java:28) at org.mycontroller.standalone.gateway.serial.SerialDataListenerjSerialComm.serialEvent(SerialDriverJSerialComm.java:147) at com.fazecast.jSerialComm.SerialPort$SerialPortEventListener.waitForSerialEvent(SerialPort.java:937) at com.fazecast.jSerialComm.SerialPort$SerialPortEventListener$1.run(SerialPort.java:885) at java.lang.Thread.run(Thread.java:748)
The only thing is that both nodes had the number "4" in them and when I tried to paste the log contents it would always stop pasting where the "4" was supposed to be. This happened on both line 1 and line 2 in the above code. I had to copy the bits around the "4" and manually add the "4" back in to post.....Hmmmmm
Maybe a pointer? I dunno, it is strange!
-
@skywatch Can you send me the complete log to my email address. It will be helpful to see any junk character with the number?
-
I've taken the HW apart for now as I had issues again - I will re-build asap and will get the log files for you then. Shouldn't be too long I hope!
-
You are correct in your thinking - I have looked at the whole log and there are numerous occasions where I see a space between (or after on single digit) numbers.
I'll email the log to you..... And below is the result of better cooling on the mycontroller pi3.......
Before....
After... One biggie to cool the CPU and controller....
I did the same to a pi3 running seti @ home on all four cores 24/7 and it hasn't creashed since(!), so here's hoping for this one.....Best of all it still fits in the case!
-
@skywatch I see the following junk char in the log, I do not know how this is happening,
- Problem with serial gateway/recent MySensors library?
- Problem with JSerialComm driver?
Let me try to build recent JSerialComm driver for you.
-
@jkandasa - Well, not so much of a puzzle now then
Don't worry about the 'nan' values - I can filter them at the node (have modified the code but not had time to upload it as node is builit in to equimpent and soon I will change the sensors to a different type anyway). - Will do that this weekend as it is going to rain here now.....
It is really only the corrupted strings that it would be good to stop, if possible.
-
It has been 10 hours now without any problems. I did think of lowering the serial baud rate to 19200 and see if that helps. I could also replace the pro mini with another one and see if that helps. But I will give it more time and see how it goes.
-
@skywatch So I got another corrupted string today and now I have lowered the serial baud rate to 19200 between GW and MyC...... I'll let you know the result!
-
Reducing serail baud rate had no effect. Still getting corrupted data on the first value of the raw data - I'll have to have another think about this one!
-
@skywatch ok, The corrupted data only reports in node id right?
-
@skywatch I have added a workaround for number issue, Can you check it in the SNAPSHOT version?
-
@jkandasa Yes - oddly it is only the node ID that seems to be corrupted with junk characters...
-
I have the snapshot version now, thank you - I want to see how it goes for a day first as I have modified the pi slightly and want to see what effect, if any, that has first.
As always I will let you know how it goes in a few days!
-
Just a quick update - 25 hours and no corrupted node id's, so I am optimistic on the mod.......But, at 6.30AM all data stopped flowing from all nodes - a disconnect and re-connect of the GW pro mini and all came back....hmmm.
-
Just a quick update - 25 hours and no corrupted node id's, so I am optimistic on the mod.......
Can you share what change needs in hardware to resolve this issue?
But, at 6.30AM all data stopped flowing from all nodes - a disconnect and re-connect of the GW pro mini and all came back....hmmm.
Did gateway reconnect automatically? Can you email me the mycontroller.log file?
-
@jkandasa - Gateway reconnected automatically.
It all went bad today - I tried a new 5v pro mini GW (with level shifter for data lines) and that failed miserably. So I made a new 3.3V pro mini GW and a new 3.3v regulator board, and have spent the last 7 hours trying to get things working again.
Sadly I think this will require a full reinstall, losing all data from the hot summer and taking more time than I have available to put into it. Just as it was looking hopeful too......
I'm gutted.
P.S. Hardware (Rpi3). Add a 100n capacitor across the 5VDC input on the back of the pi (points to attach to are PP2 and PP5). It will filter out spikes on the power input to the pi. An 0805 SMD ceramic multilayer cap is what I used and I suggest the same for anyone else - but I take no resoposibility if you break a pi - do it at your own risk and only if competent to do so.
-
At 21.30 I got it back to working again with a different 3.3v pro mini as GW, at 22.50 I got the first corrupted node data and at 23.45 all data from remote nodes stopped again and it remained in this state until half an hour ago when I powered down/ powered up the pi.