Is there any complete "how to guide"?
-
Hi,
I am a total newbe at arduino and mysensors, but I am trying.
Is there any complete guide of how to set up a gateway and sensors?
I have searched and searched but I only find pieces. I end up with more questions each time.My problem is: I have wired up a ESP8266 with NRF24L01+ as gateway and installed the sketch ESP8266Gateway. It connects to to my WIFI and gets a ip adress. I can connect to it with putty, it responds that gateway is running.
I also wired up a arduino mini pro and a NRF24L01+ and a LED that I can control and installed the RelayActuator sketch.
When the latter powers up, I see lights flashing on the ESP8266But now what? What do I do now?
How do I know if they have found each other?
Aren't you supposed to trigger some inclusion?
Can I send commands through putty or do I need something else? (will get a Vera Edge tomorrow).Really, what is my next step?
Thanks!
-
@Magnus-Pernemark
The component you are missing is the Controller (Vera, OpenHab, etc.). That is where the automation logic occurs and commands are issued. In the interim, you can use MYSController on a Windows machine to test your gateway and nodes.
-
Thanks @Dwalt . I was looking at the MYSController and I got the impression you need to have special bootloader. Is that so? I have searched for how-to's for this but I can't find anything. Do you know where I can find something where I can start?
I did download it and ran it, entered the ip of the gateway, if found it.. but it kind of stops there... next step is unclear.
-
@Magnus-Pernemark You do not need a special bootloader to run MYSController. The MYSBootlader is to provide over-the-air programming for the nodes, you do not need to worry about that at this point. You do, however, need to hardcode a node ID into your arduino sketch as MYSController does not assign them (as Vera and other controllers generally do this when the sensor node is included into your network). After that, MYSController should see your node and you can read sensor data and send commands to the node. It isn't a permanent substitute for a controller but it is a useful diagnostic tool for troubleshooting your setup. Read through the thread on MYSController.
-
@Dwalt said:
You do, however, need to hardcode a node ID into your arduino sketch as MYSController does not assign them (as Vera and other controllers generally do this when the sensor node is included into your network).
Nope, not true. MYSController does assign IDs - make sure to select "Auto ID" in the tool bar.
-
Now, I am confuse, who does assign IDs? Controller or Gateway?
-
Never the gateway - this just pass along the msg to the controller.
If you do not set a static node id, the controller assign.
-
Yet again thanks @Dwalt.
I guess I'll have to wait for the Vera Edge to arrive. Can't make head or tail out of this.I don't get anything useful out of MYSController. I have tried to read about it, but I can't find anything but the forum thread about it. Everybody seams to already have it running and have other problems (and talk about MYSBootloader alot)
MYSController connects to my gateway at 192.168.0.250:5003. It says
0;0;3;0;14;Gateway startup completedwhen I power up my sensor, MYSController does some TX and RX (I also see thing happen in telnet client).
2015-10-14 22:05:23 TX 255;255;3;0;4;1
2015-10-14 22:05:23 RX 255;255;3;0;3;
But that's about it. Nothing more. Nodes does not update, routing table is the same
it just say this in the nodes list0 - Gateway
Broadcast
-
@Magnus-Pernemark said:
2015-10-14 22:05:23 TX 255;255;3;0;4;1
2015-10-14 22:05:23 RX 255;255;3;0;3;That looks already good. The node is asking for an ID, and the controller assigns ID 1 (not chronological in the log). What sketch are you running?
For further troubleshooting, please make sure "Logging" is enabled and upload the generated log file - that helps to understand what is going on.
-
@Magnus-Pernemark You can read about the serial api here: http://www.mysensors.org/download/serial_api_15
255 = Node does not have an id
3 = Internal
0 = No ack
...damn... tecka was first
-
@sundberg84 sorry...lol
-
Hi @tekka. I just took a ESP8266 NodeMcu V0.9 and connected a NRF24L01+ radio to it. Uploaded sketch according to instructions found about this gateway.
Then I did the same thing with a Mini Pro, hooked up a NRF and uploaded the RelayActuator.
I didn't change any code, more then the LED pin on the gateway, SSID and password for WIFI.Applyed power to gateway, started MYSController, applyed power to sensor.
And this is what I get
2015-10-14 22:30:13 STARTUP Initialize message logging 2015-10-14 22:30:13 STARTUP MYSController 0.1.2.282 2015-10-14 22:30:13 STARTUP FPC 2.6.4 / Lazarus 1.4.2 2015-10-14 22:30:13 STARTUP still under development :) tekka 2015 2015-10-14 22:30:13 STARTUP Load INI file... 2015-10-14 22:30:13 STARTUP INI version 0.1.2.282 2015-10-14 22:30:13 INFO *** Logging START *** 2015-10-14 22:30:13 VERSION MYSController 0.1.2.282 2015-10-14 22:30:13 STARTUP INI file loaded 2015-10-14 22:30:13 STARTUP Loading FW repository... 2015-10-14 22:30:13 REPO FW "Blink" loaded. t=10, v=1, blocks=72, crc=0xD098 2015-10-14 22:30:13 REPO FW "TimeReporter" loaded. t=20, v=1, blocks=840, crc=0x4AC5 2015-10-14 22:30:13 REPO FW "Sensebender Micro" loaded. t=100, v=1, blocks=1344, crc=0x3482 2015-10-14 22:30:13 REPO FW "Sensebender Blink" loaded. t=110, v=1, blocks=768, crc=0x1314 2015-10-14 22:30:13 REPO FW repository loaded. Items=4 2015-10-14 22:30:13 STARTUP Initialize message types 2015-10-14 22:30:13 NODE New node discovered, node id=0 2015-10-14 22:30:13 NODE New node discovered, node id=255 2015-10-14 22:30:17 INFO Connected to 192.168.0.250:5003 2015-10-14 22:30:17 CHILD New child discovered, node id=0, child id=0 2015-10-14 22:30:17 RX 0;0;3;0;14;Gateway startup complete. 2015-10-14 22:30:25 UPDATE 4295098650 2015-10-14 22:30:38 CHILD New child discovered, node id=255, child id=internal 2015-10-14 22:30:38 TX 255;255;3;0;4;1 2015-10-14 22:30:38 RX 255;255;3;0;3; 2015-10-14 22:30:39 TX 255;255;3;0;4;1 2015-10-14 22:30:39 RX 255;255;3;0;3; 2015-10-14 22:30:41 TX 255;255;3;0;4;1 2015-10-14 22:30:42 RX 255;255;3;0;3; 2015-10-14 22:30:43 TX 255;255;3;0;4;1 2015-10-14 22:30:43 RX 255;255;3;0;3;
-
@Magnus-Pernemark looks like the node does not receive the ID reply - this has previously been observed: adding a larger capacitor or replacing the nRF often solved the issue.
-
Thanks @tekka that did it. I didn't have a capacitor on the gateway. I added a 4.7uF and now the sensor pops up in MYSController. (The capacitor recommendation was not in the ESP8266 setup, hense lack of one)
Thank you so much. One less thing to loose sleep over.
-
@Magnus-Pernemark have fun
-
@sundberg84 Thanks for your answer! Now makes a lot of sense and it works I am able to assign ids