-
Notifications
You must be signed in to change notification settings - Fork 4
Astro binding
Documentation of the Astro Binding Bundle
Note: This Binding will be available in the upcoming 1.5 Release. For preliminary builds please see the CI server at Cloudbees.
The Astro binding is used for:
- calculating the sunrise, noon and sunset time
- scheduling of events at sunrise, noon and sunset
- calculating the azimuth and elevation (e.g. for auto shading with RollerShutter, ...)
############################## Astro Binding ##############################
#
# Your latitude
astro:latitude=nn.nnnnnn
# Your longitude
astro:longitude=nn.nnnnnn
# Refresh interval for azimuth and elevation calculation in seconds (optional, defaults to disabled)
astro:interval=nnn
Number Azimuth "Azimuth [%.2f]" {astro="type=AZIMUTH"}
Number Elevation "Elevation [%.2f]" {astro="type=ELEVATION"}
DateTime Sunrise_Time "Sunrise [%1$tH:%1$tM]" {astro="type=SUNRISE_TIME"}
DateTime Noon_Time "Noon [%1$tH:%1$tM]" {astro="type=NOON_TIME"}
DateTime Sunset_Time "Sunset [%1$tH:%1$tM]" {astro="type=SUNSET_TIME"}
Switch Sunrise_Event {astro="type=SUNRISE"}
Switch Noon_Event {astro="type=NOON"}
Switch Sunset_Event {astro="type=SUNSET"}
The Azimuth and Elevation items are updated at the configured refresh interval in openhab.cfg.
At midnight, the sunrise, noon and sunset time is calculated, published and the event jobs are scheduled. The sunrise, noon and sunset Switches are updated with ON followed by a OFF at the calculated time.
Rule at sunrise:
rule "Example Rule at sunrise"
when
Item Sunrise_Event received update ON
then
...
end
Rule to close all RollerShutters after sunset and the outside temperature is lower than 5 degrees:
rule "Close RollerShutters if cold after sunset"
when
Item Temp_Outside changed
then
if (now.isAfter((Sunset_Time.state as DateTimeType).calendar.timeInMillis) &&
(Temp_Outside.state as DecimalType).intValue < 5) {
RollerShutters?.members.forEach(r | sendCommand(r, DOWN))
}
end
Let's say, you know that the sun is shining through your livingroom window between Azimuth 100 and 130. If it's summer you want to close the RollerShutter.
rule "Autoshading RollerShutter"
when
Item Azimuth changed
then
var int azimuth = (Azimuth.state as DecimalType).intValue
if (azimuth > 100 && azimuth < 130) {
sendCommand(Rollershutter_Livingroom, DOWN)
}
...
end
Installation
Community
- Support
- News Archive
- Presentations
- How to Contribute
- IDE Setup
- How to Implement a Binding
- How to Implement an Action
- Projects using openHAB
- User Interfaces
- Classic UI
- iOS Client
- Android Client
- GreenT UI
- CometVisu
- Bindings
- Asterisk Binding
- Astro Binding
- Bluetooth Binding
- Comfo Air Binding
- CUL Binding
- CUPS Binding
- digitalSTROM Binding
- DMX512 Binding
- EnOcean Binding
- Epson Projector Binding
- Exec Binding
- Fritz!Box Binding
- Fritz AHA Binding
- GPIO Binding
- HDAnywhere binding
- Heatmiser Binding
- Homematic Binding
- HTTP Binding
- IHC / ELKO Binding
- Insteon Hub Binding
- Insteon PLM Binding
- Ir-Trans Binding
- KNX Binding
- Koubachi Binding
- MAX!Cube-Binding
- MiLight Binding
- Modbus TCP Binding
- MPD Binding
- MQTT Binding
- MQTTitude binding
- Neohub Binding (Preview)
- Netatmo Binding
- Network Health Binding
- Nibe Heatpump Binding
- Nikobus Binding
- Novelan/Luxtronic Heatpump Binding
- NTP Binding
- One-Wire Binding
- Onkyo AV Receiver Binding
- Open Energy Monitor Binding
- OpenPaths presence detection binding
- OpenSprinkler Binding
- OSGi Configuration Admin Binding
- Philips Hue Binding
- Piface Binding
- Pioneer-AVR-Binding
- Plugwise Binding
- PLCBus Binding
- Pulseaudio Binding
- RFXCOM Binding
- Samsung TV Binding
- Serial Binding
- Snmp Binding
- Squeezebox Binding
- System Info Binding
- Somfy URTSI II Binding
- Sonos Binding
- Swegon ventilation Binding
- TCP/UDP Binding
- Tellstick Binding
- TinkerForge Binding
- VDR Binding
- Velleman-K8055-Binding
- Wake-on-LAN Binding
- Withings Binding
- XBMC Binding
- xPL Binding
- Z-Wave Binding
- Persistence
- db4o Persistence
- rrd4j Persistence
- MySQL Persistence
- MongoDB Persistence
- Sen.Se Persistence
- Cosm Persistence
- Logging Persistence
- Exec Persistence
- MQTT Persistence
- Automation
- Scripts
- Rules
- Actions
- Misc
- REST-API
- Security
- Google Calendar Support
- Twitter Action
- Service Discovery
- Dropbox Bundle
Samples
- Item definitions
- Sitemap definitions
- Binding configurations
- Rules
- REST Examples
- Tips & Tricks
- FAQ
- XSLT Transforms
- Scripts
- Integration with other applications
- Syntax highlighting for external editors
- Update-Scripts
- Samples-Comfo-Air-Binding
- Samples WAC Binding
Release Notes