Google Calendar Switch

I’m going to assume the boxes default to empty.
Both the Link and the Keyword are present in the gcallink & gcalon boxes under the Advanced tab. So at least they did actually set.

However, since both these entries are a one time set and forget type of thing, I dont see why the boxes would not just keep the entry as entered, until changed.

JOD.

It took me about 5 or 6 luaengine reloads to get the fields populated at all.
All entries are there now and i can actually arm/bypass the device.

Now on for some more testing ( i was holding off untill this w/e, but i got stuck in now anyway :))

  • Henk

[quote=“JOD, post:21, topic:169003”]I’m going to assume the boxes default to empty.
Both the Link and the Keyword are present in the gcallink & gcalon boxes under the Advanced tab. So at least they did actually set.

However, since both these entries are a one time set and forget type of thing, I dont see why the boxes would not just keep the entry as entered, until changed.

JOD.[/quote]

More assumptions… ;D
With an 11:00 - 2:00pm calendar entry, Is it safe to say the tripped event has a 5min window (based on the default setting) before triggering? 11:00 - 11:05?
My event did not trip during this period…But still testing.

Based on the above “Appointment” should the tripped event reset somewhere between 2:00 - 2:05?

JOD.

I created an event (at 05:03 pm) that runs from 0500 to 0600pm and the check button does not pick it up. Im running with the proposed http setting now.

the check button doesnt trip the device.

Where/how can i change the timing of 5 minutes?
[feature request] add this as a variable to the control page?

will now try to create an event that starts in the future.
Also im going to set it up with notifications so i know when it triggers without staring at the GUI all day :stuck_out_tongue:

  • Henk

  • edit -
    After setting up notifications i got an immediate message that the event triggerd.
    BUT… i dont see the red man… strange.

I have doublechecked syntax for both the xml entry as well as the keyword, they check out.

Have now set a future event for 7pm that lasts for an hour… lets see what happens.

[quote=“JOD, post:23, topic:169003”]More assumptions… ;D
With an 11:00 - 2:00pm calendar entry, Is it safe to say the tripped event has a 5min window (based on the default setting) before triggering? 11:00 - 11:05?
My event did not trip during this period…But still testing.

Based on the above “Appointment” should the tripped event reset somewhere between 2:00 - 2:05?

JOD.[/quote]

@Henk,

Double check your Keyword, make sure it matches the calendar entry. I clicked “Check” and the device tripped, however, it’s still tripped. How does one reset it?
Ok, deleted the calendar entry and clicked check again, It reset.
Feature request A reset button on the control page.

Another assumption is that the calendar entry needs to be outside that “5 minute” window.

*Edit. To change the Keyword, you have to reload / save.

JOD.

@JOD

I doublechecked and edited my entry below.
As for reset. I would asume it resets after the event stopped and the first “check” finds the event is not there anymore. So allow it for 5 minutes max to “discover” the changed status.

  • Henk

[quote=“JOD, post:25, topic:169003”]I clicked “Check” and the device tripped, however, it’s still tripped. How does one reset it? Ok, deleted the calendar entry and clicked check again, It reset.
Feature request A reset button on the control page.
JOD.[/quote]

[quote=“Henk, post:26, topic:169003”]As for reset. I would asume it resets after the event stopped and the first “check” finds the event is not there anymore.[/quote]Understood, but if the “Check” checks for a future event and trips, does it stay tripped until the first event expires?
Does “Check” only check the validity of the 'Keyword" for the first calendar event?

I did just get a calendar trip condition. Very cool. Now waiting for the event expiration reset.

If you edited the Keyword, you have to reload, then check the Advanced tabs gcalon box.

*Edit. Reset occured 4 minutes after the event expiration.
Nice work @utz, this is really cool…

JOD.

Hi,

  • when you press the set button it will set the variables gcalon and gcallink. You can see the content of these variables on the advanced tab at the bottom (usually after reloading the page).
  • when pressing a button it will not blink or something. So it is hard to tell that something happens without user feedback. If someone knows how to fix this I will put it in. You can look at the logfile on vera, debug output will tell you if the button was pressed (I know, thats note a mode for usual operation)
  • the boxes for the link and the keyword are empty. It would be nice to show there always the current set gcalon and gcallink variable. Again I dont know how to do this. If someone knows how to do this I add it.

… sorry, as I said all a bit beta.

@utz

Dont be sorry!!! Its a GREAT plugin and it just needs some work…
We are just trying to be helpfull.

Keep it up!!!

  • Henk

[quote=“utz, post:28, topic:169003”]Hi,

  • when you press the set button it will set the variables gcalon and gcallink. You can see the content of these variables on the advanced tab at the bottom (usually after reloading the page).
  • when pressing a button it will not blink or something. So it is hard to tell that something happens without user feedback. If someone knows how to fix this I will put it in. You can look at the logfile on vera, debug output will tell you if the button was pressed (I know, thats note a mode for usual operation)
  • the boxes for the link and the keyword are empty. It would be nice to show there always the current set gcalon and gcallink variable. Again I dont know how to do this. If someone knows how to do this I add it.

… sorry, as I said all a bit beta.[/quote]

[quote=“JOD, post:27, topic:169003”][quote=“Henk, post:26, topic:169003”]As for reset. I would asume it resets after the event stopped and the first “check” finds the event is not there anymore.[/quote]Understood, but if the “Check” checks for a future event and trips, does it stay tripped until the first event expires?
Does “Check” only check the validity of the 'Keyword" for the first calendar event?

I did just get a calendar trip condition. Very cool. Now waiting for the event expiration reset.

If you edited the Keyword, you have to reload, then check the Advanced tabs gcalon box.

*Edit. Reset occured 4 minutes after the event expiration.
Nice work @utz, this is really cool…

JOD.[/quote]

The check button simply triggers the function that is normally called by timer every 5min. If there is an event in the calendar at the time you press the button the red man comes on. If there is no event at the time the man goes blue. The button is essentially for people like me that cant wait 5min while testing the setup.

[quote=“Henk, post:22, topic:169003”]It took me about 5 or 6 luaengine reloads to get the fields populated at all.
All entries are there now and i can actually arm/bypass the device.[/quote]

Yes I observed this as well and I have the same problem with other plugins (also ones that other people coded). I really would like to know how to get rid of this problem.

Thats what I want as well I just do not know how to do this. I assume I need to change something in the .json file to achieve that. Its very annoying that it does not show the variables there.

@utz,

It’s not a big deal, as long as the user knows to click Save and check the Advanced tab, which now they do.
In my situation, since I didn’t see that it saved the first time, I entered the keyword a second time, only different than the first, which now didn’t match the Google entry…Which didnt trip the event…

Anyway, I’m new to Google Calendar and in the process now of setting it up on my iPhone and had a few thoughts.

Is it possible to have multiple instances of the device, and use different keywords?
This would be great for those with rental properties

Or, being able to use two Keywords with each device, one to trip, and one to reset?

Are there additional ways to create/delete the calendar events?
Via email maybe?

JOD.

*Edit. “Check” checks within the next 5hrs for an event

[quote=“JOD, post:32, topic:169003”]Is it possible to have multiple instances of the device, and use different keywords?
This would be great for those with rental properties[/quote]

yes that should work (i have not tested it)

That was my initial design. However, I changed it so that when no event is present it switches it actively off.

[quote=“JOD, post:32, topic:169003”]Are there additional ways to create/delete the calendar events?
Via email maybe?[/quote]

Whatever ways google provides to get events set can be used. I am not sure if you can set an event via mail.

Not sure what you mean. You could change the time window in which to look for an event (e.g. see if there is anything in the next 5h and switch then on.

*Edit. “Check” checks within the next 5hrs for an event

[quote="utz, post:33, topic:169003"][/quote]Not sure what you mean. You could change the time window in which to look for an event (e.g. see if there is anything in the next 5h and switch then on.
What I meant was. If there is a calendar event within the next 5hrs, "Check" returns a tripped condition. If the event is 5.5hrs out, it wont trip. So the "Check" button will return true for any event within the next 5hrs.

JOD.

[quote=“JOD, post:34, topic:169003”]*Edit. “Check” checks within the next 5hrs for an event

[quote="utz, post:33, topic:169003"][/quote]Not sure what you mean. You could change the time window in which to look for an event (e.g. see if there is anything in the next 5h and switch then on.
What I meant was. If there is a calendar event within the next 5hrs, "Check" returns a tripped condition. If the event is 5.5hrs out, it wont trip. So the "Check" button will return true for any event within the next 5hrs.

JOD.[/quote]

yep that could be done introducing an additional variable (for look ahead time). Hard coded that is done quickly; to be set via UI would need another box.

No need for the additional variable. That’s the way it works now, as default.

JOD.

@utz

[feature request]

could you include the code for the “virtual device” as provided here:
http://forum.mios.com/index.php?topic=6650.msg47521#msg47521

That would actually make the device to be reckognized as a sensor
Also then the notification tab would become available so one doesnt have to run a scene to be notificated.

And still, the variable for timeintervals that the device uses to check the calendar (default 6 minutes) to be available as a user definabel box would be GREAT.

  • Henk

[quote=“Henk, post:37, topic:169003”]@utz

[feature request]

could you include the code for the “virtual device” as provided here:
http://forum.mios.com/index.php?topic=6650.msg47521#msg47521

That would actually make the device to be reckognized as a sensor
Also then the notification tab would become available so one doesnt have to run a scene to be notificated.[/quote]

I added a new version (first post) that has a notifications tab (not tested). As I understand the “virtual device” is a switch that can indicate if someone is there or not. It should be possible to mimic this by the device as is (maybe I did not quite get it)

[quote=“Henk, post:37, topic:169003”]@utz
And still, the variable for timeintervals that the device uses to check the calendar (default 6 minutes) to be available as a user definabel box would be GREAT.[/quote]

yep I will put this in tomorrow but I think I wont find time tonight …

@Henk,

There is an event drop down box for when:
“A calendar event is active”
and
“An armed calendar event is active”

What’s your thinking with the Ping Sensor?
Being able to trigger events based on the GCS status of not tripped / “No calendar event” ?

JOD.

*Edit. After creating a 2nd instance of the GCS, I’ve tried repeatedly (over the past hour) to get the Link & Keyword to set, maybe it’s not possible to have two active GCS devices?

@JOD

Not the pingsensor, the statedevice.
This plugin is more or less controlled by a calendar instead of manually like the statedevice, which makes it much more functional and gives it more practical uses.

Also my suggestion to add/borrough code from the state device would make it more “compatible” as it shows up as either a binary switch or a fully supported motion sensor. FI currently ivera doesnt “support” the plugin because it cannot classify it as either a switch or a sensor.

As for my single instance, i cant get it to trigger, so ill remove it tomorrow and try @utz new version. must be something im doing wrong at my end.

@utz, many many compliments on your hard work and putting up with our whining remarks on what could be improved… ::slight_smile:

[quote=“JOD, post:39, topic:169003”]@Henk,

There is an event drop down box for when:
“A calendar event is active”
and
“An armed calendar event is active”

What’s your thinking with the Ping Sensor?
Being able to trigger events based on the GCS status of not tripped / “No calendar event” ?

JOD.

*Edit. After creating a 2nd instance of the GCS, I’ve tried repeatedly (over the past hour) to get the Link & Keyword to set, maybe it’s not possible to have two active GCS devices?[/quote]