Sunrise-Sunset and Calendar functions for edge

You need to use 2 separate routines. 1 to turn on at sunset and 1 to turn off at a fixed time like 11PM.

Hello. Yes, that is a possibility that I’ve benn thinking. Except the app, because I use Tasker (not IFTTT). And I’ll try to call the API with tasker to change the virtual switch to ON or OFF.

Do you have a sample Tasker task where you call the API that you can share? I’m trying to figure out how to do that. Thanks.

Not yet. Like I said, it’s a possibility I’ve been thinking, but haven’t tried it yet…

Ah, ok. I thought you had tried it already. I experimented in Postman with querying the API but haven’t tried it in Tasker yet. If I figure it out, I’ll let you know. I’m way out of my comfort zone, though. :stuck_out_tongue_winking_eye:

I just came across this. I’ve deleted Tasker but there is an example of an HTTP request here:

This is great. Thanks. I have the HTTP command and the bearer token down but all the other coding in body might be a bit beyond me at the moment but I will check it out.

Hello.Just made a test and it works :grinning:
Very simple:

For example, to turn on a switch, in the Task, choose HTTP Request and fill it with:
Method: POST
URL: the URL of the device like**device_id**/commands (If you don’t have the device ID, you can get it using Postman, making a GET request to
Headers: Authorization: Bearer token_value
Body: [{“component”:“main”,“capability”:“switch”,“command”:“on”}]

Next, add a Flash with the text %http_data to see the return command

NOTE: In the URL the device_id should be bold not with **. But the editor does this…

That’s it!!

1 Like

OK, great. I will try it out. I was wondering where the return data showed up. I thought it had to be written to disk, but presumably it’s in the %http_data variable, which is even better. When I get a chance, I’ll try querying it to determine its current status, like I could do with the SharpTools Plugins using Tasker… Ah, all the new toys to play with… :smile:


I can’t get this to work, what am I doing wrong? And where does the flash go?

I’m not sure I can answer what you’re doing wrong, but for your question about Flash, that would be the first action you would enter in your Tasker task after the HTTP Request action. It should flash the value of the variable. I haven’t tried this yet, so I don’t know exactly how to structure the Body portion of the HTTP Request action.

Check your URL, because there is a “1” in the end of it and it shoudn’t exist. The URL ends with “/commands”

And yes, @rcbjr2 said it right. After the Request, add a Flash with the variable in the text and with that it will flash the return command. This is just to ensure it is working.
Another way is to make a request using Postman, that returns the state, and after the Request in Tasker, run that comman in Postman to see if it changes from “off” to “on”

1 Like

Hello @nayelyz.
Let me ask you if the “SmartWeather Station Tile” that now can be configured in IDE will be migrated to a Driver??
I use it now, in Webcore, to check if is there any rain coming, so my blinds close to prevent the windows to get wet :grinning:

1 Like

Hi, @andre_petinga
The SmartApps that will be migrated are SmartLighting and Severe-Weather Alert, but not to a driver, they will be separate plugins.
Could the Severe-Weather Alert SmartApp help you?

Just as a reference, here’s the link to the FAQ page where that’s specified.

Hi. I don’t know. I’ll try it out when it becomes available. Thanks

Hello @Mariano_Colmenarejo.
I had a simple routine to start my dehumidifier: If time is 19h → Start dehumidifier.
Since yesterday I added a vCalendar option, since I don’t need it to start when it’s hot (june, july and august), so I changed the routine to this:

And the dehumidifier did not start.
The option I made is “interval”, so I can choose from month 1 to 5 and on the other from month 9 to 12.
What am I doing wrong?

UPDATE: Just made a test with another device and it works… Maybe it was a ST failure… I have another 2 routines like this one in the morning, so I’ll wait and see if they work.

UPDATE 2: Works! I don’t know what happened yesterday…

Hi @andre_petinga

For me do not work yet

Yes, I read your post… Something is happening :grinning:
My 10am routine is defined to stop 3 hours later, so at 1pm it should turn off the dehumidifier.
And then I have another routine at 2pm, that starts is again (I don’t like to let it work for a long time, because it heats up a lot)

Ok, so the turn off after 3 hours, for the 10am routine, failed. But in this case it could have been because of me. Because after the trigger worked I edited the routine and removed the alert I placed ealier, just to be notified and saved the routine. And this change may be the cause to stop the 3 hour count to turn off the switch. I don’t know, just a thought.

The 2pm routine worked well.

I have an at or after Sunset as the trigger using this Edge device, and for about a week or so last month it wasn’t running at Sunset. But over the last few days or so it has started running at Sunset again.

I noticed it happening around the time when SmartThings was apparently making changes to add the ability for some ‘time’ and ‘<’ & ‘>’ features for devices in Routines to run local now. So hopefully the dust has settled. I also went in and re-saved those Routines to get the local symbol now so maybe that helped too.