Page 2 of 2

Re: Problem with WeatherSnoop 2.2.6

PostPosted: Fri May 30, 2014 10:11 am
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)... ;)

Re: Problem with WeatherSnoop 2.2.6

PostPosted: Fri May 30, 2014 10:54 am
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'

Re: Problem with WeatherSnoop 2.2.6

PostPosted: Fri May 30, 2014 11:18 am
by jay (support)
Yep - that's the bug I reported to Boisy above.

Re: Problem with WeatherSnoop 2.2.6

PostPosted: Fri May 30, 2014 12:04 pm
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.

Re: Problem with WeatherSnoop 2.2.6

PostPosted: Fri May 30, 2014 12:35 pm
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.

Re: Problem with WeatherSnoop 2.2.6

PostPosted: Fri May 30, 2014 1:03 pm
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.

Re: Problem with WeatherSnoop 2.2.6

PostPosted: Fri May 30, 2014 4:02 pm
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

Re: Problem with WeatherSnoop 2.2.6

PostPosted: Fri May 30, 2014 4:07 pm
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

Re: Problem with WeatherSnoop 2.2.6

PostPosted: Fri May 30, 2014 4:12 pm
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?

Re: Problem with WeatherSnoop 2.2.6

PostPosted: Sat May 31, 2014 7:22 am
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.

Re: Problem with WeatherSnoop 2.2.6

PostPosted: Sun Jun 01, 2014 8:37 am
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