Skip to main content

Sense Hat WebThing

Project description

SENSE-HAT WEBTHING

GitHub forks PyPi Legal Mastodon Follow

ABOUT

Addon adapter for Mozilla IoT Gateway using python module to handle I2C sensors and GPIOs of Raspberry Pi's extension board "SenseHat".

sense-hat-webthing

USAGE

From "Settings" add-on menu:

  • Add "and enable add-on
  • Then add "SenseHat" from the things dashboard.

DEVELOP

# From Settings / Developer / Enable SSH
# https://sensehat.mozilla-iot.org/settings/developer
ssh pi@gateway.local # password=raspberry
sudo systemctl stop mozilla-iot-gateway
rm -rf ~/.mozilla-iot/addons/sense-hat-*
cd ~/.mozilla-iot/addons/
sudo apt-get remove -y \
  libblas3 libgfortran5 libimagequant0 liblapack3 liblcms2-2 librtimulib-utils \
  librtimulib7 libwebpdemux2 \
  python3-numpy python3-olefile python3-pil  python3-rtimulib python3-sense-hat
git clone https://github.com/rzr/sense-hat-webthing sense-hat-adapter
cd sense-hat-adapter
./setup.sh
python3 main.py
sudo systemctl restart mozilla-iot-gateway
sudo journalctl -f -xu mozilla-iot-gateway.service

From "/things" webpage "SenseHat" can be added (+, Add, Done)

Note that instead of restarting gateway, from Web UI, any addon can disabled and enabled again.

EXTRA: EXAMPLE

An extra example can be also used as standone webthing server:

cd example
pip3 install webthing
python sense-hat-single-thing.py

MORE

For reference the following items are supported:

Thanks to Geof Cohler (@gcohler) for support.

RESOURCES

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sense-hat-webthing-0.0.5.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

sense_hat_webthing-0.0.5-py3-none-any.whl (10.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page