Page 1 of 1

Request / Sun Control

Posted: Mon 19 Sep 2011, 21:50
by tobi_s

I would like to control my window shutters (blinds) by the sun control option.

My Problem is that the shutters are opened by "on" signal and closed by "off".
Hence, i need the sun control option to turn the device "on" instead of "off" on sunrise and vice versa on sunset.

It would be great to have a selection possibility where i can choose what to do on sunset/sunrise per device.

Best regards,

Re: Request / Sun Control

Posted: Tue 20 Sep 2011, 19:45
by tomas

Currently we do not support this option other than through using data sources (see next post). We have received a similar request from another user and the feature is in our backlog. We are looking into making it easier to add "predefined" data sources.


Re: Request / Sun Control

Posted: Tue 20 Sep 2011, 20:50
by tomas
You can achieve the requested functionality by using a data source and a group schedule with rule.

1) Create a data source that reads sunstate (up/down) from the server using the REST interface

- Add a new data source and select "Values from a file".
- Select "Character separated"
- Enter file path: http://localhost:8800/extendedservices/ ... n&Offset=0
(Replace 8800 with the port you are using for REST if you are not using default)
- Enter "<>" as separator character (both < and >)
- Field index = 3
- Row index = 1
- Select "Access network file with specified user account" under Advanced section (on the Polling tab)
- Enter user name and password (same as for REST where default user name is "user" and default password is "pass").
- Clear "Use domain when accessing file"

The value for this data source will now be "Down" when the sun is down and "Up" when the sun is up. You can tweak the offset in file path if needed.

2) Create group schedule with rule

- Add a new group schedule and define when the device should be on.
- Add a new rule on the Rules tab.
- Select the data source you just created and select "Equal to".
- Enter "Up" in the box next to "Equal to".

3) Link the group schedule to the device and make sure to clear "Take sunrise/sunset into consideration" for the device

The device will now be turned on according to the schedule only as long as the sun is up.

Re: Request / Sun Control

Posted: Mon 06 Apr 2015, 19:57
by _NE_
I have been using this setup, on a server running windows XP.
The other day i moved it to SwitchKing Pi, and everything is working good except this source, is there any compatibility problems between This setup and the Pi, is it fixable?


Re: Request / Sun Control

Posted: Wed 08 Apr 2015, 20:09
by tomas
I am not using Linux myself, but perhaps the file path needs to be edited for it to work in the Linux world.

You can check the server log files to find clues to why it doesn't work.

And you might find some info in this thread: ... 79&p=11560