Goopenzwave
Go bindings for the openzwave library.
Install / Use
/learn @jimjibone/GoopenzwaveREADME
goopenzwave
Go bindings for the OpenZWave library.
Warning
This package is still fairly new and so the API is changing pretty rapidly, so be careful if you decide to use it. However, the API will try to mimic the C++ OpenZWave library as much as possible, if it doesn't already, so there shouldn't be many breaking changes.
Most of the C++ OpenZWave library is wrapped now, but should you find anything missing please create a new issue or fork it, implement it yourself and submit a pull request.
Installing OpenZWave
This package requires a system installation of OpenZWave. pkg-config is then used during the build of this package to get the open-zwave library and headers.
Note that package managers may install an old version of the library so a manual build/install from source is preferred.
Example install from source:
git clone https://github.com/OpenZWave/open-zwave.gitcd open-zwavemake -j$(nproc)sudo make install- You may need to call
sudo ldconfignow on linux systems - See the open-zwave/INSTALL file for more information
Get the Package
go get github.com/jimjibone/goopenzwave
Example: gominozw
This package comes with a basic example, gominozw, which is a replica of the original C++ OpenZWave MinOZW utility, now written in Go.
It shows how to set up the Manager with various options and listen for Notifications. Once the initial scan of devices is complete, polling for basic values is set up for the devices.
To install and use:
go install github.com/jimjibone/goopenzwave/gominozw
gominozw --controller /dev/ttyYourUSBDevice
Notes
open-zwave build fails with fatal error: libudev.h: No such file or directory on Debian/Ubuntu
Try installing libudev with apt and build again.
apt-get install libudev-dev
cd open-zwave && make
Crashes instantly on macOS 10.12
Do you see something like this when trying to run something with the goopenzwave package?
$ ./gominozw -h
zsh: killed ./gominozw -h
You should try building with the -ldflags=-s option. E.g.: go build -ldflags=-s. More info at golang/go#19734.
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate 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
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
