@andriej
Hi, I had problem using the main branch mysensors/Raspberry, that because of the bit-field struct (header_s) in Sensor.h They will get packed in different order on the arduino compared to the RPi (at least with my compiler, gcc). In order to fix this I created the 1.4dev branch. It uses full bytes instead of the bit-fields, but you need (of cause) to compile both the sensors (arduino) and the gateway (RPi) using the 1.4dev branch.
We need to fix this in the main branch later on (and use the same files as in mysensors/Arduino/libraries/MySensors)
Thanks for the offer @TheoL ! I have moved on to a differenct project. Also, a lesson that I have learned many times, "If it works, don't fix it!"
-OSD
Nice work so far @wint0178, great that you try expanding on the examples. Sorry for the late reply.
If you look at https://github.com/mysensors/MySensorsArduinoExamples/blob/bba998bce09bc5139eb4ca7a05b0279f4083ff88/examples/PressureSensor/PressureSensor.ino#L90 you see where the existing child ids are defines. You just add another one for the gas sensor, with a unique number (incrementing by 1 is an easy way).
Try that and report back on your result. If something is unclear, just post a followup.
@eiten Ran into the same error but of course the community is always at hand, ready to help! Great! I'm using MySensors 2.3.2 release version. Downgrading the ESP8266 board library to 2.7.4 as suggested by @OldSurferDude did the trick.
I'm still clinging to MySensors. So simple and inexpensive to use! All sensors and other stuff connects over three MQTT GW in three locations back to my Home Assistant.
PS: Get well soon!
Regards, Gunnar
@TheoL Not only did I put in delays, too, but I put in delays that were based upon the ID (which was stored in NVRAM)! This helped.
caveat: This is probably not accurate be helps to explain the challenges with a large network.
My initial experience with Arduino/nRF24 was using the libraries from TMRh20. Those libraries allowed a node to be a repeater, but only for 6 nodes. The primary node 0, master, only allowed 6 nodes to connect to it. The nodes connected to it also allowed 6 nodes. Subsequent nodes had to go through one of these repeating nodes. But the depth was only 4 deep. The master assigned node IDs if the node didn't already have one; similar to a MAC address.
The master also kept track of the addresses (ARP table?). Addresses were 4 octets (base in the form of D/C/B/A. A node connected directly to the master had an address of 0/0/0/a (where 0/0/0/0 was reserved for the master). A node connected through another node had an address of 0/0/b/a, and so forth.
But what happens is that a parent node has to mange the data from all its child nodes and their child nodes and their child nodes. Thus a node would get so bogged down dealing with this traffic that it din't do its sensor task very well.
It is my belief that MySensors either uses TMRh20's libraries or has developed some aspects based on his initial work. I see that that TMRh20 has a version 2 and I have not experimented with it. I did find that MySensors worked better than version 1.
Thus, my curiosity.
I am also duly impressed at the magnitude of hardware. Currently a nano like device from Aliexperss is US$2-3, nRF24 ~ US$1, power supply ~ US$1.50, power cord ?, case?, sensors!? While the hardware cost is daunting, even with a PCB it's a lot of work building those up. So, yeah, I'm impressed!
-OSD