• header.categories
    • header.recent
    • header.tags
    • header.popular
    • register
    • login

    [SOLVED] Serial problem

    scheduled pinned locked moved Troubleshooting
    57 posts 4 posters 19.7k views 2 watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • jkandasaJ offline
      jkandasa @skywatch
      global:last-edited-by,

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

      one-reply-to-this-post last-reply-time reply quote 0
      • skywatchS offline
        skywatch
        global: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? 😉

        one-reply-to-this-post last-reply-time reply quote 0
        • skywatchS offline
          skywatch
          global: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 one-reply-to-this-post last-reply-time reply quote 0
          • jkandasaJ offline
            jkandasa @skywatch
            global: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 one-reply-to-this-post last-reply-time reply quote 0
            • skywatchS offline
              skywatch @jkandasa
              global: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 one-reply-to-this-post last-reply-time reply quote 0
              • skywatchS offline
                skywatch @skywatch
                global: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 one-reply-to-this-post last-reply-time reply quote 1
                • jkandasaJ offline
                  jkandasa @skywatch
                  global: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

                  one-reply-to-this-post last-reply-time reply quote 0
                  • skywatchS offline
                    skywatch
                    global: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 one-reply-to-this-post last-reply-time reply quote 0
                    • skywatchS offline
                      skywatch @skywatch
                      global: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 one-reply-to-this-post last-reply-time reply quote 0
                      • skywatchS offline
                        skywatch @skywatch
                        global: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!

                        one-reply-to-this-post last-reply-time reply quote 0
                        • skywatchS offline
                          skywatch
                          global: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 one-reply-to-this-post last-reply-time reply quote 0
                          • jkandasaJ offline
                            jkandasa @skywatch
                            global:last-edited-by,

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

                            jkandasaJ skywatchS topic:replies-to-this-post, 2 last-reply-time reply quote 0
                            • jkandasaJ offline
                              jkandasa @jkandasa
                              global:last-edited-by,

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

                              one-reply-to-this-post last-reply-time reply quote 0
                              • skywatchS offline
                                skywatch @jkandasa
                                global:last-edited-by,

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

                                one-reply-to-this-post last-reply-time reply quote 0
                                • skywatchS offline
                                  skywatch
                                  global: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!

                                  one-reply-to-this-post last-reply-time reply quote 1
                                  • skywatchS offline
                                    skywatch
                                    global: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 one-reply-to-this-post last-reply-time reply quote 0
                                    • jkandasaJ offline
                                      jkandasa @skywatch
                                      global: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 one-reply-to-this-post last-reply-time reply quote 0
                                      • skywatchS offline
                                        skywatch @jkandasa
                                        global: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 one-reply-to-this-post last-reply-time reply quote 0
                                        • skywatchS offline
                                          skywatch @skywatch
                                          global:last-edited-by,

                                          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.

                                          jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
                                          • jkandasaJ offline
                                            jkandasa @skywatch
                                            global:last-edited-by,

                                            @skywatch Can you share your hardware(serial gateway) and power supply details?

                                            skywatchS one-reply-to-this-post last-reply-time reply quote 0
                                            • first-post
                                              last-post

                                            0

                                            online

                                            644

                                            users

                                            532

                                            topics

                                            3.4k

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