# HomeThings
**Repository Path**: wanwuliandong/webthing-go
## Basic Information
- **Project Name**: HomeThings
- **Description**: WebThings 的核心应用场景是构建私密、去中心化的智能家居系统,让你通过统一的 Web 界面直接监控和控制家中不同品牌的设备,无需依赖厂商云服务。
- **Primary Language**: Go
- **License**: MPL-2.0
- **Default Branch**: master
- **Homepage**: https://webthings.io/docs/gateway/introduction/
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2023-01-31
- **Last Updated**: 2026-11-09
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Web of Things
---
[](https://GitHub.com/dravenk/webthing-go/network/)
[](https://badge.fury.io/gh/dravenk%2Fwebthing-go)
[](https://godoc.org/github.com/dravenk/webthing-go)
[](https://www.codacy.com/manual/dravenk/webthing-go?utm_source=github.com&utm_medium=referral&utm_content=dravenk/webthing-go&utm_campaign=Badge_Grade)
[](https://api.travis-ci.com/dravenk/webthing-go.svg)
[](https://goreportcard.com/report/github.com/dravenk/webthing-go)
[](https://codebeat.co/projects/github-com-dravenk-webthing-go-master)
[](https://cloud.docker.com/repository/docker/dravenk/webthing/builds)
## USAGE
This library fully supports [Web Thing REST API](https://webthings.io/api/#web-thing-rest-api).You can start building your Web of Thing by looking at [single-thing](https://github.com/dravenk/webthing-go/blob/master/examples/single-thing/single-thing.go).
### Download and import
This package name is called `webthing`. This project is called webthing-go to keep the naming consistent with the implementation of other languages. You just need to import this package the way golang normally imports a package.
```shell
go get -u -v github.com/dravenk/webthing-go
```
```go
import (
"github.com/dravenk/webthing-go"
)
```
#### Create Thing
```go
// Create a Lamp.
thing := webthing.NewThing("urn:dev:ops:my-thing-1234",
"Lamp",
[]string{"OnOffSwitch", "Light"},
"A web connected thing")
```
For more information on Creating Webthing, please check the wiki [Create-Thing](https://github.com/dravenk/webthing-go/wiki/Create-Thing)
#### Example
```shell
cd $GOPATH/src/github.com/dravenk/webthing-go
go run examples/single-thing/single-thing.go
```
You can also run a sample with [docker](https://hub.docker.com/r/dravenk/webthing):
```shell
docker run -ti --name single-thing -p 8888:8888 dravenk/webthing
```
For more information on Run Example, please check the wiki [Run-Example](https://github.com/dravenk/webthing-go/wiki/Run-example)
RESOURCES
*
*