Ecowitt2mqtt Beginner's Setup

Hello!

I am new to the Home Assistant (just installed a few days ago), and wanted to get a beginner’s guidance on how to integrate HA with my GW1100 temperature gateway, so I can start logging temperature data.

I’ve read that a python script (Ecowitt2mqtt) is needed for the GW1100 to push data to the HA. However, I am lost on where to start. Few questions I have:

  • Where would the Ecowitt2mqtt run? (Can it run inside the same HA system? I have an image running from Hyper-V).

  • How can Ecowitt2mqtt be automated to pull data from the gateway at specified intervals?

  • How does HA stores this information? (do I need something to make MQTT work?)

  • How can I graph data overtime?

I came across this post, which has given me some pieces of information, but I haven’t been able to put things together yet…

Any help would be greatly appreciated. Thank you!

There is an alternative: A HACS custom repository Ecowitt Weather Station that does not require MQTT at all. Instead, it acts as a server that retrieves the data directly from the GW1100 where you configure it as a custom weather service.
Entities are created automatically - at least for my devices connected to the Ecowitt gateway. This integration stores all data inside Home Assistant and you get the usual graphs out of the box.
For long term storage and graphs you could for example use the Influxdb integration.

1 Like

I retrieve my GW1000 data using a Node-Red flow - you configure push to HA Node-Red under the Customised page in Weather Service under the device in the Ecowitt WSView app. Totally local to my network.

It will probably be customisable for the GW1100 - but I suspect no customisation would be required.

Let me know if you are interested and I will post the Node-Red flow and a screenshot of the customised weather service config.

1 Like

Thanks for the help! This might be the option I need (if there’s an integration I can use without external components. I checked the link you provided, but I can’t seem to find the “Ecowitt Weather Service” integration. Am I missing something?

The link gets you to the repository (incl. documentatijn) that contains nothing but this integration.

Do you already have HACS installed? If so, the Ecowitt Weather Station integration is available there. If not, have a look here: https://hacs.xyz/

Thanks for the help! I was able to get this working by reading here and there. Surprised to see that device battery levels are also reported as part of the data (not just temp and humidity). Super!

I’ll check what other integrations are in HACS…

1 Like

Hi, it’s been a long time since this post, but this is exactly what I’m after. Would you mind sharing your flow for this? I’m not seeing any incoming HTTP requests from my ecowitt and would love to see how you’ve achieved it, thanks

Hmm - it’s been a while - but this is the flow:

[{"id":"a0016b1c.68e518","type":"tab","label":"Weather Station","disabled":false,"info":""},{"id":"4bf5d00.3bb9e3","type":"http response","z":"a0016b1c.68e518","name":"","statusCode":"","headers":{},"x":150,"y":300,"wires":[]},{"id":"46473934.863288","type":"http in","z":"a0016b1c.68e518","name":"Incoming Weather Data","url":"/weather","method":"post","upload":false,"swaggerDoc":"","x":100,"y":440,"wires":[["4bf5d00.3bb9e3","a13a5ac5.13d978","e982959b.552b48","6cb75b49.69ac34","5637551c.e9517c","33ddb671.a1b3ea","9fd1374a.f97838","beb252c0.8f90a","334987d0.84b0c8","c8e15ba6.2ceaf8","85278b90.3a76c8","99d08c7.fe0f27","aa9e1216.2d9a1","cb8de379.0b5f4"]]},{"id":"85278b90.3a76c8","type":"ha-entity","z":"a0016b1c.68e518","name":"Wind Direction","server":"db1e36ff.79a128","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Wind Direction"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:compass"},{"property":"unit_of_measurement","value":"°"}],"state":"payload.winddir","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":440,"y":40,"wires":[[]]},{"id":"a13a5ac5.13d978","type":"ha-entity","z":"a0016b1c.68e518","name":"Humidity","server":"db1e36ff.79a128","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Weather Station Humidity"},{"property":"device_class","value":"humidity"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"%"}],"state":"payload.humidity","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":420,"y":100,"wires":[[]]},{"id":"31aa68f2.f35d28","type":"ha-entity","z":"a0016b1c.68e518","name":"Temperature","server":"db1e36ff.79a128","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Weather Station Temperature"},{"property":"device_class","value":"temperature"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"°C"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":850,"y":160,"wires":[[]]},{"id":"5d802e74.dcc05","type":"ha-entity","z":"a0016b1c.68e518","name":"Wind Speed","server":"db1e36ff.79a128","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Wind Speed"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:weather-windy"},{"property":"unit_of_measurement","value":"km/h"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":850,"y":220,"wires":[[]]},{"id":"94038cf.31ef97","type":"ha-entity","z":"a0016b1c.68e518","name":"Wind Gust","server":"db1e36ff.79a128","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Wind Gust"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:weather-tornado"},{"property":"unit_of_measurement","value":"km/h"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":850,"y":280,"wires":[[]]},{"id":"41442bb0.699a54","type":"ha-entity","z":"a0016b1c.68e518","name":"Rain Rate","server":"db1e36ff.79a128","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Rain Rate"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:weather-rainy"},{"property":"unit_of_measurement","value":"mm/hr"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":840,"y":340,"wires":[[]]},{"id":"fad82c0a.617d3","type":"ha-entity","z":"a0016b1c.68e518","name":"Rain Accumulation","server":"db1e36ff.79a128","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Rain Accumulation"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:cup-water"},{"property":"unit_of_measurement","value":"mm"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":870,"y":460,"wires":[[]]},{"id":"320422ed.aaf82e","type":"ha-entity","z":"a0016b1c.68e518","name":"Raining","server":"db1e36ff.79a128","version":1,"debugenabled":false,"outputs":1,"entityType":"binary_sensor","config":[{"property":"name","value":"Raining"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:weather-pouring"},{"property":"unit_of_measurement","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":840,"y":400,"wires":[[]]},{"id":"6cb75b49.69ac34","type":"function","z":"a0016b1c.68e518","name":"Pressure","func":"var baromabsin = Number(msg.payload.baromabsin)\nvar pressure = baromabsin * 33.863886666667\n\nmsg.payload = pressure.toFixed(1)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":420,"y":540,"wires":[["b8254bcd.741508"]]},{"id":"b8254bcd.741508","type":"ha-entity","z":"a0016b1c.68e518","name":"Atmospheric Pressure","server":"db1e36ff.79a128","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Atmospheric Pressure"},{"property":"device_class","value":"pressure"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"hPa"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":660,"y":540,"wires":[[]]},{"id":"334987d0.84b0c8","type":"function","z":"a0016b1c.68e518","name":"Solar Radiation","func":"var x = Number(msg.payload.solarradiation)\nmsg.payload = x.toFixed(1)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":440,"y":620,"wires":[["29523745.542bb8"]]},{"id":"29523745.542bb8","type":"ha-entity","z":"a0016b1c.68e518","name":"Solar Radiation","server":"db1e36ff.79a128","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Solar Radiation"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:white-balance-sunny"},{"property":"unit_of_measurement","value":"W/m²"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":640,"y":620,"wires":[[]]},{"id":"c8e15ba6.2ceaf8","type":"ha-entity","z":"a0016b1c.68e518","name":"UV","server":"db1e36ff.79a128","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"UV"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:weather-sunny-alert"},{"property":"unit_of_measurement","value":""}],"state":"payload.uv","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":410,"y":700,"wires":[[]]},{"id":"73cded25.8a1464","type":"function","z":"a0016b1c.68e518","name":"raining?","func":"var x = Number(msg.payload)\n\nif (x > 0) {\n   msg.payload = true;\n} else {\n   msg.payload = false;\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":620,"y":400,"wires":[["320422ed.aaf82e"]]},{"id":"1ec5434c.b48b3d","type":"function","z":"a0016b1c.68e518","name":"Single Decimal Place","func":"var x = Number(msg.payload)\n\nmsg.payload = x.toFixed(1)\nreturn msg;","outputs":1,"noerr":0,"x":660,"y":160,"wires":[["31aa68f2.f35d28"]]},{"id":"2e192e0.cf32cd2","type":"function","z":"a0016b1c.68e518","name":"Single Decimal Place","func":"var x = Number(msg.payload)\n\nmsg.payload = x.toFixed(1)\nreturn msg;","outputs":1,"noerr":0,"x":660,"y":220,"wires":[["5d802e74.dcc05"]]},{"id":"11c0ee1c.b6a242","type":"function","z":"a0016b1c.68e518","name":"Single Decimal Place","func":"var x = Number(msg.payload)\n\nmsg.payload = x.toFixed(1)\nreturn msg;","outputs":1,"noerr":0,"x":660,"y":280,"wires":[["94038cf.31ef97"]]},{"id":"97e68709.f7fe28","type":"function","z":"a0016b1c.68e518","name":"Single Decimal Place","func":"var x = Number(msg.payload)\n\nmsg.payload = x.toFixed(1)\nreturn msg;","outputs":1,"noerr":0,"x":660,"y":340,"wires":[["41442bb0.699a54"]]},{"id":"93ad302b.8286e","type":"function","z":"a0016b1c.68e518","name":"Single Decimal Place","func":"var x = Number(msg.payload)\n\nmsg.payload = x.toFixed(1)\nreturn msg;","outputs":1,"noerr":0,"x":660,"y":460,"wires":[["fad82c0a.617d3"]]},{"id":"e982959b.552b48","type":"unit-converter","z":"a0016b1c.68e518","category":"temperature","inputUnit":"F","outputUnit":"C","inputField":"payload.tempf","outputField":"payload","inputFieldType":"msg","outputFieldType":"msg","name":"F to C","x":410,"y":160,"wires":[["1ec5434c.b48b3d"]]},{"id":"5637551c.e9517c","type":"unit-converter","z":"a0016b1c.68e518","category":"speed","inputUnit":"m/h","outputUnit":"km/h","inputField":"payload.windspeedmph","outputField":"payload","inputFieldType":"msg","outputFieldType":"msg","name":"mph to kmph","x":440,"y":220,"wires":[["2e192e0.cf32cd2"]]},{"id":"33ddb671.a1b3ea","type":"unit-converter","z":"a0016b1c.68e518","category":"speed","inputUnit":"m/h","outputUnit":"km/h","inputField":"payload.windgustmph","outputField":"payload","inputFieldType":"msg","outputFieldType":"msg","name":"mph to kmph","x":440,"y":280,"wires":[["11c0ee1c.b6a242"]]},{"id":"9fd1374a.f97838","type":"unit-converter","z":"a0016b1c.68e518","category":"length","inputUnit":"in","outputUnit":"mm","inputField":"payload.rainratein","outputField":"payload","inputFieldType":"msg","outputFieldType":"msg","name":"\" to mm","x":420,"y":340,"wires":[["73cded25.8a1464","97e68709.f7fe28"]]},{"id":"beb252c0.8f90a","type":"unit-converter","z":"a0016b1c.68e518","category":"length","inputUnit":"in","outputUnit":"mm","inputField":"payload.dailyrainin","outputField":"payload","inputFieldType":"msg","outputFieldType":"msg","name":"\" to mm","x":420,"y":460,"wires":[["93ad302b.8286e"]]},{"id":"99d08c7.fe0f27","type":"ha-entity","z":"a0016b1c.68e518","name":"Inside Humidity","server":"db1e36ff.79a128","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Weather Station Humidity Inside"},{"property":"device_class","value":"humidity"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"%"}],"state":"payload.humidityin","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":440,"y":780,"wires":[[]]},{"id":"87a65a35.0dd3e8","type":"ha-entity","z":"a0016b1c.68e518","name":"Inside Temperature","server":"db1e36ff.79a128","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Weather Station Temperature Inside"},{"property":"device_class","value":"temperature"},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"°C"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","x":870,"y":860,"wires":[[]]},{"id":"27d40406.cb6f9c","type":"function","z":"a0016b1c.68e518","name":"Single Decimal Place","func":"var x = Number(msg.payload)\n\nmsg.payload = x.toFixed(1)\nreturn msg;","outputs":1,"noerr":0,"x":660,"y":860,"wires":[["87a65a35.0dd3e8"]]},{"id":"aa9e1216.2d9a1","type":"unit-converter","z":"a0016b1c.68e518","category":"temperature","inputUnit":"F","outputUnit":"C","inputField":"payload.tempinf","outputField":"payload","inputFieldType":"msg","outputFieldType":"msg","roundOutputField":false,"outputFieldDecimals":"","name":"F to C","x":410,"y":860,"wires":[["27d40406.cb6f9c"]]},{"id":"cb8de379.0b5f4","type":"debug","z":"a0016b1c.68e518","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":180,"y":740,"wires":[]},{"id":"db1e36ff.79a128","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Then you need to fire up WS View, go to Device List, choose your station, then choose More (top right) snd select Weather Services.

keep going Next until you get to Customised, enable it and choose Ecowitt protocol.

Server IP is the HA IP, path is /endpoint/weather, port 1880, upload interval I have as 20 seconds.

Has been working for years - this is for a GW1000 with rain sensor, wind etc sensor and temp/humidity sensor.

I found your reply to this post. I know it’s been a couple years, but I am interested in how you published the data from the app to an MQTT broker. If you’re still willing to elaborate on how you did it, I would be interested. Thank you

You need Node-Red installed. The rest of the information is in the post above - its an export of a Node-Red flow which you import into Node-Red, then change the parameters for your environment.

yea so I saw it after I looked on my laptop not on my phone. When you setup up the flow in the http node do you set the ip to the weather station IP. I am not getting any data returning from my weather station. I have it set identical to your post configuration

The data is pushed to node-red by the weather station. Node-Red doesn’t need an IP address, just a target URL. The rest is configured in the Ecowitt app:

Note that the flow above is actually sending to HA via the API. If you want to use MQTT, simply replace each of the blue HA entity nodes with a mqtt out node.

Sorry to be stupid but I don’t run my node red in ha it is separate. I tried using my node red ip address with the correct port but I am still not getting any data from the weather station should I set it to my ip of my server. Thanks for all the help with this I appreciate it greatly

So you need to configure the IP address of wherever Node-Red is running in Ecowitt, and the port it is listening on.

I am pretty sure port 1880 is the Node-Red default, it should be open on the server Node-Red is running on.

Sorry - not a Node-Red expert, but as long as Ecowitt is publishing to the server IP and port Node-Red is listening on, you should see data.