Australian Weather Forecast using BOM Public FTP

I have custom components that have no manifest. I believe from reading the dev docs this is only for core components… Other custom components are working fine without the manifest and personally I’d rather wait for the developer to comment on the issue instead of making changes that might have other unintended consequences.

it has been clarified that its is not a requirement for custom components to have a manifest.json
The documentation will be updated shortly.
There is however a requirement to have an emtpy __init__.py file for all custom components

Pretty much 1 out of every 2 restarts I get this problem:

2019-04-26 05:54:44 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 251, 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 437, 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

@ BrendanMoran have you got some ideas on how to solve this problem?

I’ve tried the __init__.py and manifest.json but I’m getting the same errors as everyone else. The old “Integration bom_forecast not found when trying to verify its sensor platform.” error

I’ve moved your script into /config/custom_components/sensor/bom_forecast and in that folder are:

  1. bom_forecast.py
  2. __init__.py (which is empty)
  3. manifest.json

My manifest.json file looks like this:

    {
      "domain": "bom_forecast",
      "name": "BOM Forecast",
      "documentation": "https://github.com/bremor/bom_forecast",
      "dependencies": [],
      "codeowners": [],
      "requirements": []
    }

Thanks in advance :grinning:

1 Like

Rename the file bom_forecast.py to sensor.py. Rename the folder files are in to bom_forecast.

That and the manifest file you have already should solve your problem.

3 Likes

Thanks! That fixed it.

So, I did this:

  1. Moved the files to /config/custom_components/bom_forecast

  2. Renamed bom_forecast.py to sensor.py

  3. Created __init__.py (which is empty)

  4. Created manifest.json like it is listed below

    {
      "domain": "bom_forecast",
      "name": "BOM Forecast",
      "documentation": "https://github.com/bremor/bom_forecast",
      "dependencies": [],
      "codeowners": [],
      "requirements": []
    }

And the sensor is working again. Thanks @tom_l :grinning:

5 Likes

No problem. Note that this was a fairly major breaking change last update (0.91.0) “the great migration” and you will have to do this for all your custom components: https://www.home-assistant.io/blog/2019/04/03/release-91/#notable-breaking-change

1 Like

BOM radar camera is out! Hell yeah!

1 Like

It seems to be a bit picky with the radar ids you can use. No problem with the 128km radar ids but the 512km composites return only a black image (the id, frames and delta were correct). The old custom component did not have this issue.

I didn’t even know there was a custom component! I would have been straight on to it…

Confirm these steps fixed mine too. Ta.

Mine is working fine with both the name (Melbourne) and id (for the 64km close up).

Try it with the 512km radar for Melbourne (ID ‘021’). Make sure you include the quotes around the id number. That’s important, particularly for IDs with leading 0s.

Confirm 512km radar for Melbourne (ID ‘021’) no-worky with:

- platform: bom
  id: '021'
  delta: 360
  frames: 6
  name: 'Radar 512'
1 Like

Adding your experience here would be appreciated:

No Prob. Done.

1 Like

Mucking around with some macro/micro radar combinations to go on my permanent display. Working well. The animated dark sky card uses the bom forecast as per an earlier thread. I made it compact, cause I found I didn’t really look at the other stuff.

Is this the right thread for this? Just point me elsewhere if there’s a better BoM radar one…

Something like this in lovelace.

- elements:
    - camera_image: camera.radar_256
      entity: camera.radar_256
      style:
        font-weight: bold
        height: 40%
        left: 20%
        top: 20%
        width: 40%
      type: image
  camera_image: camera.radar_64
  type: picture-elements

Sorry for the abandonware everybody, wish I had time to worry about this but I’m sure you can all figure out this new custom component re-jig.

3 Likes

@Mahko_Mahko The old thread was here: Australian Animated Radar using BOM Public FTP Though now it is a built in component might be worth stating a new one.

@BrendanMoran Creating a custom component isn’t just for Christmas :slight_smile: :dog2:

But seriously, its all working with the “great migration” and manifest instructions.

Lodged an issue fort the New camera though.

1 Like

The manifest instructions only apply to inbuilt components - not custom components…