I am trying to get Ecowitt@MQTT running on my Docker Mosquitto container. I have gotten as far as receiving a message from the Ecowitt gateway, GW3000, however when the message is passed on to Mosquitto I receive error 2, name not recognized. I have a Python Paho client running for testing and it communicates correctly with Mosquitto. I have tired several configurations for Ecowitt2MQTT the only one that worked partially was with --Nework=Bridge, using port 8085:8085 for conncting to the gateway and 1883 for the Ecowitt2mqtt to Mosquitto.
The Docker Run command for Ecowitt2mqtt:
Thanks for your reply. I had already started on your suggestion after doing some more studying of docker. Now Iβm getting a validation error from the compose.yaml file.
ββ"
1 validation error for Config
Value error, must provide at least one of: mqtt_topic, hass_discovery [type=value_error, input_value={}, input_type=dict]
ββ"
I have tried several things to clear it but no luck. Yaml File
It looks like youβve run into the βYAML spacing trap.β The validation error must provide at least one of: mqtt_topic, hass_discovery is happening because Docker Compose isnβt actually reading your environment variables correctly.
I am not 100% sure, as the way you have pasted it it is not really readable.
But please check the formatting details.
When I pasted it into my editor everything is left justified. Iβll make it look like yourβs and let you know. Can I substitute β-β for the bullet points?
It took a while to get it all correct but I finally got it to run. Now both Mosquitto and ecowitt2mqtt are running in their own docker containers. I just donβt see any activity from e2mqtt. I have turned on verbose and diagnostics and except for the opening info nothing shows up. Using wireshark I can see a message go to port 8085 with but nothing ever shows up on my client side. Mosquitto is working, I can send and receive messages to it correctly. I would like to get e2mqtt working because I understand the data and format are easier to work with.
You can check the logs of Mosquitto to understand if ou are connected. Turning on log_type all even adds more information. You would be able to identify your client based on the clientid and see if the connection and publishes work.
Depending on your setup, it could be an authorization problem. Maybe e2mqtt is not allowed to publish to the topic it trys to publish.