Installing the Gateway Software on a Raspberry Pi
This will run you through the process of installing the BrewMonday Gateway software on a Raspberry Pi and configuring it to work with your BrewMonday Account.
Typical time to complete this procedure is 5 - 10 minutes (not including software download time).
This is for connecting a bare-bones Raspberry Pi to WiFi. The BrewMonday Gateway, which is based on a Raspberry Pi, has a web interface that eliminates this procedure and is available for purchase right here.

Getting Started

What you'll need:
It's important that your Raspberry Pi is a 3B+ or else it may not work. We'll have support for other versions like the Pi Zero and Pi 4 very soon.
Insert your micro SD card into its adapter if necessary, then insert the card into your computer.
Open Balena Etcher (or another OS image flashing software of your choice) and flash the downloaded BrewMonday Gateway Software file (bm-gw-rpi_x.xx.zip) file to your SD card.
Now, your computer may eject the SD card when it's finished. If so, take it out and plug it back in. A disk image called boot should be available on your desktop or in your list of devices.
To connect your Raspberry Pi to your WiFi network, create a new text file and save it with the filename: wpa_supplicant.conf
Put the following code in the file, replacing 'US' with your 2-digit country code from the list here, and your router's network SSID and PASSWORD respectively:
1
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
2
update_config=1
3
country=US
4
5
network={
6
ssid="My-WiFi-Router"
7
psk="PASSWORD"
8
}
Copied!
You will need to save this file as a Unix (LF) text file. A good plain-text editor will allow you to save with Unix (LF) line breaks, but you will have to verify this on your own. If you're using Mac OS, TextEdit should do this by default, and on Windows double-check the format if you're using Notepad or another plain-text editor. Do not use a word processing program.
Copy the wpa_supplicant.conf file to your newly-created boot SD card image.
Eject the card, insert it into your Pi, then connect it to a power source.
Wait a minute or 2 for it to boot up, and if everything went smoothly, your Pi should now be connected to your network.
Now, we will need to obtain the IP address using an app like Fing or other WiFi device locator. Fing is free and available for iOS or Android.
Open Fing, refresh the list of devices and look for your Raspberry Pi on your network. If it doesn't show up, wait another minute or so then refresh the list again. It should look something like this:
Note the IP address — 192.168.86.37. Yours will likely be different from the example above.
Open Terminal and type the following, replacing the IP address with your own:
Copied!
You should get the following message:
1
The authenticity of host '192.168.86.37 (192.168.86.37)' can't be established.
2
ECDSA key fingerprint is SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
3
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Copied!
Type yes and hit return
The default password for Raspberry Pi is raspberry
Since SSH is enabled on your Pi you should change the password. Once logged into your Pi, type passwd to set a new password.
Next, let's log in to the BrewMonday app and go to Devices in the navigation menu. Your account comes with 2 devices already provisioned. If you're not already using one, select the device's gear icon and click the Edit button, else add a new device if there are none or they are in use.
Give the device a name and optionally a location name, like "Garage" or something, and make sure to select Raspberry Pi Gateway as the device type.
Keep this screen handy so you can copy the Device Id and Auth Key for the next step.
Next, back in the Terminal, we'll run a script to inject your Device Id and Auth Key into the device. The command is: bm-set-creds <device-id> <auth-key> replacing <device-id> and <auth-key> with your credentials from the 'Edit Device' screen in the BrewMonday app. The command should look like this:
1
bm-set-creds 00000000000000000000000000000000 11111111111111111111111111111111
Copied!
Note the single spaces and make sure it looks good before hitting <enter>.
Restart the daemon using sudo systemctl restart avmsagwd and verify it comes back up using systemctl status avmsagwd. Your gateway should now be ready to send data.
Back in the BrewMonday app, make sure to select Raspberry Pi Gateway as the device type then click "Save" to save the changes if you haven't done so already.
Last modified 6mo ago
Copy link