Fantastic Weather Plugin Bug Reports

Posted on
Sat Dec 15, 2018 10:42 am
forestfield offline
Posts: 83
Joined: Dec 29, 2014
Location: West Sussex

Re: Fantastic Weather Plugin Bug Reports

... and the reason the logging shows as an error was that I set isError=True in the longing to it stood out in the log file :-)

-- Paul --

Posted on
Sat Dec 15, 2018 10:48 am
forestfield offline
Posts: 83
Joined: Dec 29, 2014
Location: West Sussex

Re: Fantastic Weather Plugin Bug Reports

I've also noticed a lack of formatting in the Daily forecast device , in temperatureMax - and I think also in temperatureMin previously.

Copied from device state
temperatureMax = 8.699999999999999
Attachments
Screenshot 2018-12-15 at 16.46.51.png
TemperatureMax formatting...
Screenshot 2018-12-15 at 16.46.51.png (28.07 KiB) Viewed 4974 times

Posted on
Sat Dec 15, 2018 11:01 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Fantastic Weather Plugin Bug Reports

Yep. Looks like the data from Dark Sky is a bit hinky. I generated a new URL using rough coordinates for your area and used this script to get at the subject stuff:
Code: Select all
d = [the weather dict]  # <-- I ran the URL through Safari and pasted the data here.

for alert in d['alerts']:
    print(alert['description'])
This is what I got directly from Dark Sky (without the plugin in the middle):
Code: Select all
ain and strong winds across parts of Northern Ireland , south-west England and south Wales.

of freezing rain, with snow in Scotland later, leading to some dangerous travelling conditions.

of freezing rain, with snow in Scotland later, leading to some dangerous travelling conditions. Possible travel delays on roads stranding some vehicles and passengers. Possible delays or cancellations to rail and air travel. Some rural communities could become cut off. Power cuts may occur and other services, such as mobile phone coverage, may be affected. A chance of injuries from slips and falls on icy surfaces. Bus and train services may be delayed or cancelled, with some road closures and longer journey times possible. Untreated pavements and cycle paths might be impassable because of black icehone coverage, may be affected.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat Dec 15, 2018 11:10 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Fantastic Weather Plugin Bug Reports

forestfield wrote:
I've also noticed a lack of formatting in the Daily forecast device , in temperatureMax - and I think also in temperatureMin previously.

In this case, the value saved to the device state actually has two instances:

  1. The numeric device state value which is stored as a float. It's common for float values to be displayed in the Indigo UI this way (for reasons that I'm too stupid to be able to explain).
  2. The UI state value which is stored as a string, and used to display values on control pages, etc. This is the one that gets the formatting.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat Dec 15, 2018 11:38 am
forestfield offline
Posts: 83
Joined: Dec 29, 2014
Location: West Sussex

Re: Fantastic Weather Plugin Bug Reports

Thanks for the checking of the truncation; I might have a look to see if I can get the data elsewhere.

As regards the Min/Max temp - I can't see the UI formatted values exposed in the device states in the control page editor, or in the devices states. I can see the apparentTempMin/Max, but these are different value. Or am I missing something?

Thanks
-- Paul --

Posted on
Sat Dec 15, 2018 12:30 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Fantastic Weather Plugin Bug Reports

forestfield wrote:
Thanks for the checking of the truncation; I might have a look to see if I can get the data elsewhere.

As regards the Min/Max temp - I can't see the UI formatted values exposed in the device states in the control page editor, or in the devices states. I can see the apparentTempMin/Max, but these are different value. Or am I missing something?

Thanks
-- Paul --

Now that I look more closely, I'm not sure where the custom states you're showing come from. The plugin doesn't use any temperature min/max values because those have been deprecated in the DS API (although I think they're still being provided for the moment). Temperature and moon phase shouldn't be part of the same device -- moon phase is part of the astronomy device. The plugin doesn't have the apparent temperature min/max states:

Screen Shot 2018-12-15 at 12.16.46 PM.png
Screen Shot 2018-12-15 at 12.16.46 PM.png (19.51 KiB) Viewed 4935 times

In looking at your image more closely, there should be a bunch more (and different) states. I must admit I'm a bit confused. What version of the plugin are you using?

For the control page editor, you should have a bunch of things to choose from (this shows nearly all of the control page elements for the Daily Weather Device.):

Screen Shot 2018-12-15 at 12.27.46 PM.png
Screen Shot 2018-12-15 at 12.27.46 PM.png (112.24 KiB) Viewed 4935 times

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat Dec 15, 2018 12:48 pm
forestfield offline
Posts: 83
Joined: Dec 29, 2014
Location: West Sussex

Re: Fantastic Weather Plugin Bug Reports

Hi Dave,
I'm trying to deliberately confuse you...

The temperatureMin and temperatureMax are from a second dark sky plugin device; this is a daily forecast device.

The temperatureMin/Max here aren't being formatted - though they happen to be good now. When the temperatureMax device state shows as 8.9999999 here it also shows as 8.99999.. in the control page. That's how I noticed the issue in the first place, the temp looked like 8.999| - the 9| was itself cut in half vertically because the control page display field had a limited width.

For the moment I've resolved the display issue with a couple of triggers, a script and a variable to hold the formatted text. I have 1 trigger for changes to the min, and one for changes to the max; would a trigger on the 'ready' state work here?

Thanks again
-- Pau l--
Attachments
Screenshot 2018-12-15 at 18.37.23.png
daily forecast
Screenshot 2018-12-15 at 18.37.23.png (38.34 KiB) Viewed 4929 times

Posted on
Sat Dec 15, 2018 1:07 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Fantastic Weather Plugin Bug Reports

Yep, it's working.

I'm still confused. A Fantastic Weather Plugin daily weather device should have states that look like the following (Note the 'd01_xxxxx' state names):

Screen Shot 2018-12-15 at 1.01.45 PM.png
Screen Shot 2018-12-15 at 1.01.45 PM.png (30.7 KiB) Viewed 4914 times


Please do me a solid and run the following Python code against your server, replacing your device ID for mine, and post the results:

Code: Select all
dev = indigo.devices[733695023]
indigo.server.log(unicode(dev.pluginId))

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat Dec 15, 2018 1:34 pm
forestfield offline
Posts: 83
Joined: Dec 29, 2014
Location: West Sussex

Re: Fantastic Weather Plugin Bug Reports

Feck and @rse...

It's a cynical weather device - I managed to put FW in the device name so I assumed it was the fantastic weather one.

I'll now go away and eat humble pi. :( :( :(

-- Paul --

Posted on
Sat Dec 15, 2018 2:45 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Fantastic Weather Plugin Bug Reports

forestfield wrote:
It's a cynical weather device - I managed to put FW in the device name so I assumed it was the fantastic weather one.

No worries, mate.

If you want to inspect the device more closely (to see all its properties and states), just delete the .pluginId bit and log the entire device instance...
Code: Select all
dev = indigo.devices[733695023]
indigo.server.log(unicode(dev))

You will be able to see anything that has a UI state defined and its formatted output for control pages..
Code: Select all
...
     d01_ozone : 317.63 (real)
     d01_ozone.ui : 318  (string)
     d01_precipChance : 13 (real)
     d01_precipChance.ui : 13% (string)
     d01_precipIntensity : 0.0004 (real)
     d01_precipIntensity.ui : 0.00 in. (string)
     d01_precipTotal : 0.009600000000000001 (real)
     d01_precipTotal.ui : 0.01 in. (string)
     d01_precipType : rain (string)
     d01_pressure : 1020.37 (real)
     d01_pressure.ui : 1020 mb (string)
     d01_summary : Foggy in the morning. (string)
     d01_temperatureHigh : 42.73 (real)
     d01_temperatureHigh.ui : 43° (string)
     d01_temperatureLow : 26.89 (real)
     d01_temperatureLow.ui : 27° (string)
...

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun Dec 16, 2018 4:00 am
forestfield offline
Posts: 83
Joined: Dec 29, 2014
Location: West Sussex

Re: Fantastic Weather Plugin Bug Reports

Now I've got the right device (cough) things look a lot better!

:-)

Posted on
Sun Dec 16, 2018 5:03 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Fantastic Weather Plugin Bug Reports

Glad to hear it! If you have any questions or suggestions for improvements, let me know.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Jan 01, 2019 11:18 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Fantastic Weather Plugin Bug Reports

Sorry to hear that you're having trouble. If the plugin can't connect, it will retry every 30 seconds to try to "catch up" more quickly. It seems that your plugin got into a bad state and it may not have been able to recover without your intervention which is obviously a pain.

I checked my logs and the API didn't go offline for me today or yesterday (which should include any differences in our time zones), but that doesn't mean that your requests were necessarily being processed on the same Dark Sky servers. It also could be that your Internet access went down briefly--although the plugin should be able to survive that with no problem.

More concerning is that it appears that the plugin updated the last successful poll data (even though it wasn't successful) and not the next scheduled poll. I will have to take a look and build in some kind of trap to account for that (logically, it shouldn't happen--but clearly it did.)

I will look into this. Thanks for the report.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Thu Jan 03, 2019 9:32 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Fantastic Weather Plugin Bug Reports

lanbrown wrote:
Every 30 seconds it is trying to connect. I have the poll rate set for 5 minutes though; see attached. The other interesting bit is the last successful poll vs the next scheduled poll.

I have just posted an update to the plugin that should keep this condition from resurfacing. If the plugin is unable to contact the Dark Sky servers, it will continue to try and then (hopefully) recover gracefully once service is restored. It does this in the following way:

- Retry in 10 seconds [00:00:10]
- Retry in 20 seconds [00:00:30]
- Retry in 30 seconds [00:01:00]
- Retry in 40 seconds [00:01:40]
- Retry in 50 seconds [00:02:30]
- Retry in 60 seconds [00:03:30]
- Retry in 15 minutes [00:18:30]
- Retry in 15 minutes [00:33:30]

and then continue to retry in 15 minute intervals until it's able to reconnect.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Thu Jan 03, 2019 9:40 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Fantastic Weather Plugin Bug Reports

lanbrown wrote:
Just installed. I'll let you know if I run into any bugs.

Thanks. I should've mentioned that the next scheduled poll time within the plugin configuration dialog will not update during this process. That value will update once the plugin is able to connect.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Who is online

Users browsing this forum: No registered users and 2 guests