Virtual Rain Sensor

i find another refresh usually fixes it.

Yup that’s exactly what mine is doing as well. I just turned off my scene for now to wait and see if it fixed itself. Lol

Sent from my iPhone using Tapatalk

No more issues since my last post.

I am also happy to announce that version 3.0 has been submitted to the app store. It estimates the daily evapotranspiration and uses the sum to continually update the threshold. That way you will have a quantifiable amount matching your plants water needs and it will be easier to use throughout the seasons than manually updating the threshold periodically. Just set the coefficient for your plants water needs and the number of days you want to monitor. I have been using it for 8 months without any issues.

So be on the lookout for the new version once it is released. All the legacy features are still included so it should hopefully not affect any one negatively during the upgrade. If the upgrade does cause problems I apologize and the previous version 2.8 is still available in the app store to roll back.

I didn’t have any problems either after I posted. Lol. Awesome thanks for the new release!!

Sent from my iPhone using Tapatalk

I just checked out the updated plugin and see you added the ‘Low Temperature Cutoff’! That’s fantastic, thanks for doing that!

I love what you’ve done here but I have an issue I hope you can help me with: the rain data in the Virtual Rain Sensor device isn’t matching the data from Weather Underground for my PWS. Right now it is correct for the current day, May 8th, 2015, showing 0.17 inches, but shows zeros for the two previous days, where it should show 0.43 inches for May 7th and 0.01 inches for May 6th. Here is the Weather Underground page showing the 0.43 inches for May 7th: [url=http://www.wunderground.com/personal-weather-station/dashboard?ID=KCODENVE131#history/s20150507/e20150507/mdaily]http://www.wunderground.com/personal-weather-station/dashboard?ID=KCODENVE131#history/s20150507/e20150507/mdaily[/url]. Here is a JSON API query that contains the same data: [url=http://api.wunderground.com/api/473688002950f03b/history_20150507/q/pws:KCODENVE131.json]http://api.wunderground.com/api/473688002950f03b/history_20150507/q/pws:KCODENVE131.json[/url]. Both the PWS and the Vera are at the same location in the same timezone. I’m on version 3.0 of your plugin and there are no visible errors anywhere.

Any ideas?

----- Update ------

I think I’ve identified the problem. For a PWS you use the nodes in the WeatherUnderground XML response document to determine historical precipitation totals using a regular expression:

precipTotalRegExp = “.*<precip_totali>(.-)</precip_totali>”

However, the last observation for my PWS of every day from Weather Underground is at 11:59 local time and that observation resets the value of precip_totali to zero. I am uploading weather (via Cumulus) from my PWS at 15 minute intervals and although my clock is internet synchronized, it appears that a tiny variation between my time and WeatherUnderground time is enough for this to happen - it is a weakness in the WeatherUnderground API, or it is a bug in Cumulus. I am going to change my upload frequency to 14 minute intervals on the theory that the last observation will be sent at 11:56pm and will be correct for the proceeding day. I’m also going to update my computer’s clock daily rather than weekly. I’ll modify this post if I am correct.

----- Update -----

Changing the upload frequency to 14 minutes fixed the issue; the last observation of every day is now accurate.

No problem, hope all is still working well for those still using the plugin.

Never would have thought I would see my rain sensor in the double digits, but I did yesterday. I posted a screen shot. Surprising how much rain we got. I’d still rather have the rain and flooding over the tornadoes.

Hi, all, this is my first post to the forum. I have used Virtual Rain Sensor for several months now and LOVE it. However, recently I can no longer access the “Settings” tab (for example, to change the source for the weather information). I get an error from VERA saying:

Error executing function settings(): displayUnitsChanged is not defined

I am on version 3.0 of the Virtual Rain Sensor app and 1.7.583 of Vera (running on a vera Lite).

Thanks in advance for any insight.

Is there anyway to know if the station a I am looking at is down? Or even better, is there a way to auto switch between the three stations in my area to keep me attached to a “live” one.

Regards,

[quote=“wmichael3, post:106, topic:180668”]I love what you’ve done here but I have an issue I hope you can help me with: the rain data in the Virtual Rain Sensor device isn’t matching the data from Weather Underground for my PWS. Right now it is correct for the current day, May 8th, 2015, showing 0.17 inches, but shows zeros for the two previous days, where it should show 0.43 inches for May 7th and 0.01 inches for May 6th. Here is the Weather Underground page showing the 0.43 inches for May 7th: [url=http://www.wunderground.com/personal-weather-station/dashboard?ID=KCODENVE131#history/s20150507/e20150507/mdaily]http://www.wunderground.com/personal-weather-station/dashboard?ID=KCODENVE131#history/s20150507/e20150507/mdaily[/url]. Here is a JSON API query that contains the same data: [url=http://api.wunderground.com/api/473688002950f03b/history_20150507/q/pws:KCODENVE131.json]http://api.wunderground.com/api/473688002950f03b/history_20150507/q/pws:KCODENVE131.json[/url]. Both the PWS and the Vera are at the same location in the same timezone. I’m on version 3.0 of your plugin and there are no visible errors anywhere.

Any ideas?

----- Update ------

I think I’ve identified the problem. For a PWS you use the nodes in the WeatherUnderground XML response document to determine historical precipitation totals using a regular expression:

precipTotalRegExp = “.*<precip_totali>(.-)</precip_totali>”

However, the last observation for my PWS of every day from Weather Underground is at 11:59 local time and that observation resets the value of precip_totali to zero. I am uploading weather (via Cumulus) from my PWS at 15 minute intervals and although my clock is internet synchronized, it appears that a tiny variation between my time and WeatherUnderground time is enough for this to happen - it is a weakness in the WeatherUnderground API, or it is a bug in Cumulus. I am going to change my upload frequency to 14 minute intervals on the theory that the last observation will be sent at 11:56pm and will be correct for the proceeding day. I’m also going to update my computer’s clock daily rather than weekly. I’ll modify this post if I am correct.[/quote]

I am sorry I missed your post somehow but it looks like you got it working. I encountered several personal weather stations that had this bug where the last observation of the day would be zero. I thought about putting in code to read the max observation of the day, but when 99% report the highest as the last observation it just made sense to use that value.

[quote=“WS, post:108, topic:180668”]Hi, all, this is my first post to the forum. I have used Virtual Rain Sensor for several months now and LOVE it. However, recently I can no longer access the “Settings” tab (for example, to change the source for the weather information). I get an error from VERA saying:

Error executing function settings(): displayUnitsChanged is not defined

I am on version 3.0 of the Virtual Rain Sensor app and 1.7.583 of Vera (running on a vera Lite).

Thanks in advance for any insight.[/quote]

I am not sure why it would give you that error. It sounds like a java script error from the browser. What browser are you using? Have you tried accessing it from a different browser like IE, Chrome or Firefox? I would try to uninstall the app the then reinstall it. Hopefully that will overwrite the file incase it got corrupted.

[quote=“pepe6859, post:109, topic:180668”]Is there anyway to know if the station a I am looking at is down? Or even better, is there a way to auto switch between the three stations in my area to keep me attached to a “live” one.

Regards,[/quote]

When you set your location as “PWS:myfavoritepws” it will only use that site even if it is down. I believe it is the same with airport codes as well. If you put in the exact “lat,long” of your location then the weather underground API will return the nearest online station. This is how mine is set. I occasionally see it switch to another site when I am reviewing the data tab.

[quote=“blakem, post:110, topic:180668”][quote=“wmichael3, post:106, topic:180668”]I love what you’ve done here but I have an issue I hope you can help me with: the rain data in the Virtual Rain Sensor device isn’t matching the data from Weather Underground for my PWS. Right now it is correct for the current day, May 8th, 2015, showing 0.17 inches, but shows zeros for the two previous days, where it should show 0.43 inches for May 7th and 0.01 inches for May 6th. Here is the Weather Underground page showing the 0.43 inches for May 7th: [url=http://www.wunderground.com/personal-weather-station/dashboard?ID=KCODENVE131#history/s20150507/e20150507/mdaily]http://www.wunderground.com/personal-weather-station/dashboard?ID=KCODENVE131#history/s20150507/e20150507/mdaily[/url]. Here is a JSON API query that contains the same data: [url=http://api.wunderground.com/api/473688002950f03b/history_20150507/q/pws:KCODENVE131.json]http://api.wunderground.com/api/473688002950f03b/history_20150507/q/pws:KCODENVE131.json[/url]. Both the PWS and the Vera are at the same location in the same timezone. I’m on version 3.0 of your plugin and there are no visible errors anywhere.

Any ideas?

----- Update ------

I think I’ve identified the problem. For a PWS you use the nodes in the WeatherUnderground XML response document to determine historical precipitation totals using a regular expression:

precipTotalRegExp = “.*<precip_totali>(.-)</precip_totali>”

However, the last observation for my PWS of every day from Weather Underground is at 11:59 local time and that observation resets the value of precip_totali to zero. I am uploading weather (via Cumulus) from my PWS at 15 minute intervals and although my clock is internet synchronized, it appears that a tiny variation between my time and WeatherUnderground time is enough for this to happen - it is a weakness in the WeatherUnderground API, or it is a bug in Cumulus. I am going to change my upload frequency to 14 minute intervals on the theory that the last observation will be sent at 11:56pm and will be correct for the proceeding day. I’m also going to update my computer’s clock daily rather than weekly. I’ll modify this post if I am correct.[/quote]

I am sorry I missed your post somehow but it looks like you got it working. I encountered several personal weather stations that had this bug where the last observation of the day would be zero. I thought about putting in code to read the max observation of the day, but when 99% report the highest as the last observation it just made sense to use that value.

[quote=“WS, post:108, topic:180668”]Hi, all, this is my first post to the forum. I have used Virtual Rain Sensor for several months now and LOVE it. However, recently I can no longer access the “Settings” tab (for example, to change the source for the weather information). I get an error from VERA saying:

Error executing function settings(): displayUnitsChanged is not defined

I am on version 3.0 of the Virtual Rain Sensor app and 1.7.583 of Vera (running on a vera Lite).

Thanks in advance for any insight.[/quote]

I am not sure why it would give you that error. It sounds like a java script error from the browser. What browser are you using? Have you tried accessing it from a different browser like IE, Chrome or Firefox? I would try to uninstall the app the then reinstall it. Hopefully that will overwrite the file incase it got corrupted.

[quote=“pepe6859, post:109, topic:180668”]Is there anyway to know if the station a I am looking at is down? Or even better, is there a way to auto switch between the three stations in my area to keep me attached to a “live” one.

Regards,[/quote]

When you set your location as “PWS:myfavoritepws” it will only use that site even if it is down. I believe it is the same with airport codes as well. If you put in the exact “lat,long” of your location then the weather underground API will return the nearest online station. This is how mine is set. I occasionally see it switch to another site when I am reviewing the data tab.[/quote]

That makes a lot of sense!!! Will give a try immediately, Thanks a lot!!! Fantastic!!!

Like WS posted above, now I am receiving this message “Error executing function settings(): ‘displayUnitsChanged’ is undefined” when trying to enter in SETTINGS. I erased the API and reinstaled back as well weather API. Not success. The rain sensor is working but not threshold can be given.

I used Firefox and Chrome from OSX - Chrome and IE from windows. No one worked.

Firmware v 1.7.541 on VeraLite

[quote=“pepe6859, post:112, topic:180668”]Like WS posted above, now I am receiving this message “Error executing function settings(): ‘displayUnitsChanged’ is undefined” when trying to enter in SETTINGS. I erased the API and reinstaled back as well weather API. Not success. The rain sensor is working but not threshold can be given.

I used Firefox and Chrome from OSX - Chrome and IE from windows. No one worked.

Firmware v 1.7.541 on VeraLite[/quote]

I published a new version 3.1 that has an updated java script file. Basically I just removed the call to the missing function. I hope that fixes it. It was left over from an older version and I must have overlooked it. Odd that there is no errors with UI5. Since I do not have UI7 someone else will have to install it and verify that it fixes it.

[quote=“blakem”][quote=“pepe6859, post:112, topic:180668”]Like WS posted above, now I am receiving this message “Error executing function settings(): ‘displayUnitsChanged’ is undefined” when trying to enter in SETTINGS. I erased the API and reinstaled back as well weather API. Not success. The rain sensor is working but not threshold can be given.

I used Firefox and Chrome from OSX - Chrome and IE from windows. No one worked.

Firmware v 1.7.541 on VeraLite[/quote]

I published a new version 3.1 that has an updated java script file. Basically I just removed the call to the missing function. I hope that fixes it. It was left over from an older version and I must have overlooked it. Odd that there is no errors with UI5. Since I do not have UI7 someone else will have to install it and verify that it fixes it.[/quote]

Yes!!! Fixed and back in service. Thank you!!!

Nice work blakem, very useful app I’ve been using since long time to cut my irrigation system with vera, saving tons of water!!!

Sent from my iPhone using Tapatalk

Works great now! Thanks for making the change. The app is fantastic and so is the support.

Would it be possible to make the icon work for UI7?

Edit: I did it myself. Maybe blakem can can add it to the D_VRainSensor1.json file: I just modified the header as follows

[code]{
“flashicon”: “icon/VRainSensor.png”,
“default_icon”: “VRainSensor.png”,
“imgIconBody”: “”,
“imgIconDimmable”: “”,
“imgIconTurnable”: “”,
“imgIconMin”: “”,
“imgIconMax”: “”,
“halloIconsDir”: “pics/hallo”,
“x”: “2”,
“y”: “3”,
“state_icons”: [

{
        "img": "VRainSensor_0.png",
        "conditions": [
            {
                "service": "urn:micasaverde-com:serviceId:SecuritySensor1",
                "variable": "Tripped",
                "operator": "==",
                "value": "0",
            }
        ]
    },
    {
        "img": "VRainSensor_100.png",
        "conditions": [
            {
                "service": "urn:micasaverde-com:serviceId:SecuritySensor1",
                "variable": "Tripped",
                "operator": "==",
                "value": "1",
            }
        ]
    }
],

[/code]

We then need to move the 3 icon files to the www/cmh/default/img/devices/device_states/ and voila!

So I’m getting this error at the top of my dashboard on UI7. “VRainSensor: Error, observation precip section not found in history data”. Can anyone tell me what it means and how to fix it?

Here too.

Both of you, On the data tab what station does it show in the lower right corner? You can also look under the advanced tab for stationid. I can look it up to see what data the api returns. I feel the problem is probably with the api or that particular station but would like to investigate it. Sorry for the delay. I never got an update notification.

My station ID is KUTHYDEP3 
 The message has cleared itself already though. Is this message saying that it is just having trouble getting info from the API?