Hello. I'm new here. Hope you are all doing fine !
Intro to my problem:
I found out about MySensors yesterday, and being as cool as it is, I tried to make my own MySensor devices. After some help from this forum and posts from other people I finally made my first "working" node. I actually tried making two.
A Motion Sensor, and a Relay Control. As it seems nice to be able to control lights when motion is detected.
I followed the instructions (and sketches) I found here: https://www.mysensors.org/build/motion
and here: https://www.mysensors.org/build/relay
I'm using an Arduino Pro Mini for the nodes and a NodeMCU as the Gateway. The NRF24 is my choice of wireless communication.
I am controlling everything through Home Assistant, although I am pretty new to that as well. Just installed it yesterday and I'm currently experimenting.
Where I am so far:
I am currently able to make both the Gateway, and the Nodes.
I got them to work with Home Assistant but the Relay node seems to be behaving strangely.
While I see the Relay in Home Assistant, when I press it nothing happens. If I click it a couple of times, after the second-maybe third try, it will eventually turn on.
If I try to turn it off, the same exact thing happens. I have to click it several times in order for it to work.
If I spam-click it, it works again in a couple of clicks.
The Motion Sensor node I made, seems to be activated INSTANTLY when actual motion happens in front of it. Instantly, and every single time. It does take a couple more seconds after motion stops to display "Motion Off" but when Motion happens its instant.
My Relay node on the other hand doesn't work properly.
Could you help me ? Thanks a lot in advance.
The Code I'm using:
I'm not going to post the code I'm using, as it's 100% copy-pasted from the sketches on the links above. I've changed Nothing, and tried nothing fancy.
Just trying to get them to work first.
Something I've noticed:
Every SINGLE time I try to toggle the Relay from Home Assistant, I see a line in the Serial Monitor of the Gateway that looks something like this:
So from what I can tell, something IS happening in the Gateway, but the message doesn't always reach the Node ? Or, well, I don't know.
PS. If I made any mistakes excuse my English. It's not my native language.
If I made and technical mistakes, excuse my lack of knowledge, I'm still learning.