@scalz Sorry for my delay to answer you. Well, I have made many tests and found out that there were some issues with my radios, so I put the capacitor today and it worked!
Thanks for trying to help me.
@scalz Sorry for my delay to answer you. Well, I have made many tests and found out that there were some issues with my radios, so I put the capacitor today and it worked!
Thanks for trying to help me.
Hey guys,
I have got the very last updates from MySensors repo and now it seems that the node can't connect to the Gateway. I am testing both connected to my computer, so they are very close. I am getting these messages.
Gateway
0;255;3;0;9;MCO:BGN:INIT 255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0-beta
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;0;0;18;2.1.0-beta
0;255;3;0;14;Gateway startup complete.
0;255;0;0;18;2.1.0-beta
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=
Node
4 MCO:BGN:BFR
5 TSM:INIT
6 TSF:WUR:MS=0
13 TSM:INIT:TSP OK
15 TSF:SID:OK,ID=1
16 TSM:FPAR
53 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
2060 !TSM:FPAR:NO REPLY
2062 TSM:FPAR
2098 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
4106 !TSM:FPAR:NO REPLY
4108 TSM:FPAR
4144 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
6152 !TSM:FPAR:NO REPLY
6154 TSM:FPAR
6190 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
8198 !TSM:FPAR:FAIL
8199 TSM:FAIL:CNT=1
8201 TSM:FAIL:PDT
Any idea what could it be?
Thanks
Thanks @tekka . Sorry for my delay to answer, I have been busy.
Hello guys,
I got the latest updates from github development branch and I am trying to compile a gateway without a radio connected. However, I am getting an error message. Is there any bug or am I doing something wrong?
My code:
#define MY_DEBUG
#define MY_GATEWAY_SERIAL
#if F_CPU == 8000000L
#define MY_BAUD_RATE 38400
#endif
#define MY_INCLUSION_MODE_FEATURE
#define MY_INCLUSION_MODE_DURATION 60
#define MY_DEFAULT_LED_BLINK_PERIOD 300
#include <MySensors.h>
#define CHILD_ID 1
void setup() {
// Setup locally attached sensors
}
void presentation() {
sendSketchInfo("Relay", "1.0");
present(CHILD_ID, S_LIGHT);
}
void loop() {
// Send locally attached sensor data here
}
Output:
/tmp/ccCgxwsm.ltrans0.ltrans.o: In function `main':
ccCgxwsm.ltrans0.o:(.text.startup+0x236): undefined reference to `isTransportReady()'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Duemilanove or Diecimila.
Thanks.
@mfalkvidd
Oh, okay! Thanks. I haven't seen this code!
Really thanks for your help, guys
@hek Thanks! Now it worked
Hey, and can you answer me about how to set hardcode ID in some other node(not gateway)?
About the Gateway ID it is fine. My main problem is that it seems presentation function is not being run.
Hi guys,
Sorry if there is already a topic with this, however I couldn't find any helpful information.
There is a long time since last time I have "played" with MySensors.
Then, I am trying to run a Serial Gateway with a relay attached. However, it seems that it is not calling the presentation() function.
My code:
// Enable debug prints to serial monitor
#define MY_DEBUG
// Enable and select radio type attached
//#define MY_RADIO_NRF24
//#define MY_RADIO_RFM69
// Set LOW transmit power level as default, if you have an amplified NRF-module and
// power your radio separately with a good regulator you can turn up PA level.
//#define MY_RF24_PA_LEVEL RF24_PA_LOW
// Enable serial gateway
#define MY_GATEWAY_SERIAL
// Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
#if F_CPU == 8000000L
#define MY_BAUD_RATE 38400
#endif
// Enable inclusion mode
#define MY_INCLUSION_MODE_FEATURE
// Enable Inclusion mode button on gateway
//#define MY_INCLUSION_BUTTON_FEATURE
// Inverses behavior of inclusion button (if using external pullup)
//#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
// Set inclusion mode duration (in seconds)
#define MY_INCLUSION_MODE_DURATION 60
// Digital pin used for inclusion mode button
//#define MY_INCLUSION_MODE_BUTTON_PIN 3
// Set blinking period
#define MY_DEFAULT_LED_BLINK_PERIOD 300
// Inverses the behavior of leds
//#define MY_WITH_LEDS_BLINKING_INVERSE
// Flash leds on rx/tx/err
// Uncomment to override default HW configurations
//#define MY_DEFAULT_ERR_LED_PIN 4 // Error led pin
//#define MY_DEFAULT_RX_LED_PIN 6 // Receive led pin
//#define MY_DEFAULT_TX_LED_PIN 5 // the PCB, on board LED
#include <MySensors.h>
#define CHILD_ID 1
void setup() {
// Setup locally attached sensors
}
void presentation() {
sendSketchInfo("Relay", "1.0");
present(CHILD_ID, S_LIGHT);
}
void loop() {
// Send locally attached sensor data here
}
My output:
0;255;3;0;9;Starting gateway (R-NGA-, 2.0.0)
0;255;3;0;14;Gateway startup complete.
0;255;3;0;9;No registration required
0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
Another question that I couldn't find in docs is how can I set hardcode the node ID?
Hi! I agree with you!
Therefore, I have been working in a documentation that tries to be "easier" for understanding (I had some issues to read MySensors' docs too).
So, if you want to take a look and tell what you think, it would be really nice.
https://mysensors.readthedocs.org/en/latest/
PS: There is sometime since my last update, I am trying to find time to finish it.
Nice @hek ! I've just released version 0.1, so I think who has at minimum of dev skills, it is an usable tool. I would like that someone could test it.
https://github.com/alfredocdmiranda/mysbox
When I get something more usable for who doesn't have such that skills, I will let you know.
@nftrix , I have always thought about it. So, after read this thread I started to build a tool that I don't know if it is what you want but I am trying to make easier the development of new nodes (compile and upload too).
So, feel free if you want to take a look and give some feedback.
Hey @finge thanks for your interest and your suggestions. I am developing my controller based on Home Assistant, which is also written in Python in have a lot of interesting features. However, I think they leak a little bit about user settings (you have to set all stuffs inside the configuration file in your server) and they don't have a very good support to MySensors (just support sensors, you can't turn on/off lights, ... So, yeah, I want to implement all that stuffs which you said.
Hey guys,
I am developing my own controller as my final project to get my degree. So, I decided to develop my own python module too, since I know just one (pymysensors) and don't agree with some its "structures".
Then, I would like if my module is useful for someone or if someone have any question or suggestion, just let me know, I would be thankful.
Yeah. I know that, but if you insert the old node, it would have the old ID stored. So, it would be an ID conflict.
I don't have my controller yet. I am actually creating my own and getting some ideas.
Oh...yeah...you are right! Maybe you can change ID in production? =x
@Anticimex
If you use an algorithm like DHCP, you won't get a new ID every node startup/restart. If there is few time since the node was seen on that network, the controller should give the same ID.
@hek
Well, I know that 253 nodes is a lot of nodes. However, just thinking in worst case, if you reach the limit and remove a node A, and a new node B, so will get the A id, and after that (some months later?) you remove a node C and put A on its place. So, there is a problem because A already have an ID (same B's ID). Then, you have an ID conflict. Or I am wrong?
@hek would be possible implement some option that makes the node always requests a "new id"? Like DHCP.
Is there any way to know which bootloader some node is using? So, in this way, my controller could know if that node is capable of OTA or any other feature.
Yeah. I think that should work! However, I think it should be an option to choose if you want to save or not the ID.
Is there any way to make the node not save the ID, so making them request an ID every reboot?
Nice @hek ! I see many intersting functions! Thanks!
Just one question... will I be able to send I_HEARTBEAT from controller to node(just to check if it is alive) or just the node can send this message?
I've been looking on forum's history and I didn't find anything efficient for this. So, I was thinking that would be good is there was a Ping-Pong function, so, in that way we could check if a node is alive and we can discover the network sending a ping to the broadcast address.
Sorry if I am wrong.
Is there any chance to create it for next version?
Hey guys, I've already had this idea. Then, I've started creating an unoffical documentation page on ReadTheDocs that I hope to fill the lacks on official documentation. So, I am using my point of view and studying the whole library. I hope that helps someone (I am really at the beginning).
@hek Why there is no method getCommand() in MyMessage object like isAck()?
@Oitzu could you share how you are building the messages and other things to send the new hex?
@sundberg84 Thanks for your answer! Now makes a lot of sense and it works I am able to assign ids
Now, I am confuse, who does assign IDs? Controller or Gateway?
Hey guys,
So, I am new to MySensors community and I am very interested in OTA. I've read this thread and I am wondering if there is some tutorial teaching how we can transfer from controller/gateway to the nodes the sketch.
Hey guys,
I was wondering if it is possible to list the nodes that are connected to the gateway, like send a broadcast packet. So, in that way, we wouldn't need to restart the nodes.
Sorry if I am misunderstanding some step or something.