Quickly setup your Raspberry Pi - particularly WIFI settings and NodeRED.
- A Raspberry Pi w/ associated power supply and SD card. 8GB recommended but 4GB should work.
- USB wifi adaptor. I recommend the TL-WN722N V2
- Ansible is required. The offical docs suggest using pip. I used Homebrew
brew install ansible
- Add an entry to your
~/.ssh/config
file
Host anewpi
Hostname raspberrypi.local
User pi
StrictHostKeyChecking no
- Add entry to your
~/.ansible.cfg
file
[defaults]
host_key_checking = False
- Clone and setup the ansible script.
git clone https://github.com/chrowe/ansible-pi.git
cd ansible-pi
cp hosts.example hosts
cp wpa_supplicant.conf.example wpa_supplicant.conf
- Edit the
wpa_supplicant.conf
- Replace
your_wifi_sid
with the name of your wifi network - Replace
your_wifi_password
with the password for your wifi network
Note: You can ping raspberrypi.local
if you want to get the IP address of your pi.
- Create new sd card
- Configure ssh and hostname so Ansible can connect
- Run
./scripts/anewpi.sh
to login to the new pi. - Connect Pi to the network and power it up.
- Note: If you get a message
paramiko: The authenticity of host 'raspberrypi.local' can't be established.
just typeyes
and hit enter to continue.
- Note: If you get a message
- Note: You should now be logged into the Pi
- Run
sudo raspi-config
and choose "2 Hostname" to set a new hostname for your Pi. You will be prompted to reboot. - Add the new hostname to
hosts
. for example[newname] newhostname.local
- Test that everything is working
- ssh
ssh [email protected]
- ansible ``
- ssh
-
Set up Pagekite
cp pagekite_10_account.rc.example pagekite_10_account.rc
- Change
NAME
andYOURSECRET
to your desired values. See https://pagekite.net/home/
-
Run Ansible to setup everything else
- In
playbook.yml
changehosts
to match thenewname
you just gave your Pi. ansible-playbook -i hosts playbook.yml
See http://pagekite.net/wiki/Howto/SshOverPageKite/ for how to set up ssh on your local machine.
View http://[newname]:1880/#
to see Node Red
- Hamburger menu > Manage Palette > Install
- Search for "1wire" and install
node-red-contrib-1wire
ls /sys/bus/w1/devices/ | grep 28
should show you any devices you have connected