Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pvainio/vallox-rs485
Vallox RS485 serial bus implemenation for Go
https://github.com/pvainio/vallox-rs485
home home-automation iot rs485 vallox
Last synced: about 2 months ago
JSON representation
Vallox RS485 serial bus implemenation for Go
- Host: GitHub
- URL: https://github.com/pvainio/vallox-rs485
- Owner: pvainio
- License: gpl-3.0
- Created: 2021-10-12T09:08:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-17T19:39:17.000Z (7 months ago)
- Last Synced: 2024-11-30T04:06:11.161Z (about 2 months ago)
- Topics: home, home-automation, iot, rs485, vallox
- Language: Go
- Homepage:
- Size: 40 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vallox RS485 serial interface module for Go lang
## Overview
This module implements Vallox RS485 serial protocol. Currently it can:
- read temperature reported by device: outside -> incoming -> inside -> outgoing
- read ventilation fan speed
- change ventilation fan speedMade for https://github.com/pvainio/vallox-mqtt Vallox RS485 MQTT gateway for Home Assistant integration
## Supported devices
The module has been tested with only one device so far:
- Vallox Digit SE model 3500 SE made in 2001 (one with old led panel, no lcd panel)Probably it will support other Vallox models using RS485 serial bus for remote controllers. It is possible that some registers have have changed through time since this device register does not match Vallox documentation.
Use at your own risk! Vallox documentation warns about using incorrect registers or incorrect values may damage the device.
## Usage
To write registers (speed) Config.EnableWrite need to be set to true.
## Example
```go
package mainimport (
"log"valloxrs485 "github.com/pvainio/vallox-rs485"
)var registers = map[byte]string{
valloxrs485.FanSpeed: "Speed",
valloxrs485.TempIncomingOutside: "Ouside temp",
valloxrs485.TempIncomingInside: "Incoming temp",
valloxrs485.TempOutgoingInside: "Inside temp",
valloxrs485.TempOutgoingOutside: "Outgoing temp",
}func main() {
cfg := valloxrs485.Config{Device: "/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A901IPIR-if00-port0"}
vallox, err := valloxrs485.Open(cfg)if err != nil {
log.Fatalf("error opening Vallox device %s: %v", cfg.Device, err)
}for {
event := <-vallox.Events()if !vallox.ForMe(event) {
// Do not handle values addressed for someone else in the same bus
continue
}if name, ok := registers[event.Register]; ok {
log.Printf("Received new value %s = %d", name, event.Value)
} else {
log.Printf("Received unidentified value register %d = %d", event.Register, event.Value)
}
}
}
```