User Tools

Site Tools


sunriseset_v6_0

Sunrise / Sunset

FeatureSupport
Sending
Receiving
Config

Supported Brands

None

Sender Arguments

None

Config

"devices": {
	"sunriseset": {
		"protocol": [ "sunriseset" ],
		"id": [{
			"longitude": 1.2345,
			"latitude": 50.607080
		}],
		"sunrise": 8.16,
		"sunset": 16.52,
		"sun": "set"
	}
},
"gui": {
	"sunriseset": {
		"name": "Sunrise / Sunset",
		"group": [ "Outside" ],
		"media": [ "all"]
	}
}

Optional Settings

GUI Settings

SettingDefaultFormatDescription
decimals2numberThe sunrise decimals to show in the GUIs
show-sunriseset11 or 0Don't display the sunrise / sunset value

Comments

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 divide minutes through 100)

Using the sunriseset.

Example

"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_v6_0.txt · Last modified: 2015/11/27 22:09 (external edit)