Hi I’m getting following errors. I tried this on v0.91.0 and v0.93.1 but the result is the same. Could it be that there is no access to ftp.bom.gov.au? Any help would be much appreciated.
Blockquote
Mon May 20 2019 22:27:30 GMT+0800 (Australian Western Standard Time)
Error while setting up platform bom_forecast
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py”, line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 416, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/bom_forecast/sensor.py”, line 241, in setup_platform
bom_forecast_data.update()
File “/usr/local/lib/python3.7/site-packages/homeassistant/util/init.py”, line 224, in wrapper
result = method(*args, **kwargs)
File “/config/custom_components/bom_forecast/sensor.py”, line 418, in update
ftp = ftplib.FTP(‘ftp.bom.gov.au’)
File “/usr/local/lib/python3.7/ftplib.py”, line 117, in init
self.connect(host)
File “/usr/local/lib/python3.7/ftplib.py”, line 152, in connect
source_address=self.source_address)
File “/usr/local/lib/python3.7/socket.py”, line 707, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File “/usr/local/lib/python3.7/socket.py”, line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again
I can ping it but I get " ftp.bom.gov.au refused to connect." when I try to connect. I tried to connect from two different locations but the result is the same.
2019-05-22 08:17:34 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform bom_forecast
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/bom_forecast/sensor.py", line 241, in setup_platform
bom_forecast_data.update()
File "/usr/local/lib/python3.7/site-packages/homeassistant/util/__init__.py", line 224, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/bom_forecast/sensor.py", line 421, in update
ftp.retrbinary('RETR ' + self._product_id + '.xml', file_obj.write)
File "/usr/local/lib/python3.7/ftplib.py", line 442, in retrbinary
with self.transfercmd(cmd, rest) as conn:
File "/usr/local/lib/python3.7/ftplib.py", line 399, in transfercmd
return self.ntransfercmd(cmd, rest)[0]
File "/usr/local/lib/python3.7/ftplib.py", line 365, in ntransfercmd
resp = self.sendcmd(cmd)
File "/usr/local/lib/python3.7/ftplib.py", line 273, in sendcmd
return self.getresp()
File "/usr/local/lib/python3.7/ftplib.py", line 246, in getresp
raise error_perm(resp)
ftplib.error_perm: 550 Failed to open file.
So I set this up yesterday for the first time and it works perfectly. There was an addition of some files and a new script 7 days ago. Did you get the latest versions of this component?
yes I did, and followed the README.md and did a copy/paste without changing anything on the code just to be sure not to mess anything up before I change my location in Perth.
Don’t be, the mistake was mine. Don’t know how I arrived at the wrong product ID. RTFM comes to mind!!
I changed the product in config yaml, rebooted and observed this in the log:
You are using a custom integration for bom_forecast which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
So it must be working OK. Now to figure out the how to configure the front end.
Thanks for your good work and for taking the time to reply to my post. Both are appreciated.
Hey mate, nice layout. I’m looking to do something similar. How did you astronomical data? I can see the sun data via the badge, but I don’t know how to display the attributes (like next_rising, next_setting and so on).