https://toitlang.org/ logo
Here is an implementation of your code using the `...
# general
f
Here is an implementation of your code using the `SimpleClient`:
Copy code
import encoding.json
import log
import monitor
import mqtt
import mqtt.transport as mqtt
import mqtt.packets as mqtt
import uuid show Uuid

PORT ::= 1883
HOST ::=  "broker.emqx.io"
TOPIC ::= "sunstash/diverter"

CLIENT-ID ::= "$(Uuid.random)"
USERNAME ::= ""
PASSWORD ::= ""

solar := 10.0