Author Topic: Weather Plugin  (Read 72701 times)

agoodman82

  • Jr. Member
  • **
  • Posts: 81
Re: Weather Plugin
« Reply #330 on: May 04, 2012, 05:45:11 am »
Hi all,

I'm completely new to Vera and just got a Vera Lite. So far, the only z-wave device I have added to my z-wave network is a Trane thermostat, which works great.

Anyway, I installed the weather app, and scattered in various categories on my 'devices' section of my vera web portal (sensors, climate & others) I have the 5 embedded weather readouts from the weather app (current temp, low temp, high temp, humidity & current conditions). Is there a way to consolidate the 5 weather stats under one sub-category (I'd like them all under "climate"). Also, I am using the full version of the iVera app on my iPhone, which also isn't displaying all of the plugin's weather stats. Is there any way to modify the app stats to show up on the mobile iVera app? Thanks... I've got a lot of learning to do with this advanced system lol.

guessed

  • Master Member
  • *******
  • Posts: 3948
  • Vera 3, UI-Broken#5
Re: Weather Plugin
« Reply #331 on: May 04, 2012, 05:52:13 am »
In the Device dialog, under the Advanced Tab, you can manually change the Category_Num field to match the one you want, then it'll be put into a different bucket in the UI,

agoodman82

  • Jr. Member
  • **
  • Posts: 81
Re: Weather Plugin
« Reply #332 on: May 06, 2012, 04:43:05 pm »
Thanks guessed. I guess I'll pick up plenty of things as I go along. These forums are very helpful.

resq93

  • Full Member
  • ***
  • Posts: 118
Re: Weather Plugin
« Reply #333 on: May 17, 2012, 07:10:37 am »
I have the following as a LUUP on a trigger for a scene that turns on the A/C

Quote
local t = os.date('*t')
local dayOfWeek = t.wday
away = luup.variable_get("urn:upnp-org:serviceId:VSwitch1","Status",19)
outside = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", 5)


if (away=="0") and (t.hour > 7) and (t.hour < 18) and (outside > 60) then

return true
else
return false
end


Right now my outside temp per the plugin is only 55 and yet this trigger turned the A/C on anyway - is something wrong with my code?


---Update---

I think i fixed it - the temp value needs to be in quotes -
Quote
and (outside > "60") then
« Last Edit: May 17, 2012, 07:35:01 am by resq93 »

capjay

  • Sr. Member
  • ****
  • Posts: 386
Re: Weather Plugin
« Reply #334 on: May 17, 2012, 08:27:29 am »
I think i fixed it - the temp value needs to be in quotes - and (outside > "60") then

you are comparing a string to another, which is wrong (because, for example "100" < "60"), you should convert the value into an integer:

Code: [Select]
if (away=="0") and (t.hour > 7) and (t.hour < 18) and (tonumber(outside) > 60) then
...

resq93

  • Full Member
  • ***
  • Posts: 118
Re: Weather Plugin
« Reply #335 on: May 17, 2012, 08:37:25 am »
Thank you. I will make the changes.

m

HakanSoderbom

  • Newbie
  • *
  • Posts: 8
Re: Weather Plugin
« Reply #336 on: July 01, 2012, 03:32:25 pm »
Struggling with getting the Weather Plugin to work and looking for any advice. I have it working on one installation (Vera Light, f/w 1.5.346) however on my second installation (also Vera Light, f/w 1.5.346) it wont configure. The installation that is working is local. The installation that is causing me grief is remote.

The z-wave units on the problematic installation are all Jasco light switches and wall receptacles with the exception of one EZmotion 3-in-1 sensor. Since that has a thermometer I figured there may be a conflict, but even after uninstalling it, Vera still throws the same error.

See the two images for the error messages. I have tried the proverbial "everything" however I am at a loss.

Any ideas what I should try?

mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
Re: Weather Plugin
« Reply #337 on: July 02, 2012, 02:00:34 am »
@HakanSoderbom

What plugin version do you have? Have you selected a location in Setup >> Location >> Longitude/Latitude?

HakanSoderbom

  • Newbie
  • *
  • Posts: 8
Re: Weather Plugin
« Reply #338 on: July 13, 2012, 09:46:03 pm »
As seen in the screenshot, when I try to enter a value for metric/US or location I get a "device not ready" error.

Brientim

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1133
Re: Weather Plugin
« Reply #339 on: July 13, 2012, 11:55:53 pm »
As seen in the screenshot, when I try to enter a value for metric/US or location I get a "device not ready" error.

Try manually configuring in the Advanced Tab. After changes are made, click either Save or Reload in the top right of your browser.
device_file = D_Weather.xml
impl_file = I_GoogleWeather.xml

Metric = 1 for metric or 0 for US Units

HakanSoderbom

  • Newbie
  • *
  • Posts: 8
Re: Weather Plugin
« Reply #340 on: July 15, 2012, 05:21:23 pm »
Thanks for the ideas!

The device_file = D_Weather.xml and impl_file = I_GoogleWeather.xml were already set after the installation. I managed to set the Metric and Location variables manually, but it doesn't solve the problem.

The first image shows that I was able to set the Location and Metric variables, but it also shows the Communication Failure response. What about that? Any clue?

The second image shows that the variables do not turn up on the main settings page after saving + refreshing. (but they do stay in the Advanced panel).

The third image shows my working Vera, confirming that Location and Metric are the same as the "broken" one.

Thoughts, ideas?

futzle

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1907
Re: Weather Plugin
« Reply #341 on: July 15, 2012, 05:30:59 pm »
Struggling with getting the Weather Plugin to work and looking for any advice.

I can reproduce the "Device not ready" error by having a rogue space at the end of the Implementation file field (look carefully at the screenshot after the ".xml").

Vera is very very picky about white space, so make sure that you haven't accidentally done this while copy-and-pasting.

HakanSoderbom

  • Newbie
  • *
  • Posts: 8
Re: Weather Plugin
« Reply #342 on: July 15, 2012, 05:55:05 pm »
I double checked and there are no white spaces. Note that those two variables were set up correctly during the automatic install. But I also double checked the Location and Metric variables (however the problem appears before I manually give them).

I have attached the error message that is visible on the devices page that says "Lua startup failure" . Maybe this gives some further clue...?

I didnt do anything manually to start with so it is a mystery why one installation fails on the Weather Plugin. Everything else works just fine on both installations.

Brientim

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1133
Re: Weather Plugin
« Reply #343 on: July 15, 2012, 05:57:46 pm »
The first image shows that I was able to set the Location and Metric variables, but it also shows the Communication Failure response.
Try the fix that @futzle identies first. Hopefully, once you have chech this and rectified any issues found, you will be able to just click on Metric and save. This will restart.
The image displays Metric = 0 and thus US Units. This is an identifer used to conducted the conversions.


futzle

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1907
Re: Weather Plugin
« Reply #344 on: July 15, 2012, 06:05:17 pm »
I have attached the error message that is visible on the devices page that says "Lua startup failure" . Maybe this gives some further clue...?

If you can get to the Luup log (/var/log/cmh/LuaUPnP.log) on the remote machine and catch the error message at startup then we'll be able to zoom in on it pretty quick.

I'm leaning towards the issue being one of your world location containing unexpected content and breaking the plugin at startup.  Thinking out loud here, does your location have a space or apostrophe or other non-alphabetic character in it?  (What have you set your city to, in the Vera setup?) (A question that mcvflorin already asked but you haven't answered.)
« Last Edit: July 15, 2012, 06:07:29 pm by futzle »