Hey @Lars_Andersson,
I spent some time yesterday and this morning digging into this. Here’s what I have for you…
In my tests, I have a Raspberry Pi running the Edge Agent with the local broker enabled. I did not set a username or password, or an address. I simply added
[localBroker]
enabled = true
to my config.toml
. Then, with my laptop, I was able to connect to the local broker by using the IP address of the host machine. So, my Raspberry Pi’s IP address at the time was 192.168.0.175
, so when connecting to the local broker, I used mqtt://192.168.0.175:1883
since 1883 was the port I set in the docker run command for the MQTT broker.
Although the local broker does require a Client ID, you can use a string. Unlike Losant’s Cloud Broker where the Client ID must be a Device ID, at this level, the Client ID just needs to be a string.
Why would the “docker logs” command not produce an output when I have logging enabled?
The docker logs
command does not work in this case because you have logger
configured in your config.toml
file. When you have logger
configured, the logs are written to a file, in your case losant-edge-agent-log.log
. You would need to read that file to see the logs.
Let me know if any of this helps you, or if you need more clarification.
Thank you,
Heath