• Categories
    • Recent
    • Tags
    • Popular
    • Register
    • Login

    [SOLVED] Serial problem

    Scheduled Pinned Locked Moved Troubleshooting
    57 Posts 4 Posters 8.4k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • skywatchS Offline
      skywatch
      last edited by skywatch

      I am baffled by the following message - can anyone shed some light on it please?
      From MyController log......

      2018-08-06 02:24:47,314 ERROR [Thread-7] [org.mycontroller.standalone.gateway.serial.SerialDataListenerjSerialComm:178] Exception, RawMessage:[140;255;3;0;21;0]
      java.lang.NumberFormatException: For input string: "140"
      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)
      
      jkandasaJ 1 Reply Last reply Reply Quote 0
      • T Offline
        Tag MOD
        last edited by

        Hi!,

        Strange, never seen these....

        • How often do you see these messages?
        • Since when do the show up? (aka what has changed) 😉
        1 Reply Last reply Reply Quote 0
        • jkandasaJ Offline
          jkandasa @skywatch
          last edited by

          @skywatch This is should not happen for integer-String. This error puzzled me 😕

          1 Reply Last reply Reply Quote 0
          • skywatchS Offline
            skywatch
            last edited by

            @Tag Seems to happen at random, I am still trying to work out why, it's odd unless....

            @jkandasa - It's puzzled me too. I wonder if it is because it is a 3 digit node? I'll try renaming the node to a 2 digit tomorrow and see if it still has the problem..... Any bets on the outcome? 😉

            1 Reply Last reply Reply Quote 0
            • skywatchS Offline
              skywatch
              last edited by skywatch

              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!

              jkandasaJ 1 Reply Last reply Reply Quote 0
              • jkandasaJ Offline
                jkandasa @skywatch
                last edited by

                @skywatch Can you send me the complete log to my email address. It will be helpful to see any junk character with the number?

                skywatchS 1 Reply Last reply Reply Quote 0
                • skywatchS Offline
                  skywatch @jkandasa
                  last edited by

                  @jkandasa

                  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! 😉

                  skywatchS 1 Reply Last reply Reply Quote 0
                  • skywatchS Offline
                    skywatch @skywatch
                    last edited by skywatch

                    @jkandasa

                    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....
                    0_1533911512655_Before.JPG

                    After... One biggie to cool the CPU and controller....
                    0_1533911536024_After.JPG

                    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! 🙂

                    jkandasaJ 1 Reply Last reply Reply Quote 1
                    • jkandasaJ Offline
                      jkandasa @skywatch
                      last edited by

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

                      0_1533917506215_f2f975eb-da06-4fcd-ae03-2bc80a6c957c-image.png

                      1 Reply Last reply Reply Quote 0
                      • skywatchS Offline
                        skywatch
                        last edited by skywatch

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

                        skywatchS 1 Reply Last reply Reply Quote 0
                        • skywatchS Offline
                          skywatch @skywatch
                          last edited by

                          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.

                          skywatchS 1 Reply Last reply Reply Quote 0
                          • skywatchS Offline
                            skywatch @skywatch
                            last edited by

                            @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!

                            1 Reply Last reply Reply Quote 0
                            • skywatchS Offline
                              skywatch
                              last edited by

                              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!

                              jkandasaJ 1 Reply Last reply Reply Quote 0
                              • jkandasaJ Offline
                                jkandasa @skywatch
                                last edited by

                                @skywatch ok, The corrupted data only reports in node id right?

                                jkandasaJ skywatchS 2 Replies Last reply Reply Quote 0
                                • jkandasaJ Offline
                                  jkandasa @jkandasa
                                  last edited by

                                  @skywatch I have added a workaround for number issue, Can you check it in the SNAPSHOT version?

                                  1 Reply Last reply Reply Quote 0
                                  • skywatchS Offline
                                    skywatch @jkandasa
                                    last edited by

                                    @jkandasa Yes - oddly it is only the node ID that seems to be corrupted with junk characters...

                                    1 Reply Last reply Reply Quote 0
                                    • skywatchS Offline
                                      skywatch
                                      last edited by

                                      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!

                                      1 Reply Last reply Reply Quote 1
                                      • skywatchS Offline
                                        skywatch
                                        last edited by

                                        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.

                                        jkandasaJ 1 Reply Last reply Reply Quote 0
                                        • jkandasaJ Offline
                                          jkandasa @skywatch
                                          last edited by

                                          @skywatch

                                          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?

                                          skywatchS 1 Reply Last reply Reply Quote 0
                                          • skywatchS Offline
                                            skywatch @jkandasa
                                            last edited by

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

                                            skywatchS 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            0

                                            Online

                                            587

                                            Users

                                            529

                                            Topics

                                            3.4k

                                            Posts
                                            Copyright © 2015-2025 MyController.org | Contributors | Localization