MySensors controller with Rasberry Pi 3 & Windows IoT
-
Hi,
I think you should start by taking a look at a Serial UART example for VS, for learning how com port session, communication are handled.
A very good exercise, could be to start by trying to code a Serial monitor. Then it should be easier to understand.
See above link from @mfalkvidd for the serial api and use it from your homemade Serial monitor, sending command, reading etc..
Or as sugested too, you could take a look how Homegenie works (serial communication, threads, database etc.) -
Hi,
I think you should start by taking a look at a Serial UART example for VS, for learning how com port session, communication are handled.
A very good exercise, could be to start by trying to code a Serial monitor. Then it should be easier to understand.
See above link from @mfalkvidd for the serial api and use it from your homemade Serial monitor, sending command, reading etc..
Or as sugested too, you could take a look how Homegenie works (serial communication, threads, database etc.) -
Hy everyone ! So, THIS IS WORKING ! Thanks a lot :)
Now, new problemes ! (It's not funny without)
I build a serial gateway and a motionsensor
This is my log
image url)0;0;3;0;9 -> ok it's a gateway init
0;0;3;0;14 -> gateway is readybut, what is the next one? Normally I will receive just x;x;x;x;x; right? what's about read: 255-255....
Thank you :)
-
Ok, if I right, there is a trouble with a motionsensor who want an ID ?
Do I need to give it one, or it's done by a gateway?
@MrVince - It is done by the controller. The GW never assign ID.
You could set a static ID in the node as well. -
@MrVince - It is done by the controller. The GW never assign ID.
You could set a static ID in the node as well.@sundberg84 It's work ! Thank you :)
-
Hi everyone !
Let's do a check up :
- Read from a GW in serial connection : ok
- Read information when I give a static ID : ok
- Find a node who want an ID : ok
- Give an ID to a node with my controller : nope
So, the question is, if I receive '255;255;3;0;3;' my controller understand it's an ID_REQUEST and I need to use an ID_RESPONSE, but if I want to give an ID I need to build something like this :
node-id ; child-sensor-id ; command ; ack ; type ; payload
node-id : ??
child-id : ??
command : 3 for internal
ack : 0 ?
type : 4 for response
payload : new ID (ex: 101)What are the node-id & child-id if the sensor doesn't have one?
One more time, I want to thank's all of you, with your help it's more easier to understand and I start to see the end !
EDIT : One more thing, I have an idea. I want to open a pop-up when a new sensor is on to choose for wich room is it.
Can I give an temporary ID (like 254), wait for a first message with ID 254, with a first message I can see what type of sensor is, open a pop up, and give a new ID after I choose the room? -
the controller should keep track of the assigned IDs and respond with the following free one, I don't think you can change the ID via software, unless there is a way to change it in eeprom and reboot node so it will read it from eeprom and boot with that
-
the controller should keep track of the assigned IDs and respond with the following free one, I don't think you can change the ID via software, unless there is a way to change it in eeprom and reboot node so it will read it from eeprom and boot with that
@gohan ok
I understand for the controller, but I think I miss something about the ID_RESPONSE
Imagine this situation:
I have just one sensor with no ID
The GW send me (the controller) : '255;255;3;0;3;' // Sensor want a node_ID
If I want to give it the ID 1, what I need to send to the gw? I think something like '255;255;3;0;4;1', that's right?EDIT : I try and it's work now, but I need to clear EEPROM first
-
Thank you for sharing the details.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login