Pi Gateway 101 - Use PiGateway not Gateway sketch

Started by kni, October 21, 2017, 09:29:38 AM

kni

I thought I'd share something I ran into when I first started down the moteino path, with the hopes that others can avoid the same issue.

After buying my first pair of moteinos from the store, everything appeared to work as expected. The new moteino automatically showed in the  pi gateway web portal and the metrics from the device were coming in. After initial success, I began to expand my new 900mhz wireless network with additional devices.

I ran into a problem, however, after I added my first moteino, which had the ability to receive commands from the gateway. In my case, it was a garagemote, but the following issue would have affected any moteino with the ability to receive commands.

Pushing the Open button did not open the garage door. I could see the open event in my log, but the moteino wired to my raspberry pi ignored it.

To the forums I went, searching for an answer. That's when I found this:
https://lowpowerlab.com/forum/pi-gateway/garagemote-openclose-function-not-working-(solved-need-pigateway-sketch)/msg12940

Sure enough, I made the same mistake. When I went looking for the gateway sketch, I scrolled through the list of examples on the lowpowerlab github site. I stopped searching when I saw the folder called "Gateway" and used the sketch in that subfolder. It turns out that is not the right sketch to use. That sketch does not have the code to process commands.

TL;DR

When looking for the gateway sketch to run on your Raspberry Pi, use the PiGateway sketch:
https://github.com/LowPowerLab/RFM69/tree/master/Examples/PiGateway

Do NOT use the Gateway sketch:
https://github.com/LowPowerLab/RFM69/tree/master/Examples/Gateway


LukaQ

yes, pigateway is not the same as gateway, which you would use to test moteino or DIY moteino itself.

Felix

Very true, and misleading indeed  :-\
When I first started the library I had the Node/Gateway pair of sketches for the purpose of demo-ing and getting started with two moteinos that just send between them.
Those sketches should really be renamed to sender/receiver. I should do that but there are now so many links pointing to them...
The PiGateway sketch came along when I created my home automation gateway, while similar to the Gateway sketch, it has a bunch more features and a bit more complex to handle 2 way communication.