Sense Hat WebThing
Project description
SENSE-HAT WEBTHING
ABOUT
Addon adapter for Mozilla IoT Gateway using python module to handle I2C sensors and GPIOs of Raspberry Pi's extension board "SenseHat".
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:
- https://www.st.com/resource/en/datasheet/hts221.pdf
- https://www.st.com/resource/en/datasheet/lps25hb.pdf
- https://www.st.com/resource/en/datasheet/lsm9ds1.pdf
Thanks to Geof Cohler (@gcohler) for support.
RESOURCES
- https://libraries.io/pypi/sense-hat-webthing
- https://pypi.org/project/sense-hat-webthing/
- https://mastodon.social/@rzr/104052909544715058#LavalVirtual2020
- https://github.com/mozilla-iot/addon-list/pull/822
- https://discourse.mozilla.org/t/is-there-an-add-on-for-pi-sense-hat/58024/5
- https://www.openhub.net/p/sense-hat-webthing
- https://github.com/rzr/mozilla-iot-generic-sensors-adapter/issues/13
- https://github.com/mozilla-iot/wiki/wiki#general-1
- https://github.com/mozilla-iot/gateway-addon-python
- https://hacks.mozilla.org/2018/02/creating-an-add-on-for-the-project-things-gateway/
- https://libraries.io/pypi/sense-hat
- https://www.raspberrypi.org/products/sense-hat/
- https://www.raspberrypi.org/documentation/hardware/sense-hat/
- https://github.com/astro-pi/python-sense-hat
- https://pythonhosted.org/sense-hat/api/
- https://projects.raspberrypi.org/en/projects/getting-started-with-the-sense-hat
- https://iot.mozilla.org/schemas/
- https://github.com/mozilla-iot/webthing-python/
- https://github.com/mozilla-iot/tplink-adapter
- https://github.com/mozilla-iot/eufy-adapter
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
Built Distribution
File details
Details for the file sense-hat-webthing-0.0.5.tar.gz
.
File metadata
- Download URL: sense-hat-webthing-0.0.5.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f1b75f14270fdcfe9bd72d23116382a4499a4e403b535f3f7db9968437c4f99 |
|
MD5 | 943e5b8cbeb4af53dcadeff12b261455 |
|
BLAKE2b-256 | d3c86cd345d72cc884416207b73643a1edc04eb0e3dc2e3dd88e4ff48ea530b8 |
File details
Details for the file sense_hat_webthing-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: sense_hat_webthing-0.0.5-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ca11013ac9e1c7793a69ea8c3bdf9c6ac7c66079f008e4697fb3a8bb88ee404 |
|
MD5 | db10c64d59bef0899aa12ea29d2d4805 |
|
BLAKE2b-256 | 12d6031a723f7bdac9f679bf705863f3bfe67e6a022232eb733d6db187f76b85 |