Skip to content

Commit 0042529

Browse files
committed
Add implementation for bp35c2
1 parent bc39ea6 commit 0042529

File tree

15 files changed

+994
-0
lines changed

15 files changed

+994
-0
lines changed

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
8+
# Test binary, built with `go test -c`
9+
*.test
10+
11+
# Output of the go coverage tool, specifically when used with LiteIDE
12+
*.out
13+
14+
# Dependency directories (remove the comment below to include it)
15+
vendor/
16+
17+
hems
18+
hems_linux_arm

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM alpine:3.10
2+
3+
WORKDIR /hems
4+
ADD hems_linux_amd64 /hems
5+
6+
ENTRYPOINT [ "./hems_linux_amd64" ]

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
.PHONY: build-rpi
3+
build-rpi:
4+
GOOS=linux GOARM=7 GOARCH=arm go build -o hems_linux_arm .
5+
6+
.PHONY: docker
7+
docker:
8+
docker build -t .

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
11
hems
22
====
3+
4+
B ルート対応 Wi-SUN デバイスにシリアル通信で接続し、消費電力を取得します。
5+
6+
## Features
7+
- [x] 瞬間消費電力の取得
8+
- [ ] 積算消費電力の取得
9+
10+
## Support Devices
11+
- [x] [UDG-1-WSNE](https://web116.jp/shop/netki/miruene_usb/miruene_usb_00.html)
12+
- [x] [BP35C0](https://www.rohm.co.jp/products/wireless-communication/specified-low-power-radio-modules/bp35c0-product), [bp35c2](https://www.rohm.co.jp/products/wireless-communication/specified-low-power-radio-modules/bp35c2-product)
13+
14+
## Usage
15+
16+
※ 本アプリケーションは、日本の電波法に準拠しているデバイスで、新たに免許等が必要ないものを接続して、利用する事を想定しています。

docker-compose.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: "3.2"
2+
3+
services:
4+
hems:
5+
container_name: hems
6+
image: ww24/hems
7+
build:
8+
context: .
9+
dockerfile: Dockerfile
10+
healthcheck:
11+
test: curl -f http://localhost:9999 || exit 1
12+
interval: "5s"
13+
timeout: "3s"
14+
retries: 2
15+
restart: on-failure
16+
ports:
17+
- "9999"
18+
devices:
19+
- "/dev/ttyACM0:/dev/ttyACM0:rw"
20+
env_file:
21+
- ./env.list

0 commit comments

Comments
 (0)