1
0
Fork 0
mirror of https://github.com/Luzifer/culmqtt.git synced 2024-12-23 03:01:19 +00:00

Fix: Initialize the device to have signals reported

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-07-14 01:52:28 +02:00
parent b01f443a8b
commit 47075ebb6c
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -61,6 +61,13 @@ func main() {
// Make sure to close it later. // Make sure to close it later.
defer port.Close() defer port.Close()
// Send initialization for the CUL
// TODO: This might be useful to be configurable?
fmt.Fprintln(port, "X21") // Turn on echoing of received messages
fmt.Fprintln(port, "Ax") // reset AskSin
fmt.Fprintln(port, "Zx") // reset Moritz
fmt.Fprintln(port, "brx") // reset WMBus
for { for {
scanner := bufio.NewScanner(port) scanner := bufio.NewScanner(port)
for scanner.Scan() { for scanner.Scan() {