Hi everybody. I'd like to give some feedback on my experience as a new MySensors user here. As you can guess from the title, it's not going to be very positive. I hope this kind of post is not unwelcome. It's also very long. Please don't take this badly. It's just my own experience with MySensors I'd like to share.
Short info on me. I'm a software developer mainly working on GPU low level code. Although mostly a software guy, I have some experience with the hardware side of embedded systems and I know my way around a soldering iron and a scope. I was looking for a way to improve my home automation setup, mostly made of ZWave and cheap 433Mhz devices, with something open that would give me more control. Basically build my own nodes. MySensors seemed to fit this perfectly.
So came the lockdown and hey, perfect opportunity to get started ! Got myself a couple of Arduino Nanos, a few NRF24L01+ and lots of motivation to get my first GW and test node running. Unfortunately it ended up being an extremely frustrating and time consuming experience. More than once I had to resist the urge to throw everything in the nearest trash bin.
Problem 1. The gateway.
I had an ENC28J60 lying around for some time. The MySensors getting started guide clearly mentions that this is a supported option. So I connected it, got the UIPEthernet libs linked in the guide. Cloned the ntruchsess repo as mentioned in the readme. Hit compile and - incorrect library version. Great start. Cloned the MySensorsArduinoExamples entirely, copied the lib from there. Incorrect library version. OK. Started to hunt around Google, found the original UIPEthernet repo. Cloned that and it compiles. Good.
Started the node, doesn't reply to pings. Searched the MySensors forums, found a topic titled 'Can't ping Ethernet Gateway ENC28J60 + Arduino Nano Clone' from 2017. In that topic some MySensor devs clearly state the ENC28J60 support is broken and that, I quote, 'Not sure anyone has bothered checking with the latest version of the library...'. Uh what ? If you know that this chip won't work since 2017, why is it still a recommended option on the building a GW guide ? Why not make it clear that only the w5x00 chips are supported ?
Problem 2. The Raspberry Pi gateway.
So ordering a w5100 for my GW is not an option right now. It would take a month to arrive due to lockdown. So I decide to use a Pi Zero as a GW. At least the ENC28J60 works with that one. I visit the 'Building a Raspberry Pi gateway' page. It talks about some radio communication bug in the 'latest Jessie'. Raspbian Jessie has been shelved in 2017. So uh, is that bug still an issue in current Raspbian Buster ? Do I still need to get the dev branch or not ? OK, I end up pulling the master branch. The Pi has two independent hardware SPI ports. I connect the ENC to spi0. Works. I connect the NRF24 to spi1. Oh wait, the pinout image in the wiring diagram section of the 'Building a Raspberry Pi gateway' is wrong. SPI1 CS0 is definitely not on pin 36 by default (but on pin 11). Why leave a clearly incorrect pinout diagram on your guide page ?
So I try to compile the GW for using spi1. Doesn't work, radio connection failed. Searching the forums. Found a post titled 'Double SPI Radio Raspberry Pi'. Great, sounds like that guy has figured it out and a MySensor mod commented on it. Sounds like that should work. Followed his quick guide. Doesn't work. Search more. Oh wait, it actually can't possibly work - his cs0_pin assignment in the config is wrong (this setting expects BCM pin numbering, not Pi pin numbering as he used). So that forum topic - which probably pops up for everyone searching how to connect the NRF24 to a Pi spi1 port - won't work because it contains a fundamental error.
Problem 3. NRF24 range is bad. Really bad.
So I finally get the GW and a test node to communicate. Yay ! Smooth sailing from now on. But wait. If I position the node across the room, it starts dropping packets. Searched the forums. Filtering caps on both NRF modules - check. Clean power - check (battery pack for the node, lab power supply for the GW Pi). Range is still bad. Some forum posts seem to indicate that the Nano 3.3V regulator is not good enough to power the radio and you need a separate supply. OK. But why not mention this in your build guides ? All your guides clearly show that the NRF gets directly connected to the 3.3v rail of the Nano. Well I don't have a voltage regulator. Searching more. Lots of conflicting information. Maybe the NRF is counterfeit. Yep it probably is. Order and try another one ? Order and try an external regulator ? Lockdown, week long waits for any oversea deliveries, so nope, not an option. Found lots of topics with people having range issues on that radio. Common solution seems to be switching to the RFM69 on a different frequency band. Would have been nice to know that before. Why not mention this in the guides if it's such common knowledge apparently ?
Well that's where I stand right now. What was supposed to be a fun and satisfying experience to build some home made IoT devices ended up being a long and frustrating one leaving me with a feeling of having wasted my time. I wanted to build some fun nodes but after all that time spent trying and searching and ripping my hair out, I still don't even have a stable network running.
And yes, some of this is probably due to bad counterfeit HW and also my own overexpectations. But a lot of the frustration came from the obsolete, outdated, conflicting and sometimes blatantly false information presented both on the official MySensors guides, as well as in the forums. I wasted so much time searching and trial'n'erroring solutions to problems that wouldn't even exist if they were clearly outlined in some up-to-date guides.
At this point I'm unsure about how to proceed. I like the idea behind MySensors and support in Home Assistant (which I use for HA) seems good. I could order an NRF24 PA LNA. Or some RFM69's. And try both. And have a more reliable network - maybe.
But I don't really feel like spending weeks on this just tinkering around and trying to make the basic network behave in a reliable way. Maybe I misinterpreted what the MySensors platform is about. My impression of MySensors was that this is a solid and well tested platform where the basics would just work out of the box without much tinkering around. And where I could spend my time on what actually matters to me - building my custom nodes. Trying out dozens of different radios from different manufacturers, different power supplies, different DIY dipole antennas and whatnot is just not something I'm interested in. Maybe I'll just get a commercial ZWave interface with digital inputs and connect it to the Arduino instead.
Thanks for reading.