1
0
mirror of https://github.com/Luzifer/culmqtt.git synced 2024-09-19 23:32:58 +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.
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 {
scanner := bufio.NewScanner(port)
for scanner.Scan() {