Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. [solved] RS485 nodes stop sending data after some hours or days

[solved] RS485 nodes stop sending data after some hours or days

Scheduled Pinned Locked Moved Troubleshooting
74 Posts 11 Posters 19.1k Views 18 Watching
  • 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.
  • S Stefan_NE

    Hi to all,

    i have the same problem since i changes some node to RS485. Setup
    Fhem 5.8
    Mysensors 2.2rc1
    Gateway Arduino Nano USB to Fhem.
    Nodes 5PC all Ardunino MiniPro; Energymeter, Relay,Temp DS18B20

    What I found out is, the nodes are not hanging. There is no communication to the gateway. Reboot the node does not help. After a reboot of the node pairing does not work.
    Reconnect the gateway to Fhen does not help.
    AFhem restart works ( shudown restart). After the restart all nodes are appearing them self.

    Today I will build a new gateway, using ESP8266 and RS485.
    I have used USB gateway before, with several problems. After i changes the gateway for NFR24 and RFM69 from USB to ESP8266 most of the problems are gone.

    I hope this will work. If not RS485 ist history and for this case Myssensors will be exchanges to 1-Wire.

    It takes one or two days to get the first results.

    Have a good day

    Stefan

    rejoe2R Offline
    rejoe2R Offline
    rejoe2
    wrote on last edited by
    #35

    @Stefan_NE
    Strange, imo using a serial GW is the most reliable option. (May be different in case the nano is a bad fake and problems with CH340G-nanos are also reported in VM environments.

    Are all nodes reffering to the korrect IO and how is the RS485-WG defined?
    Explanation: I also use a second GW and in some cases nodes are assigned to the wrong GW. If you use several /dev/ttyUSBx-defines, the IO may not be functional. See output of "ls -l /dev/serial/by-id".

    Most likely there is a electrical problem on your bus. Did you measure voltages, esp. between A+B? What type of modules or pcb's do you use?

    Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Stefan_NE
      wrote on last edited by
      #36

      @rejoe2
      good idea, that's what is thought meanwile, and i setup a serial gateway with an original Arduino Mega using hardware serial for the rs485. This is running now for 90 min. Let's see what happens. The serial gateway is the only one i use. All other nodes gateway are using wireless gateways.

      1 Reply Last reply
      0
      • rejoe2R Offline
        rejoe2R Offline
        rejoe2
        wrote on last edited by
        #37

        If you have more than one MySensors-GW's defined, imo it doesn't matter what type they are. Under some circumstances, nodes may be routed through the "wrong" GW. I would recommend to check that first (may be irritating, but even with the wrong GW assinged as IO, some readings are nevertheless updated when node is reset (presentation info)).
        Hardware serial is a good idea, but at least according to my personal experience (and opposite to my estimations in the beginning) my (FTDI-Nano-) GW is one of the most reliable parts in my MySensors-RS485-environment.
        Node_2 - my "troublemaker Nr. 1" - also performs reliably now (running without issues since 5+ days) since switched to HW-serial. But also a altsoftserial-Node with BME280 works at the same level of reliability for several weeks now (with less free memory left!) .
        Powering issues and capacitors may also be helpful as @nofox suggested. I may do some tests wrt this after switching to HW-serial for Node_2 in case it's still not performing as expected.

        Last: What modules do you use? In case of the LC-Tech ones, I would recommend to desolder at least the 120Ohm resistor on the "middle" nodes.

        Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Stefan_NE
          wrote on last edited by
          #38

          New status:
          the serial gateway based on the Arduino Mega with HW Serial failed after 27 hours. Same way to fix. I needed to restart FHEM and all nodes started working without any reboot e.g.
          I don't think about any bus problem.
          Next try is the gateway with an esp8266. Setup is done and all nodes are online. The major difference is the serial buffer of 256 bytes.
          Since i have changed my wireless nodes to the ESP8266 the failure of these nodes decreases a lot.

          rejoe2R 1 Reply Last reply
          0
          • gohanG Offline
            gohanG Offline
            gohan
            Mod
            wrote on last edited by
            #39

            Do you have an ethernet shield? If so try to make an ethernet gateway with the mega and when it hangs try to connect to it with myscontroller and see if you get a response.

            1 Reply Last reply
            0
            • S Stefan_NE

              New status:
              the serial gateway based on the Arduino Mega with HW Serial failed after 27 hours. Same way to fix. I needed to restart FHEM and all nodes started working without any reboot e.g.
              I don't think about any bus problem.
              Next try is the gateway with an esp8266. Setup is done and all nodes are online. The major difference is the serial buffer of 256 bytes.
              Since i have changed my wireless nodes to the ESP8266 the failure of these nodes decreases a lot.

              rejoe2R Offline
              rejoe2R Offline
              rejoe2
              wrote on last edited by
              #40

              @Stefan_NE Did you measure voltage A-B before restarting FHEM/the attached Arduino?
              I also had very strange effects and was convinced not to have any electrical problem on the bus - I was completely wrong (see reports above).

              Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

              1 Reply Last reply
              0
              • rejoe2R Offline
                rejoe2R Offline
                rejoe2
                wrote on last edited by
                #41

                One more update: This night my BME280-Node (Node_3 using altsoftserial) stopped transmitting - after around 8 days of operation... Strange!
                As Node_2 didn't crash completely in the past, I just desoldered my pullup- and pulldown-resistors that had been placed on that node (1k each). As I use the LC-Tech-Modules, now there are remaining only the full set of resistors on the GW (also the 2*20k) and at the last module in line.
                Communication seems to be stable from all nodes. As this is just one more snapshot wrt just around one hour of operation, I'm pretty interested what will happen next - or if that's just another small step in whatever direction.

                Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

                1 Reply Last reply
                0
                • nofoxN Offline
                  nofoxN Offline
                  nofox
                  wrote on last edited by
                  #42

                  Hi! My nodes stops working random once a week, once a month etc. I now upgrade my nodes sketch with watchdog timers. But not with avr/wdt library but with some code i’ve found in the internet. I dont upload the code to nodes but I’ve checked that the watchdog function working as I set some delay() into sketch. Its not a problem that the node hanging, the problem is They don’t restarting it self.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    Stefan_NE
                    wrote on last edited by
                    #43

                    New update, no good news
                    It was working for 10 hours, and after restart for another 4 hours. I will stop now the use of the RS485. It is to weak for my use case. I have spend to much time for this.
                    A couple of weeks ago, i switched from NFR24 to RFM 69, this is very stable. I will go for a secound RFM69 Network for this use case.

                    1 Reply Last reply
                    0
                    • rejoe2R Offline
                      rejoe2R Offline
                      rejoe2
                      wrote on last edited by
                      #44

                      One more: Node_2 has stopped transmission, so I resoldered for the use of HW-serial...
                      I really suspect AltSoftSerial to be incompatible with 1wire (at least using PIN10).

                      Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        Stefan_NE
                        wrote on last edited by
                        #45

                        Hi to all,

                        after the change to RFM69 last sunday all 7 nodes are running without any connection lost. I added an alive message every 2min to the sketch. No messages have been lost.

                        1 Reply Last reply
                        0
                        • rejoe2R Offline
                          rejoe2R Offline
                          rejoe2
                          wrote on last edited by
                          #46

                          @Stefan_NE Good to hear you finally succeded in having a reliable network.

                          News from my side:
                          After 5 days of operation it seems Node_2 is back in a mode of relaible communication, no more issues also with Node_1. These both are the ones sending a lot of data and use HW-serial + "triple-headed" message initialisation.

                          BUT: Node_3 (BME280) is no longer continously present now, and also Node_4 (sw-serial + "single-headed") seems to have communication problems (didn't yet investigate in depth). So next step will be to first change these sketches also for the use of the triple initialisation. If that works, I'll report - it then may be a good idea to change the defaults in the MySensors-lib (to be discussed).

                          Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

                          1 Reply Last reply
                          0
                          • P Offline
                            P Offline
                            pjr
                            wrote on last edited by
                            #47

                            @rejoe2 how is it going with your RS485 network?

                            rejoe2R 1 Reply Last reply
                            0
                            • P pjr

                              @rejoe2 how is it going with your RS485 network?

                              rejoe2R Offline
                              rejoe2R Offline
                              rejoe2
                              wrote on last edited by rejoe2
                              #48

                              @pjr Short story: Still no satisfying results, but to be honest, I didn't spend too much time on that for now. The - for the moment - most important part (Node_1) works pretty reliably, the others I have to restart from time to time (Node_2 is always the first to fail)

                              Longer story:

                              • ordered some MAX487 chips to replace the MAX485 - this took some weeks from China and they still need to be soldered when there's time to do that...
                              • GW (seems to work reliably by now):
                                -- tried to use a Pro Micro with hw-serial as gw - didn't work as expected, I reported about that some weeks ago (may have been in the fhem-forum).
                                -- Next step is to review it (Pro Micro, Nano or STM32F103) once more when replacing the transceivers and do some testing wrt resistor values
                              • The timing on the nodes may also offer room for improvement - by now, my plan is to really delay the startup procedures (or the first measurement) and nail the measurement times to a fixed value. This may avoid overlap of the nodes sending slots in direction to the gw as much as possible.
                              • last step could be a review on powering issues, seems Node_1 at some point in time suffered from issues wrt that; maybe there are other nodes with similar effects too (all nodes have a lot of wires attached).

                              Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

                              1 Reply Last reply
                              0
                              • rejoe2R Offline
                                rejoe2R Offline
                                rejoe2
                                wrote on last edited by rejoe2
                                #49

                                Short update, thx for reminding me there's still work to do :grin::

                                • Moved pullpup-/pulldown resistors (440Ohm) from one end of the network to the other (now: GW).
                                • Replaced all MAX485 with MAX487 (all placed on LC-Modules, most of the resistors 5-7 are desoldered, the 120Ohm's remain only on GW and last node).
                                • SOH-Count is now set to 3 on GW and Nodes 1 to 3 and 5, so only Node 4 (BME280) is remaining with default (1)

                                At first sight, everything's working, and node 2 for now seems not to fail as soon as the last time before these changes; but as always: If this is really reliable over time, we'll see. So expect at least one more update, hope this will be the last :grinning:

                                Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

                                1 Reply Last reply
                                0
                                • P Offline
                                  P Offline
                                  pjr
                                  wrote on last edited by
                                  #50

                                  I had quite strange problem with my smaller network. There is a nano with enc28j60 shield as gateway and there was 2 relay/fet-nodes for controlling lights. Everything was fine until now I added one light switch node to the network. After that only the light switch was working. Strange...

                                  Disconnected all the nodes from network and checked what is causing the problem. It was the GW. Measured the bus between A and B was ~2.5V. So it was pulling the bus to logical one all the time.

                                  Changed the RS485 module.. no help. Then measured the "MY_RS485_DE_PIN" what I was using pin 2. The enc28j60 shield was pulling the pin to 0.6V and that was causing the RS485 shield to drive bus to ~2.5V. I changed the pin to 3 and now everything is working like a dream. Of course none of these nodes are sending all the time so most likely there wont be any collisions.

                                  So when some node/bus is hanging next time measure the voltage of DE-pin :D

                                  mickM 1 Reply Last reply
                                  1
                                  • O Offline
                                    O Offline
                                    otto001
                                    wrote on last edited by
                                    #51

                                    I am thinking about changing my Mysensor-Nodes from NRF24L01+ to RS485 because of stability. But while reading this, I am not sure anymore, if this is a good idea
                                    Anyone has this up & running successfully already?

                                    1 Reply Last reply
                                    0
                                    • rejoe2R Offline
                                      rejoe2R Offline
                                      rejoe2
                                      wrote on last edited by
                                      #52

                                      So once more a short update: No significant changes achieved by changing the transmitters and the placing of the resistors - only two of 4 nodes are working as expected :sob: , the 5th (Node_2) is still turned off to prevent possible interference with Node_1.

                                      As two of them are online since my last post (around 18 days), I'm quite sure, it's not a gw issue as @pjr reported, and as one of the nodes is powered from a different source than the other 3 and different than the GW, it seems also not to be powering related. So I'm a little running out of ideas how to further debug :sob: .

                                      Now', Im thinking about reverting Baudrate back to 9600 and - in case this will not help (what most likely will happen) - splitting up the bus to two lines, this may help to find out what is going on with individual nodes.

                                      So @otto001 At this point in time I'd say: It really depends...
                                      If you have only a few nodes (2-3+GW) you want to attach, RS485 is a simple and secure option. But as soon as there are more, one failing will affect the entire communication - that's really no fun. So stay with nRF24 (or other wireless transceivers) for nodes just sending in data and try RS485 with a few important switching/security relevant nodes first.

                                      Just my2ct...

                                      Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

                                      K 1 Reply Last reply
                                      0
                                      • gohanG Offline
                                        gohanG Offline
                                        gohan
                                        Mod
                                        wrote on last edited by
                                        #53

                                        the problem with cables and signals is that every environment is different, cables are different , there are a lot of possible causes that can screw up communication on bus

                                        rejoe2R 1 Reply Last reply
                                        0
                                        • gohanG gohan

                                          the problem with cables and signals is that every environment is different, cables are different , there are a lot of possible causes that can screw up communication on bus

                                          rejoe2R Offline
                                          rejoe2R Offline
                                          rejoe2
                                          wrote on last edited by
                                          #54

                                          @gohan I absolutely agree. Wrt to wiring: Most of the wires I use are twisted pairs of CAT6 network cables (one pair for signal, and - when distributing also 12V - one for 12V+GND). Some newer parts (trouble began before that) are 4 wire telefone wires with around the same copper diameter per single line.
                                          Connections: Just one Wago between GW and Node_1, the others are either directly screwed using the modules or build short stubs (<20cm) from a Wago clamp with three connections (in/stub to node/out).

                                          So if you see room for improvement, suggestions are welcome :smile:

                                          Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          17

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular