Hi! I think I came up with the solution for all our problems but I don't know if it is worth and possible at all. The thing is that RS485 isn't a multimaster bus, thats what we all know. So the best option is to turn the gateway in to master and all other nodes to slaves. I'm thinking if there are any possibilities to make the gateway to ask nodes in the order one by one for its states (child states). The nodes can only talk to the gateway when the gateway ask for their states. This process should take place in endless loop in the highest possible speed (depending on the count of nodes in the network). I think that in this option the baud rate matters, cause higher baud rates makes the time of a single loop shorter minimizing the delay that may occur in the networks with many nodes. Maybe I'm reinventing the wheel now and this type of transmission needs to rewrite all MySensors protocols..
nofox
Posts
-
💬 Building a wired RS485 sensor network -
[solved] RS485 nodes stop sending data after some hours or daysAnyone know how to implement this https://github.com/MichaelJonker/HardwareSerialRS485/wiki to mysensors ? It can operate in multimaster mode and avoid collision issues.
-
💬 Building a wired RS485 sensor networkHi! My problem still exist. I switched to newest MySensors Library and to HWSERIAL and some nodes acts the same as before... Now i'm thinking that maybe its related to DE_PIN 2 ?? Someone tried to switch to other pin for Enable function for RS485 ?? Now after almost a year I'm thinking about changing my transmission from wired RS485 to wireless nRF.. I choose RS485 because of its stability (thats what I taught over a year ago ). Now I think that RS485 its a piece of garbage..
-
[solved] RS485 nodes stop sending data after some hours or daysI think the problem is not from the RS485 side, not from cabling etc. I have similar problems on my RS485 network, some nodes stop sending data for no reasons after some time (sometimes 2 days sometimes 4 weeks). I have changed from AltSoftSerial to HWSERIAL and its the same.. Maybe its about ENABLE PIN 2 ?? Anyone try to change this pin to other ??
-
💬 Building a wired RS485 sensor networkHi! It’s me again. I want to precise one thing. Are there anyone here who have succesful working RS485 network without any issues? We are talking here about issues but maybe someone have fully working sensors network?
-
[solved] RS485 nodes stop sending data after some hours or daysHi! 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.
-
[solved] RS485 nodes stop sending data after some hours or daysThere is one thing that we all need to try. When you using RS485 than you have power supply somewhere far far away from nodes. Longer power lines means higher inductance and far more noise on power lines. I think we need to try to put some 10 - 100uF electrolitic cap on all nodes (i have 10uF on each node) and few ceramic 100nF near the microprocessor on every node. If you use atmega328p you need at least 3 of 100nF caps ( i forget to put them on my nodes). I’we read that this 100nF caps are very big improvement in power supplying the atmega.
-
[solved] RS485 nodes stop sending data after some hours or daysHi! Everything working pretty well, but sometimes some random node stops to communicate and react for pressing buttons. I have watchdogs in every nodes so I think that only communication is hanging.. Is it possible that only altsoftserial library hanging inside arduino code ??
-
💬 Temperature SensorJumping 0.8 immediately after switching the relay and sometimes rising very slow during the time when relay is on.
-
💬 Temperature SensorHi, I have few in wall nodes mounted under the light switches. I have two relays and one DS18B20 in each node. When i'm turning light on, switching the relay, the DS18B20 readings jumping about 0.8 degrees celsius up. When I switch off the relay readings back to normal. Anyone have similar problems ? Sensors are away from from node board, relays etc. so it's not about the heat from atmega or relays.
-
[solved] RS485 nodes stop sending data after some hours or days@gohan No I can't operate it with button. Relays are not optoisolated, i don't isolate them because my node board are powered by 5V and i can't provide external power only for relays.
-
[solved] RS485 nodes stop sending data after some hours or days@sineverba I have some problems with my RS485 sensors too. They working for few days like a charm and than one of them stops sending and receiving data. Most of the time it happend when I click button and relay switch the light. My wiring is ok, i have pull-ups and pulldowns in the middle on master and termination on both ends. I have watchdog enabled
void before() { wdt_disable(); // maybe redundant wdt_enable(WDTO_8S); // sensors.begin(); }But even with that the node won't reboot so i think it may not hangs and only lost communication. Maybe its something wrong with AltSoftSerial lib ??
I should mention that I'm using OneButton lib to extend functionality of my pushbuttons for long press and double click. Maybe that library have some issues with AltSoftSerial or MySensors ?
-
💬 Building a wired RS485 sensor networkHello again. After a week of thinking and hard work i finally got RS485 network working very close to what I want. I've done everything like it was mentioned here before. Fully bus-like network, termination only on both ends of line and pull-up and pull-down on the gateway. I also change MySensors library to newest 2.1 beta branch. All nodes working very good for last month but some times one node hanging and I can't control it via OpenHab or built in switch. I don't know what cause this behavior. I turn on watchdog timers in every nodes and theoretically when node hangs, watchdog should reboot arduino after 8 seconds. Practically it won't reboot my node.. It seems like the node don't really hangs but the communication stops.. Is it possible that one node can loose connection while other nodes on the same bus/wires working like a charm ?
-
openHAB 2.2 bindingI don't know if it would help but openhab reconnects with the gateway when I change something in .things file and save it. Binding reloads and all starts to comunicate again.
-
openHAB 2.2 binding@TimO I confirm, I could reproduce that simply by resetting gateway or disconnect it from the network for a second. My gateway and controller are also on static IPs.
-
openHAB 2.2 bindingOk, I've found that sanity check starting when you configure your thing through .thing file not from PaperUI. The sanity checker runs but when I disconnect and connect gateway sanity check send message to gateway and return that gateway isn't connected and start counting retries to disconnecting. That repeats until I restart OpenHab..
-
openHAB 2.2 bindingThere are some new issues, OpenHab disconnect form gateway by it self, and did not reconnect. It was in the middle of the night when only temperature sensors sending data sometimes when temperature change.. After I restart openhab2 service all starts to work normal..
-
openHAB 2.2 bindingI have the same problem as @philro describe. I run a new topic here https://forum.mysensors.org/topic/7346/openhab-don-t-want-to-reconnect-after-gateway-restart . When I disconnect and than connect again or restart gateway everything seems to be Online but I can't take no action with actuators and don't receive any information from nodes. Also in log of OpenHab and gateway debug I can't see any "sanity check" behavior.
-
OpenHab don't want to reconnect after Gateway restartHi, I have OpenHabian installed on RPi3 and I have MySensors ethernet gateway configured on arduino uno and W5100 shield and Rs485 sensors network. (I have some problems with RS485 communication but I mentioned that in other thread.) The issue is that when I reset gateway or when I disconnect ethernet cable for a while I need to reboot my openhab or restart openhab service because openhab won't reconnect with gateway. All of configured things are marked as ONLINE but i can't switch any relays from OpenHab. Maybe you have some ideas what I'm doing wrong ?
P.S. I'm configured my Things and Items with autodiscover, not by editing some config files. -
💬 Building a wired RS485 sensor network@gohan I have IDE 1.6.11 and boards definition 1.6.11 because on newer boards definition I've got boot loop on gateway. I'm using 2.1.1 MySensors library. Maybe I should mention that I can ping my gateway without any problems, only rs485 part seems not responding..