Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Snips Seeed Setup Raspberry Pi Stretch

Python 3.7

sudo apt update
sudo apt full-upgrade
sudo apt install git
curl https://pyenv.run | bash
sudo apt-get update; sudo apt-get install --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev libssl1.0-dev
cd /usr/src/
curl -O https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz
tar -xf Python-3.7.4.tar.xz
cd Python-3.7.4
./configure --enable-optimizations
./configure --enable-optimizations
make -j 4
make altinstall

ln -s /usr/share/pyshared/lsb_release.py /usr/local/lib/python3.7/site-packages/lsb_release.py
ln -s /usr/lib/python3/dist-packages/apt_pkg.cpython-35m-arm-linux-gnueabihf.so /usr/local/lib/python3.7/site-packages/

ln -s /usr/local/bin/pip3.7 /usr/bin/pip3
ln -s /usr/local/bin/python3.7 /usr/bin/python3

HASS Virtualenv bullshit

python3.7 -m virtualenv homeassistant
sam hass install

https://github.com/home-assistant/hassbian-scripts/issues/307
source bin/activate
pip uninstall cryptography
sudo vi /etc/pip.conf
pip install --no-cache cryptography==2.7

Audio

sudo usermod -a -G i2c,spi,gpio,audio _snips-skills
alsamixer

Weather

sudo raspi-config

Other shit

sudo apt install python3-virtualenv python-virtualenv

pi@raspberrypi:~ $ cat /home/homeassistant/.homeassistant/configuration.yaml
default_config:
tts:
  - platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
mqtt:
  broker: 127.0.0.1
  port: 1883
python_script:
snips:
intent_script:
  turnlightson:
    action:
      - service: light.turn_on
        data_template:
          entity_id: light.bedroom
  turnlightsoff:
    action:
      - service: light.turn_off
        data_template:
          entity_id: light.bedroom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.