Problem with WeatherSnoop 2.2.6

User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Problem with WeatherSnoop 2.2.6

Post by jay (support) »

Boisy, I think there's another bug: when there is no rain you insert "0.0" as the value in millimeters - but of course there aren't fractional millimeters (at least I don't believe you present them in WS if there are)... ;)
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
MountainEars
Posts: 175
Joined: Tue Oct 19, 2010 10:27 pm
Location: Georgetown, CA
Contact:

Re: Problem with WeatherSnoop 2.2.6

Post by MountainEars »

Here's the error I get on startup by the way. The other errors I posted seem to come at a regular polling frequency.

WeatherSnoop Error exception in deviceStartComm(MountainEars Weather): invalid literal for int() with base 10: '0.0'
WeatherSnoop Error exception in deviceStartComm(MountainEars Weather): invalid literal for int() with base 10: '0.0'
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Problem with WeatherSnoop 2.2.6

Post by jay (support) »

Yep - that's the bug I reported to Boisy above.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
boisy
Posts: 281
Joined: Tue Jun 25, 2013 12:43 pm

Re: Problem with WeatherSnoop 2.2.6

Post by boisy »

Jay,

I looked and that change is intentional. There was a need to recognize fractional numbers for metric units.

The plug-in should be able to handle floating point numbers, right? I'm a bit surprised this broke something.
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Problem with WeatherSnoop 2.2.6

Post by jay (support) »

Well, because the XML is fundamentally a string, we have to cast the various data elements to the appropriate type. Trying to cast the string "0.0" to an int() in Python throws an error (since the appropriate type would be float). Fractional millimeters is useful how?

The problem is this: if people are expecting that field to be an integer in their HA logic, then changing it now would break it. This is akin to your other change that renamed fields - changing data types is potentially just as disruptive as changing field names.

I can fix this in the next release of the plugin by casting to a float then casting it to an int so it won't break anyone's existing logic but it's going to have to wait for the next release which is likely a ways out.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
boisy
Posts: 281
Joined: Tue Jun 25, 2013 12:43 pm

Re: Problem with WeatherSnoop 2.2.6

Post by boisy »

Running git blame shows this changed in August 2013, but it only made it into WS2 because of the recent builds (WS2 and WS3 share a lot of common code).

We received a change request from a user who wanted to receive fractional rain reports in metric (as minute as that sounds). We checked and determined that making the metric number's formatter fractional would have a minimal risk.

Obviously we didn't think we would be breaking the Indigo plug-in. Part of that is my total ignorance of how Indigo plug-ins work.

I apologize to customers for this unforeseen change and its consequences.
MountainEars
Posts: 175
Joined: Tue Oct 19, 2010 10:27 pm
Location: Georgetown, CA
Contact:

Re: Problem with WeatherSnoop 2.2.6

Post by MountainEars »

Does this mean I'm broken then for that interface until this is updated? That's OK, I guess, just want to make sure that this integer change is really what is causing this to not work after I moved to the new computer and newer version.

Ken
User avatar
boisy
Posts: 281
Joined: Tue Jun 25, 2013 12:43 pm

Re: Problem with WeatherSnoop 2.2.6

Post by boisy »

Ken,

You can move to an older version of WS2 until this is resolved in the plug-in.

All the older versions are here: http://www.weathersnoop.com/WeatherSnoopAppcast.xml
MountainEars
Posts: 175
Joined: Tue Oct 19, 2010 10:27 pm
Location: Georgetown, CA
Contact:

Re: Problem with WeatherSnoop 2.2.6

Post by MountainEars »

Boisy had me go to that version from what I was on when I migrated to Mavericks. Boisy, we were talking about that on the thread on your forums, should I downgrade, and if so, to what version would be safe?
User avatar
boisy
Posts: 281
Joined: Tue Jun 25, 2013 12:43 pm

Re: Problem with WeatherSnoop 2.2.6

Post by boisy »

Try 2.2.6 or if that still exhibits the problem with the plug-in, 2.2.5. Both will work under Mavericks, but the "Check for Updates..." feature will crash, so don't use that menu option.
MountainEars
Posts: 175
Joined: Tue Oct 19, 2010 10:27 pm
Location: Georgetown, CA
Contact:

Re: Problem with WeatherSnoop 2.2.6

Post by MountainEars »

Looks like 2.2.5 is the one that doesn't show that error. It did take me having to reload the plugin though before it would show any data, for a minute I thought it still wasn't working but gave that a shot. I haven't gone back to the later versions, maybe it would work for pulling the data, just show that error. Not sure at this point, but 2.2.5 seems to be working and having fewer errors in the event log is a good thing so I'll stay here.

Thanks for the help, maybe let me know by this post when things are updated so I can go to the later version.

Ken
Post Reply

Return to “WeatherSnoop”