Date dynamic please help


#1

How exactly would I handle this when I’m trying to use gcal to find events at the end of a month? My event falls on Monday but I need it to fire when I get home from work on Friday. $day + doesn’t take into account the month.


#2

Not sure about the Gcal aspect, but I sometimes use webCoRE to convert a date into day of the year.

temp

You could always do your math based on that…


#3

I’m sure that’s the answer but it doesn’t help me lol. I have no clue where to set a variable and I’ve been looking.


#4

Ok I figured it out but it’s now giving an invalid datr


#5

Here ya go…

Contact sensor 6 is your Gcal event


#6

Its returning an invalid date


#7

Can you share your piston?


#8

It’s just the one you sent me with my calendar added. I’m just learning how to use variables ect. I have an idea I want to do based off whether I’m on a normal 5 day work week or 4 day week. On basic pistons this works fine but I’m trying to check the weather forecast on Friday for either Monday or Tuesday based off my calendar on Sunday night


#9

I see what I did


#10

when you look in smartthings ide page. You find the device there called cal on-cal m-f. What attributes does it list? What version of Gcal are you running?


#11

Or not still getting an invalid date


#12


a39832fe-8c4d-4999-b044-471a1274b7ed
9:21:26 PM: infoSaving No End Msg Wanted as state.endMsg .

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: traceGCalSearchTrigger: getDevice()

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: tracescheduleMsg( endMsg, Fri Oct 05 12:00:00 UTC 2018, [overwrite:true] ) from Cal On-call M-F.

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: debugchildCreated? Cal On-call M-F

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: debugchildCreated? Cal On-call M-F

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: infoSaving No Start Msg Wanted as state.startMsg .

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: traceGCalSearchTrigger: getDevice()

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: tracescheduleEvent( open, Sun Sep 30 22:30:00 UTC 2018, [overwrite:true] ) from Cal On-call M-F.

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: traceGCalSearchTrigger: getNextEvents() child

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: debugendMsg Msgs Wanted? = false

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: debugstartMsg Msgs Wanted? = false

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: traceGCalSearchTrigger::refresh()

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: tracescheduleEvent( close, Fri Oct 05 12:00:00 UTC 2018, [overwrite:true] ) from Cal On-call M-F.

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: debugchildCreated? Cal On-call M-F

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: traceGCalSearchTrigger: getDevice()

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: infoSaving No End Msg Wanted as state.endMsg .

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: traceGCalSearchTrigger: getDevice()

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: tracescheduleMsg( endMsg, Fri Oct 05 12:00:00 UTC 2018, [overwrite:true] ) from Cal On-call M-F.

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: traceGCalSearchTrigger: getDevice()

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: traceGCalSearchTrigger: getDevice()

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: tracescheduleEvent( open, Sun Sep 30 22:30:00 UTC 2018, [overwrite:true] ) from Cal On-call M-F.

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: debugchildCreated? Cal On-call M-F

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: infoSaving No Start Msg Wanted as state.startMsg .

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: debugchildCreated? Cal On-call M-F

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: debugchildCreated? Cal On-call M-F

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: tracescheduleMsg( endMsg, Fri Oct 05 12:00:00 UTC 2018, [overwrite:true] ) from Cal On-call M-F.

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: tracescheduleEvent( close, Fri Oct 05 12:00:00 UTC 2018, [overwrite:true] ) from Cal On-call M-F.

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: traceGCalSearchTrigger: getDevice()

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: debugendMsg Msgs Wanted? = false

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: traceGCalSearchTrigger: getDevice()

a39832fe-8c4d-4999-b044-471a1274b7ed 9:21:26 PM: debug


#13


#14

Hmm. It should work. Can you share the logs from webcore, set to full.


#15

Leave here if you can, I will look and play with it to see if I can get it working. I got to run. Let you know in the A.M. if I find anything.


#16

Now it’s working for some crazy reason lol


#17

How do I get it to minus days?


#18

Got it


#19

addDays([cal on-call m-f:eventTime],-3). Subtracts 3 days I belive


#20

Thank you so much I’ve been trying to figure that out all day. Now just a matter of trying to figure out how I want to do it. I think if I say “only when” adjusted date is before Friday’s then it will know I’m working on Monday. God I love webCoRE