I got python3 loaded on my windows machine. I was thinking that I would use samba to write it to the machine that I run home assistant on. It’s running home assistant os…that sounds like a deal breaker, is that right? https://www.home-assistant.io/blue/
I do have a synology nas that I could maybe put it on. Would that work? It’s also on 24/7.
OK, that helps. Glad to know it will run on Blue. I’ll install portainer and then what, use docker to install it? The install command of pip is issued thru docker? Sorry to be so dumb here, but I am quite the noob, but I am learning.
So, I researched what a portainer is, and loaded it on my Home Assistant. Then, I ran the docker command in a new container and loaded ecowitt2mqtt. I loaded mosquitto MQTT broker on my machine and made a new non-admin user for it with the name “skeeter”. I think that I got the MQTT broker set up ok. I also set up the ecowitt phone app as described to send data to the HA URL, for me its 10.0.0.186.
Now, I am trying to determine what to do with this bit :
I have an SSH terminal with the “$” command prompt, but don’t know what to do next ? The terminal is running on my home assistant computer, thru an add on called “terminal and SSH”.
Perhaps I need to edit the YAML file to input these environment variables ? That’s my current best guess. I will poke around tonight and hopefully not break anything.
When I run the ecowitt2MQTT in portainer, I get an error message in the logs that reads “Missing required environment variable: MQTT_BROKER”.
I know that I need to set this, but I don’t know where or how to do it. I downloaded the file editor but I cannot find the correct file that I might edit.
Rather than dealing with all this: just today, I collaborated with another user to create a Home Assistant add-on that you can install via the Home Assistant UI.
You might want to revisit the portion of your instructions where you suggest setting the port to 8000, or whatever you like, as I originally had it at 8080 for some reason and would not know how to change it currently. I set it to 8000 (probably matching the config) and it started working. Hooray! Great work.
Thank you Aaron, great work! I now have my Ambient PWS and one additional temp/hum sensor reporting locally to HA running in a VM on an UnRAID server. I installed the ecowitt2mqtt server on a Raspberry Pi 3B with the Ecowitt GW1000 plugged into the Pi that is closer to my PWS than my UnRAID server.
Installed the GW1000 and sensors today, all working in the WS app, but hitting the wall with the final piece of the puzzle, and thats getting it all into HA.
So - HA is on a VM on the QNAP NAS. Both OS and Version are current. MQTT Broker is on docker in the NAS. Everythign else is still working fine.
Ive installed the Ecowitt2MQTT, and once started, here are the logs:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[21:44:35] INFO: Fetching configuration...
[21:44:35] ERROR: Got unexpected response from the API: Service not enabled
[21:44:35] INFO: Starting Ecowitt2MQTT
ERROR:aiohttp.server:Error handling request
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/lib/python3.8/site-packages/ecowitt2mqtt/mqtt.py", line 114, in async_publish_payload
await _async_publish_to_hass_discovery(client, data, discovery_manager)
File "/usr/lib/python3.8/site-packages/ecowitt2mqtt/mqtt.py", line 32, in _async_publish_to_hass_discovery
async with client:
File "/usr/lib/python3.8/site-packages/asyncio_mqtt/client.py", line 315, in __aenter__
await self.connect()
File "/usr/lib/python3.8/site-packages/asyncio_mqtt/client.py", line 78, in connect
self._client.connect(self._hostname, self._port, 60)
File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 939, in connect
self.connect_async(host, port, keepalive,
File "/usr/lib/python3.8/site-packages/paho/mqtt/client.py", line 1005, in connect_async
raise ValueError('Invalid host.')
ValueError: Invalid host.
INFO:aiohttp.access:10.1.1.205 [28/Mar/2021:10:44:37 +0000] "POST /data/report HTTP/1.1" 500 250 "-" "-"
so one last question if I may - where do I enter the broker credentails? - my MQTT broker is external to HA, running in a docker containmer on the NAS. - and therefore not ( I dont think ) on the HA auto discovery. - Is this a mandatory ( MQTT Discovery ) for Ecowitt2Mqtt?