[UPDATED] Weewx Weather Driver With External Forecasting

Glad you figured this all out. Sorry for the misdirection. I should stop myself from those early morning replies. Honestly the Weewx setup was such a pain for me. Was completely elated when I got it working, but like so many, it's an experience I just want to put behind me :wink:. I spent so many late nights/early mornings doing the same thing you're doing, even with Andy's image, I had done something wrong (which I also cannot remember) and it was just such a pain to get going.

I now just have an image setup and will just re-image when needed. I actually did a really stupid thing and didn't record the admin password I changed. So now I can get into it to change anything :joy: There's a way to reset passwords, but because I'm working with a Pi Zero W, the procedure kills the WiFi and then I can't login! :rofl:

The Google Group can be a helpful resource too (sort of), because they know Weewx so well. Just some of their replies I found a bit hard to follow and really specific to their particular setup.

I should re-write the install instructions for Andy.

As for resetting the root password on PI is simple. Mount the sd card in windows or linux and edit the file /etc/shadow

First line is root
Edit to something like this
root::17567:0:99999:7:::

What you want to get rid of is the part in the first ::

So if yours is something like this.......

root:$6$YCrtvntR:17567:0:99999:7:::
You want to remove $6$YCrtvntR

1 Like

I thought the install instructions for the driver were sufficient :slight_smile:
That’s all I created/support :wink:

lol ok but I got a feeling that's going to change on Jan 1, 2019

Most probably..
I will probably have to rewrite the api calls for the forecast data.

I’ll look in the new year.

Andy

I looked at the new API and it's just not worth it. IBM has nearly crippled weather API data.

I am stopping data to them on Dec. 31, 2018 because of their fuckery.

1 Like

I only need a couple of bits of forecast data.
Everything else comes from my pws.

Thanks. Will try this method after the holidays.

How does the APIXU set its location ? If I go to their website and use my zip code it gices me 3 locations to choose from. How do I set the closest to me ?

never mind

3 Likes

nothing to see here...

1 Like

@Cobra Are you going to add this code to the current branch at github ?

Not in it’s current form no.

Andy

I tried adding your code but when I go to the dashboard to add the tile it hangs.

So maybe you need to also add what's before line 1310 so we know...

The section before 1310 is......

// // Send Events - WITHOUT UNITS ****************************************************************************************

And after 1310 has.....

// Weather Summary *****************************************************************************************************

I didn't have any hang ups with this code/driver but I started working on a different set of stats for a different type of tile and did have some hang ups with that one. It did have more data but very surprised that this is an issue, it's just static text. I'll throw together a post, maybe someone can shed some light on it.

Doesn't work for me. Hangs my browser and can't do anything while adding the tile in the dashboard.

Add any type of tile to the dashboard, just to get a tile on the dashboard. Then edit the tile to use the myWeather attribute. Works great! BTW, I updated my code above.

Hope this helps.

This only contains weewx data?
No forecast data?

How about this?

image

Or a custom version:

image

The top line is freeform text the subsequent lines are selectable attribute combinations
The font weight and colour are selectable for both the 'standard' and 'custom' output.

1 Like

BTW @bptworld
The reason you are having stability issues it because you dumped your code in the middle of a try/catch/response routine.

Just testing a properly coded version now.
Will release it soon.

Driver Version: 2.8.0

Some people have requested that I add ‘myTile’ code to this driver.

As always, I had to try and make it better
(Rather than just hack someone else’s code in somewhere)

So, I have created a new attribute for the driver ‘WeatherDisplay’ and setup a ‘standard’, default output so you can quickly add this data to a dashboard tile.

There is now a new switch displayed in the driver:
image

Once this is enabled and the device is saved (to refresh the display) a few new bits appear :slight_smile:

image

Even with the default dashboard you are able to select the font weight as shown above and also the colour of the font (entered as above in hex format – no need for a ‘#’ at the beginning)

The settings, as displayed, will give you a ‘standard’ output that looks like this
(on a blue background)
image
Yellow, italic text.

(This is a 1x1 tile but pictured on a big screen so you may have to set the tile to a different size)

One thing you may have noticed after tuning on the 'Weather Dashboard Summary’ switch is an additional switch: ‘Custom Weather Dashboard Summary’

Try turning this on then saving the preferences again.

When you come back to the driver… it should look like this at the bottom of the ‘Preferences’ section:
image
You now have 8 lines that you can populate with attributes from the driver.

You can also add any line of text. (when selecting 'Free Text’ and saving, a box will appear for you to enter your text.)

Each of the 8 lines has a ‘drop-down’ list of the attributes that you can populate the line with
image

This is how I’ve set my example:
image

And it looks like this:
image

Anyway,

Try the update and have a play :slight_smile:

One thing to note:

After installation & configuration, please hit the ‘poll’ button to populate the attribute before creating your tile.
You can create the tile using the attribute: WeatherDisplay

Please let me know if you have any issues or find any bugs as this has only been tested by a couple of people and we may have missed something.
Also, I have not had any issues creating the tile etc with this driver but if you do, then please let me know about that too.

Andy

1 Like