User Tools

Site Tools


Sunrise / Sunset


Supported Brands


Sender Arguments



        "weather": {
                "name": "Weather",
                "sunriseset": {
			"name": "Sunrise",
			"protocol": [ "sunriseset" ],
			"id": [{
				"longitude": "4.895167",
				"latitude": "52.3702157"
			"sunrise": 643,
			"sunset": 1853,
			"sun": "set"

Optional Settings

device-decimals2numberHow many decimals does the sunrise information contain
gui-decimals11 or 0The sunrise decimals to show in the GUIs
gui-show-sunriseset11 or 0Don't display the sunrise / sunset value


The sunriseset will send three messages:

  • When the sunset time has been arrived.
  • When the sunrise time has been arrived.
  • After midnight so all values can be updated for a new day.

When using sunriseset in eventing, keep in mind of the following; The output of sunriseset.sunset and sunriseset.sunrise is just a number, so the time 17:00 equals 17.00. When using it in eventing make sure you get usable numbers. For example the time for sunriseset.sunset is 16:30

"IF ((sunriseset.sunset == (datetime.hour + (datetime.minute / 100))) AND datetime.second == 0) THEN .."

pilight will see this:

"IF ((16.30 == (16 + (30 / 100))) AND 0 == 0) THEN ..."

The math pilight will use: 16.30 == 16.30

When you look at the result you will see that the datetime.minute 30 will give 0.30 in the used rule. (in normal case devide minutes through 100)

Using the sunriseset.


"IF sunriseset.sun IS set THEN ...."
"IF sunriseset.sun IS rise THEN ...."

The above two rules speak for themselves, but keep in mind if not adding additional AND lines, when using the device.state it will keep overriding your own toggling of the devices.

sunriseset.txt · Last modified: 2015/11/27 21:09 (external edit)