Sensorhub
A simple library to use with the DockerPi SensorHub (EP-0106)
Install / Use
/learn @MGough/SensorhubREADME
SensorHub
This is a simple library for use with the DockerPi/52Pi SensorHub (EP-0106). You may still need to set up the board as documented on the 52pi wiki (configuring/enabling I2C).
This library allows you to read from each sensor individually. It does not require the external temperature sensor to be connected, however an exception will be thrown if you try to read from it while it is disconnected.
How to use it
Interacting with the SensorHub is easy. First create an instance of the SensorHub, which will open communication with it:
from sensorhub.hub import SensorHub
hub = SensorHub()
Then it's just a case of calling the method for the value that you're after:
temperature = hub.get_temperature()
Other available methods are:
hub.get_off_board_temperature()
hub.get_humidity()
hub.get_temperature()
hub.is_motion_detected()
hub.get_brightness()
hub.get_barometer_temperature()
hub.get_barometer_pressure()
See the docstrings for more information on return types and exceptions that may be raised.
Related Skills
node-connect
350.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
