https://github.com/its-alex/go-rfxcom-command
RFXCom lib to control RF devices
https://github.com/its-alex/go-rfxcom-command
Last synced: 21 days ago
JSON representation
RFXCom lib to control RF devices
- Host: GitHub
- URL: https://github.com/its-alex/go-rfxcom-command
- Owner: Its-Alex
- License: mit
- Created: 2019-11-11T17:39:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-28T16:39:43.000Z (over 2 years ago)
- Last Synced: 2025-10-30T17:48:20.417Z (8 months ago)
- Language: Go
- Homepage: go-rfxcom-command.its-alex.vercel.app
- Size: 32.2 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-rfxcom-command
RFXCom lib to control RF devices from my personal NAS.
## Requirements
- [`Go`](https://go.dev/)
- [`reflex`](https://github.com/cespare/reflex)
```
$ make deps
```
## Development
### Build
You can build project:
```
$ make build
```
#### For nas
You can build project for `arm64`:
```
$ make build-arm64
```
### Watch
You can watch project:
```
$ make watch
```
## Docker
You can build container for all architecture using
[buildx](https://docs.docker.com/buildx/working-with-buildx/):
```
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t itsalex/go-rfxcom --push .
```
## Deployement on NAS (Synology)
```
$ GOOS=linux GOARCH=arm64 go build .
```
Files on NAS are in `/volume2/scripts/rfxcom/`. There is two files:
- `go-rfxcom-command` programs binary.
- `launch.sh` script used to setup NAS and launch it, it contains:
```
#!/usr/bin/env bash
set -v
# Enable needed module to use TTY
sudo insmod /lib/modules/usbserial.ko || true
sudo insmod /lib/modules/ftdi_sio.ko || true
/volume2/scripts/rfxcom/go-rfxcom-command
```
A service is used to setup launch at startup at `/etc/init/go-rfxcom.conf`.
File service:
```
author "ItsAlex"
start on runlevel 2
stop on runlevel [06]
expect fork
respawn
respawn limit 5 10
pre-start script
echo "Starting go-rfxcom"
end script
post-stop script
echo "Stopped go-rfxcom"
end script
exec /volume2/scripts/rfxcom/launch.sh
```
You can start it:
```
$ start go-rfxcom
```
You can stop it:
```
$ stop go-rfxcom
```
You can see logs at `cat /var/log/upstart/go-rfxcom.log`