26 lines
540 B
Markdown
26 lines
540 B
Markdown
# Home Assistant Event Proxy
|
|
|
|
I found getting MQTT message sending on the pico MCP to be too trickey. I built this event proxy go app to simplify things.
|
|
With it in place the MCP only needs to send a very simple TCP message like "M01,25.5,60,1013". This this proxy app with
|
|
convert it into a Home Assistant MQTT event.
|
|
|
|
|
|
## Dev
|
|
|
|
Run dev server with:
|
|
|
|
```shell
|
|
$ go run main.go
|
|
```
|
|
|
|
Run unit tests with:
|
|
|
|
```shell
|
|
$ go test -v
|
|
```
|
|
|
|
To send a test message from the command line:
|
|
|
|
```shell
|
|
$ echo "M01,1.0,1.1,1.2" | nc 192.168.1.153 8080
|
|
```
|