I could not believe how hard it was to get data from my Personal Weather Station (PWS) into Home Assistant. The various API’s for Wunderground and Ecowitt refused to work for me. But I was looking at the Ecowitt page for my PWS and found that they had released an API which alows you to get data from their servers. See this page: https://doc.ecowitt.net/web/#/apiv3en?page_id=1
Assuming you set up your PWS to send data to ecowitt,
1.look up your PWS MAC address from the wsview phone app from the Device List
2. create an application key and API key on the ecowitt platform
The following code retrieves all of the data available from my PWS. You might need to play with the API call on the resource line to see what is available to you.
Note the data is returned in Imperial units. there are API parameters to change the various units but they did not want to work for me so I did the conversion to metric units in the value_template. If you are using different units, be sure to adjust my settings.
Good to know how to access Ecowitt’s API.
However, have you tried the HACS custom component that allows for the weather station to push all data locally to Home Assistant. Probably took me less than 15 minutes to set all up.
Yes, I tried it and another fork of it but they both were broken for me so I looked for another solution. I also tried my wunderground api but it failed too.
Is there any way to get the Dashboard ecowitt.net into Home Assistant?
Sure i can create an Webpage card but i have to insert login in the Card, and that don´t works.
There only flash the card, because i cant log in.
I’m surprised you had issues. I use the 1100 gateway and it’s been flawless. I wanted something similar to the old barometric gauges that predict weather. This is what I came up with. It’s still a work in progress as I dial in. The red and dark blue lines may get removed later but are helpful markers right now. Above the second dark blue line moving clockwise I have never had precipitation. Each red line as you move down counter clockwise the chance of rain increases. The label “Change” will read Storm, Rain, Change, Sunny, or Dry depending on the pressure.
When you set up the gateway did you use a local IP address? You don’t want it to have to leave your network and try to make a round trip back in. Port 4199 might get blocked or redirected traversing NAT. I’m not sure if the Ecowhitt device can interpret mDNS either so I would stick with an IP. Personally I prefer avoiding the cloud. I like that the device speaks directly to HA.
Thats all very well if the device speaks to HA but it doesn’t I tried again several times.
The integration says to use data similar to this. The web hook changes every time the integration setup is selected.
Server IP: 192.168.1.29
Path: /api/webhook/f796e0a72913a097455e7d4ab7adxxxx
Port: 8123
So far the external API has been bulletproof. It uses https so no issues with ports.
You don’t need to create a webhook to use the integration and you use the port the integration exposes instead of the HA port. I believe the port is always 4199 by default. We must be using different integrations or different versions.
I can’t see there is anything to uninstall from the past. I dug around some folders
Using 2022.9.1 cos I get an error if I update but thats another story 2022-09-27 19:44:58.491 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547269756480] Error updating Home Assistant Core 'HomeAssistantCore.update' blocked from execution, system is not healthy
SO I tried using the different settings from the screendump above. The integration failed with an error.
In the log I get.
2022-09-27 19:36:26.017 INFO (SyncWorker_1) [homeassistant.loader] Loaded ecowitt from homeassistant.components.ecowitt
2022-09-27 19:38:13.292 INFO (MainThread) [homeassistant.setup] Setting up ecowitt
2022-09-27 19:38:13.293 INFO (MainThread) [homeassistant.setup] Setup of domain ecowitt took 0.0 seconds
2022-09-27 19:38:13.299 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.ecowitt
2022-09-27 19:38:13.302 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.ecowitt
2022-09-27 19:51:47.664 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.ecowitt
2022-09-27 19:51:47.666 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.ecowitt
2022-09-27 19:51:47.670 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Ecowitt for ecowitt
File "/usr/src/homeassistant/homeassistant/components/ecowitt/__init__.py", line 29, in async_setup_entry
Any ideas? I am quite a noob so don’t really know how to clean up errors.
That line just points to code that tries to register the new webhook internally, which then apparently fails without giving any reason.
Are there any other error messages in your log, maybe related to setting up webhooks?
This is where we have to ask questions like how you have HA installed.
Tell us how you installed Home Assistant
Tell us if you’re running Hass.io 199 using an official HassOS image, a Docker install, Hassbian, a venv install, and so on. Things that are often really useful to know include:
What version number of Home Assistant are you running?
How you installed it. If you’re not using Hassbian or a HassOS based
Hass.io 199 install, remember to tell us the operating system
Any relevant code - correctly formatted
For example:
Home Assistant 0.42.0 using Hass.io 199 with the HassOS image
Home Assistant 0.84.2 in a venv following this guide 13 on Windows 10
Home Assistant 0.90.2 using Hass.io 199 on Ubuntu 18.04 following this guide 23
Please remember that words like latest, current, newest and so on are not version numbers.
Thanks, I’m using the raspberry pi (4b) version of the Home assistant OS.
Version is 2022.9.1
I am stuck there and can’t upgrade further becasue of
[547453715456] Error updating Home Assistant Core 'HomeAssistantCore.update' blocked from execution, system is not healthy
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/hassio/update.py", line 299, in async_install
await async_update_core(self.hass, version=version, backup=backup)
File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 45, in _wrapper
raise HassioAPIError(data["message"])
homeassistant.components.hassio.handler.HassioAPIError: 'HomeAssistantCore.update' blocked from execution, system is not healthy
Assuming you didn’t change anything in the file system yourself I can’t help but wonder if this is an issue created by failing storage. Are you using an SD card? SD cards give a poorer user experience. I use an inexpensive SSD and a SATA adapter on most of my full size PI boards.
I would definitely make sure I created a backup. Save that backup and a couple of the earlier backups on a different device if you haven’t done so. I make sure the file size matches when manually downloading a backup. You can also open the backup with WinRAR, Winzip, or whatever you like to verify you downloaded the whole file. It may sound paranoid but I have had issues with partial downloads using the manual backup download interface.
hassip:8123//hassio/backups or Settings >> System >> Backups
Then I would consider creating a fresh install on a different storage device if possible. Use the backup to do a restore. I suspect that would eliminate the errors.
Thanks, I doubt its a hardware issue. I solved my upgrade issue
so am now finally running 2022.9.7.
I went and had a look at HACS and deleted a ecowitt repo there, restarted and tried again.
It still showed me webhook info which I entered on the phone app.
Nothing works.
There are a number of people with the same problem on the ecowitt github issues.
I think I will call it a day.
I might try mqtt one day but its not a high priority.