ECOWITT Weatherstation integration for Home Assistant

You are very welcome. If you need any help, just let me know, I can give some advises how to set it up and what to do, if you get stuck with something.

The integration works well with Ecowitt weather stations. For the weather stations you will need the WSView app on your mobile to configure the custom server.
To access the data sent to HA, you just need to open and view the created entities. If you want to log it for long term, then set up an InfluxDB and Grafana addons.

Thanks ā€¦ indeed I would ask 1 more thing.
Since I installed the integration I got a ton of those Log entries.

Logger: custom_components.ecowitt
Source: custom_components/ecowitt/init.py:274
Integration: Ecowitt Weather Station
First occurred: 7. Juni 2022, 10:35:18 (2133 occurrences)
Last logged: 22:42:55

Unhandled sensor type runtime value 203864, file a PR.
Unhandled sensor type runtime value 203925, file a PR.
Unhandled sensor type runtime value 203986, file a PR.
Unhandled sensor type runtime value 204047, file a PR.
Unhandled sensor type runtime value 204108, file a PR

Does this tell you something?

1 Like

Yep, a PR is waiting to be merged to ignore the runtime sensor.

Thanks to @dkirker.

hey there
I liked the Ecowitt and this integration so much ā€¦ I upgraded to the new Wittboy.
The data is coming ā€¦ some ā€¦ but the Device in HA still says GW1100 instead of GW2000
and not all sensor data (also added moisture etc.) is coming.

  • Is it needed to delete and readd the device when adding a sensor?
  • Is it needed to delete and readd the device when replacing / upgradind the ecowitt hub?
  • Is there a a way to have prefixes automatically?
    so in belows example not only sensor.absolute_pressure etc.
    but like: sensor.gw2000_absolute_pressure

thank you !

edit: here is a dump of my ecowitt
It is a GW2000 base + wh90 (wittboy) outdoor array + WH31 + soil sensor + currently additonal still the old wh65 outdoor sensor array

|stationtype| |GW2000A_V2.1.5|
|---|---|---|
|runtime| |161|
|dateutc| |2022-06-27 14:59:56|
|tempinf| |75.02|
|humidityin| |62|
|baromrelin| |28.650|
|baromabsin| |28.650|
|tempf| |74.48|
|humidity| |64|
|winddir| |224|
|windspeedmph| |0.00|
|windgustmph| |0.00|
|maxdailygust| |0.00|
|solarradiation| |0.16|
|uv| |0|
|rainratein| |0.000|
|eventrainin| |0.000|
|hourlyrainin| |0.000|
|dailyrainin| |0.000|
|weeklyrainin| |0.000|
|monthlyrainin| |0.000|
|yearlyrainin| |0.000|
|totalainin| |0.000|
|rrain_piezo| |0.000|
|erain_piezo| |0.000|
|hrain_piezo| |0.000|
|drain_piezo| |0.000|
|wrain_piezo| |0.000|
|mrain_piezo| |0.000|
|yrain_piezo| |0.000|
|ws90cap_volt| |0.4|
|ws90_ver| |119|
|temp1f| |74.84|
|humidity1| |63|
|soilmoisture1| |48|
|wh65batt| |0|
|batt1| |0|
|soilbatt1| |1.8|
|wh90batt| |3.28|
|freq| |868M|
|model| |GW2000A|

missing in HA is the data from the WS90 I think. I can see it actually clearly after I remove the Wh65
but for now I minimum think it is:

|rrain_piezo| |0.000|
|erain_piezo| |0.000|
|hrain_piezo| |0.000|
|drain_piezo| |0.000|
|wrain_piezo| |0.000|
|mrain_piezo| |0.000|
|yrain_piezo| |0.000|
|ws90cap_volt| |0.4|
|ws90_ver| |119|
|wh90batt| |3.28|

If you look at your logs, you will see the warnings to log a PR. And I think there is one to be merged, but waiting for @garbled1ā€™s interaction.

Iā€™ve been using @garbled1 for months now (still do), and works great and very stable ā€¦execpt all the errors in the log files and unsupported sensors. I came across another Ecowitt/HA integration @bachya and it works amazingly well, even with my GW2000

Right now I have my GW1100 on garbled1 and GW2000 on bachya.

1 Like

is there a way to also create a native weather entity out of that data directly in the integration or does someone have a template sensor that can be shared that takes all the data from inidivual entiitys and puts it in a weather entity so the standard cards work directly?

I have created one by mixing Tomorrow.io and the local weather station. I will post the code soon for your reference.

Edit:

This how I set up my weather entity:

weather:
  - platform: template
    name: "Local Weather Station"
    condition_template: "{{ states('weather.tomorrow_io_home_hourly') }}"
    temperature_template: "{{ states('sensor.outdoor_temperature') | float }}"
    humidity_template: "{{ states('sensor.humidity') | float }}"
    pressure_template: "{{ states('sensor.relative_pressure') | float }}"
    wind_speed_template: "{{ states('sensor.wind_speed_2') | float }}"
    wind_bearing_template: "{{ states('sensor.wind_direction') | float }}"
    visibility_template: "{{ state_attr('weather.tomorrow_io_home_hourly', 'visibility') }}"
    forecast_template: "{{ state_attr('weather.tomorrow_io_home_hourly', 'forecast') }}"

I use it with a custom:weather-card by @bramkragten:

type: custom:weather-card
hourly_forecast: true
entity: weather.local_weather_station
forecast: true
number_of_forecasts: '7'
1 Like

For those of you with multiple devices on the same HA instance (such as a GW1000 and a GW1100) that each handle their own unique sensors, how did you set the configuration settings? Are they different for each device, or should they be the same? For instance port 4199 and path: /data/report/ for both of the devices.

I am having trouble with my integration seeing both devices (2 devices), but only wanting to connect to one at a time. When I restart HA, it seems to randomly pick which one it wants to connect to, but never both at the same time. Any ideas would be very helpful.

Different portsā€¦

And what if you would jsut read an follow the clear instructions?

The following steps must be performed before setting up this integration.
If you have not already done so, please do this now.

Use the WS View app (on your phone) for your Ecowitt device, and connect to it.
Pick menu ā†’ device list ā†’ Pick your station.
Hit next repeatedly to move to the last screen titled ā€˜Customizedā€™

Pick the protocol Ecowitt, and put in the ip/hostname of your hass server.
Path doesnā€™t matter as long as it ends in /, leave the default, or change it to just /.
Pick a port that is not in use on the server (netstat -lt). (4199 is probably a good default)
Pick a reasonable value for updates, like 60 seconds.
Save configuration. The Ecowitt should then start attempting to send data to your server.

Click submit when these instructions have been completed.

The weather station just sends data. The integration just interprets the incoming data on the set port.

1 Like

Hello, i got a wittboy but I only see 15 entities in home assistant, i miss the rain sensor that is what I most need. Any suggestion? Thanks

Hi @darlezior - yep I also just got a Wittboy and am having the same issue. It looks like somebody has already fixed it and submitted a pull request in April for the change to be merged into the integration, but this hasnā€™t yet been approvedā€¦

2 Likes

Iā€™ve been trying to get this up and running myself and Iā€™m not having much luck. It seems like Iā€™m just missing one step somewhere and I canā€™t quite get it going.

Iā€™ve added the integration in HomeAssistant with Port 4199 and ā€œecowittā€ in the text box below it (not sure what that text is for) and confirmed that the port is open and itā€™s listening via netstat -aon. I have even deleted the integration and run netstat to confirm that nothing is using that port otherwise. Iā€™m using a GW1100C with the latest firmware (v2.1.5)

Hereā€™s the way Iā€™ve tried this the last time:

  1. Use WSView to set up the Customized upload. Top to bottom:
    Enable
    Protocol: Ecowitt
    Server IP: IP of the RPi running HomeAssistant
    Path: /
    Port: 4199
    Upload Interval: 60

Then, in HA Iā€™ve added the integration. Iā€™ve checked and HA is listening on that IP and port. However, no devices nor entities appear. Where am I going wrong?

That is going to be used as the Device Name.

Can you check your log for ecowitt?

I had the same difficultiesā€¦but then I found (developer/state) one entity:

weather.tomorrow_io_home_daily

and all of the data fields are attributes.

I have a free subscription so all I see is CORE attributes.

Checked the logs and this is the only entry in there for ecowitt:

image

That was one of the times that I had an issue deleting the integration to try readding it after Iā€™d changed something in WS View.

More info on how everything is set up here. Iā€™m running HomeAssistant on an RPi 4 in a docker container. Iā€™ve got AdGuard Home running in a second container on that same Pi. Everything is running through the Balena ecosystem. Iā€™ve tried the private IP of the Pi, the public IP of the Pi, and even a URL that is how I can login to manage things from offsite.

If you did check that the docker container is receiving the messages then there shouldnā€™t be any problem.

You can use netcat for that.

OK, will update after I learn how to use netcat. First step: Google netcat.

Edit: Do I need to be removing and reinstalling the integration each time I make a change? Or if I leave it set up will it suddenly start showing a device and entities once I fix whateverā€™s broken?

No, you shouldnā€™t. Make sure that the messages from the weather station are reaching the container. Worst case, just restart HA.

Are HA and your Ecowitt device in the same VLAN?