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
PREREQUISITES
Install mozilla WebThing gateway on RaspberryPI (It was made for https://github.com/mozilla-iot/gateway/releases/download/0.12.0/gateway-0.12.0.img.zip )
- Connect to device's wifi "WebThings Gateway FFFF" and then open http://gateway.local/, Setup WiFi Setup
- Connect back to LAN Wifi open http://gateway.local/things again
INSTALL
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/
git clone https://github.com/rzr/sense-hat-webthing sense-hat-adapter
make -C sense-hat-adapter help prep start # unprep # to restore
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: EXAMPLES
More examples can be also used as standone webthing server:
cd example
# If on debian, it will be faster:
sudo apt-get install python3-sense-hat
pip3 install webthing
# Or if not on debian:
# pip3 install -r requirements.txt
./sense-hat-single-thing.py
Then add thing using "URL" adapter it should be discovered as (http://localhost:8888)
Same procedure for other exampl, like multiple things which is handling orientation sensor.
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://github.com/raspberrypi/rpi-sense/
- 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.6.tar.gz
.
File metadata
- Download URL: sense-hat-webthing-0.0.6.tar.gz
- Upload date:
- Size: 6.7 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 | 937bfe1e8ce92948c031c5f60a53fb17e935835260e4fdecfa2defb55a2451f1 |
|
MD5 | 45a2ec6b52b67fa0bdf657990e6b0b8b |
|
BLAKE2b-256 | 653ea6279c879e64d5bbfbd4a35d1077c60bf983dec89c0c8aedc19b634361b7 |
File details
Details for the file sense_hat_webthing-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: sense_hat_webthing-0.0.6-py3-none-any.whl
- Upload date:
- Size: 12.6 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 | c8daa52fa3043c6b04df12c102241c44d20d875aba470f9f48cb261bdf60540b |
|
MD5 | 27667e5fd4dca1553bfc3e46a4b785c4 |
|
BLAKE2b-256 | 0d5d377514c1c4cb0b0e5695a34085e4573b4e3374a6e04bbcda76004f516f69 |