I thought I'd share a part of my 'workshhop'. Only part of it due the rest being in a bit of a mess at the moment, so here is the 'good' bit......
I have a cool project
So does everyone else
I hired someone to do about a year ago, but it never worked entirely.
Why is that?
need some help with the programming.
Then post your code and the issues you are facing and someone might help you out.
Project: Driveway alert system, looooong driveway.
So it's just a basic 'alert system' - good.
I have 4 sensor beams shooting across the driveway and they are spaced about 100' apart from each other.
That is good if that is what you want/need for your cool project.
Each can provide a NO or NC contact.
I have conduit running between all 4 points
Good idea if you don't want jammable RF.....
and was planning to run Ethernet wire between them
So only empty conduit at the moment then?
The board has a LORA radio on it
and is transmitting to my Arduino receiver, which is tied to a pi running Domoticz.
I hired someone a year ago to build a system for me using 4 transmitters (one for each sensor),
You already told us this bit.
but I don't think he knew what he was doing.
Why is that?
We got several running temperature/humidity data
That wasn't the original 'alert' spec was it? Or maybe it was? Maybe it is supposed to be a driveway alert system with temperature and humidity sensors 100 feet apart? Who knows? What are you 'really' wanting to do here?
but, the input pins don’t work like they’re supposed to.
So is this faulty hardware issue then?
Why 4 sensors on the driveway? Eventually I’ll install my railroad signals and be able to direct one way traffic up and down the driveway! How cool is that!
If you really have that much traffic on your driveway then it might be a better idea to have a 2-lane driveway.
Help anyone? Happy to compensate for your efforts!
How can we help? You posted an 'alert' dream that later included temperature and humidity. Then it morphed into a traffic control system (either automatic or manually controlled, we don't know which at this stage).
Then you ask for programming help and don't even post a single line of code.
Yes that was all a bit 'tounge-in-cheek' but hopefully you get the idea.
First define what you actually want.
Post code you are trying to get working.
Post drawings of how it is all connected up.
Post photos of the project.
Where is the project located on this once fine planet?
Where do I get my compensation from?
The current NRF24 set up is more secure than bluetooth or wifi from attack.
I say this based on the fact that anyone with a laptop, mobile etc can have software to crack/hack/spoof/inject into bluetooth or wifi. It is not that difficult for kids to do.
The NRF is another matter as to achieve this on that radio module would require acquiring a module, setting it up with a pc/phone and then getting software to attack it.
People often go the easiest route and I am less worried about nrf24 than I would be if the system used bluetooth/wifi or cloud.
Just my thoughts on a dark and wet Monday morning.....
@TheStaticTurtle You are using an older version of mysensors. 2.3.2 is current so first of all upgrade to that.
Second, looking at the node log it never finds the gateway. FPAR is "find parent" and it never does, so nowhere to send the data. The "!TSM:FPAR:FAIL" is also a clue as to no comms with the gateway.
Why this is I don't know as you haven't posted your code.
Your best bet is still to simply change to a different unused channel.
Nrf24l01+ has over 100 channels available, why insist on using one in use by someone else nearby?
Even if you do encrypt all data the radios will still suffer due the the high level of signals around swamping the receiver front ends and reducing sensitivity adn increasing liklihood of packet collisions.
Far better to find a clear channel and use that, but it's up to you at the end of the day.
There are 2 ways of doing this.
First is to have a 'dumb' node that sends data to the controller. Then the controller decides if the relay has to be on or off and sends a signal to make it happen. This is how many systems work.
The down side to this is that if the gateway becomes unavailable or the controller crashes, the relay state will not change.
Personally I prefer to make the node as smart as possible, collecting data, doing calaculations and performing actions while sending the results to the controller for display. The controller can still send commands to the node but if the gateway or controller fail the realy will still operate as expected.
You could even have the nodes request/send data to each other to confirm the status of the realy or anything else for that matter. That's really a third option
So I would approch it by haing node 1 get temp, send to controller and node 2. Have node 2 decide on realys status, switch relay and inform node 1 and controller of the status change. I am sure you can think of variations on this as well because you know best how you want things to work.
Which bootloader should I use?
Only you can decide the best one for what you want.
Is it necessary in my case?
I would say yes it is if you want WDT to operate.
Does users mysensors change the bootloader?
That depends on the need case for each individual requirement. Some do, some don't. The ones that do have a specific reason for doing so, like fota or wdt.
Mysensors has its' own bootloader and I believe that it supports WDT. Optiboot is another popular one but I don't personally know if it supports WDT.
@huseyinozsut I think the nearest you can get to this will probably be FOTA.
This way you can connect to the controller via internet and upload new firmware to a node with the new password included.
Note that encryption might be desireable to stop people sniffing the data as it passes over the air.
@Robert In order to use the watchdog you need the correct bootloader, which bootloader are you using?
Also, if your sensors are connected with dupont connectors then these can work loose over time due to thermal expansion and contraction. Dupont connectors are really for quick development and not as good as a soldered joint for deployment. At a push you could try hot glue to hold them in place.
hello thanks for the reply ...
x <= 10
What do you suggest me?
I suggest that you start reading and learning on this site and then begin building.
We don't know the ranges between nodes and gateway nor what sort of data you want to send, so learning what mysensors is and what it can do for you is the only option.
Thanks for the suggestions. I got into a jam and took some time out. I'll be working on it today I hope.
The main thing is to remotely send a calibration command to make the device read variables form the sensor once and run a calibration routine that measures max and min values for it's location. Then send an 'un-calibration' so that it runs normally and only triggers an alarm only if values outside the calibration window occur.