-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Anel Binding
Documentation of the Anel binding for NET-PwrCtrl devices.
Anel NET-PwrCtrl HUT | Anel NET-PwrCtrl PRO | Anel NET-PwrCtrl HOME |
---|---|---|
NET-PwrCtrl devices are power sockets / relays that can be configured via browser but they can also be controlled over the network, e.g. with an Android or iPhone app - and also with openHAB via this binding. The NET-PwrCtrl HUT and NET-PwrCtrl IO also have 8 I/O pins which can either be used to directly switch the sockets, or they can be used as general input switches in openHAB. Here is a video demonstrating a switch and a dimmer (voice is German), explanation of the setup is given in the diagram below:
For installation of the binding, please see Wiki page Bindings.
The Anel binding is included since openHAB 1.6.0.
Configuration is done in the openhab.cfg file (in the folder ${openhab_home}/configurations
):
########################## Anel NET-PwrCtrl Binding ###################################
#
# <name> must be an identifier that is also used for the item bindings.
# Example configuration: anel:anel1.host=net-control
# Example item binding: Switch f1 { anel="anel1:F1" }
# IP or network address (optional but recommended, defaults to 'net-control')
#anel:<name>.host=anel1
# UDP receive port (optional, defaults to 77)
#anel:<name>.udpReceivePort=7777
# UDP send port (optional, defaults to 75)
#anel:<name>.udpSendPort=7775
# User name (optional, defaults to 'user7')
#anel:<name>.user=user1
# Password (optional, defaults to 'anel')
#anel:<name>.password=anel
# Global refresh interval in ms (optional, defaults to 60000 = 1min, disable with '0')
#anel:refresh=60
# Cache the state for n minutes so only changes are posted (optional, defaults to 0 = disabled)
# Example: if period is 60, once per hour all states are posted to the event bus;
# changes are always and immediately posted to the event bus.
# The recommended value is 60 minutes.
#anel:cachePeriod=60
Some notes:
- At least one option must be set for an identifier for the binding to work.
- The most obvious and important option is
host
, it is in fact mandatory if multiple devices are used. - The host name, ports, and credentials are device-specific settings that must be configured via the device's browser interface.
- Port numbers above 1024 are recommended because ports below 1024 are typically reserved and their access restricted on some devices/networks.
There are different types of item bindings, all of them are qualified with the device's identifier used in the openhab.cfg
file:
The device's name is a string type, the device's temperature is a number:
String anelName "Anel1 network name [%s]" { anel="anel1:NAME" }
Number anelTemperature "Anel1 temperature [%s]" { anel="anel1:TEMPERATURE" }
The actual relay states are also switchable if they are not locked. Note that the locked states and the relay's names are read-only.
Switch f1 { anel="anel1:F1", autoupdate="false" }
String f1name { anel="anel1:F1NAME" }
Switch f1locked { anel="anel1:F1LOCKED" }
The I/O states are only switchable if they are configured as 'input' (point of view of the anel device), otherwise they are read-only. Again, the names are also read-only.
Switch io1 { anel="anel1:IO1" }
String io1name = { anel="anel1:IO1NAME" }
Switch io1isinput { anel="anel1:IO8ISINPUT" }
Note: all read-only properties must be configured via the device's browser interface.
General format and full list of binding items:
anel="<identifier>:<item>"
item | item type | purpose | changeable |
---|---|---|---|
NAME |
String | device's name | no |
TEMPERATURE |
Number | device's temperature | no |
F1NAME |
String | name of relay 1 | no |
F2NAME |
String | name of relay 2 | no |
F3NAME |
String | name of relay 3 | no |
F4NAME |
String | name of relay 4 | no |
F5NAME |
String | name of relay 5 | no |
F6NAME |
String | name of relay 6 | no |
F7NAME |
String | name of relay 7 | no |
F8NAME |
String | name of relay 8 | no |
F1LOCKED |
Switch | whether or not relay 1 is locked | no |
F2LOCKED |
Switch | whether or not relay 2 is locked | no |
F3LOCKED |
Switch | whether or not relay 3 is locked | no |
F4LOCKED |
Switch | whether or not relay 4 is locked | no |
F5LOCKED |
Switch | whether or not relay 5 is locked | no |
F6LOCKED |
Switch | whether or not relay 6 is locked | no |
F7LOCKED |
Switch | whether or not relay 7 is locked | no |
F8LOCKED |
Switch | whether or not relay 8 is locked | no |
F1 |
Switch | state of relay 1 | only if F1LOCKED = OFF
|
F2 |
Switch | state of relay 2 | only if F2LOCKED = OFF
|
F3 |
Switch | state of relay 3 | only if F3LOCKED = OFF
|
F4 |
Switch | state of relay 4 | only if F4LOCKED = OFF
|
F5 |
Switch | state of relay 5 | only if F5LOCKED = OFF
|
F6 |
Switch | state of relay 6 | only if F6LOCKED = OFF
|
F7 |
Switch | state of relay 7 | only if F7LOCKED = OFF
|
F8 |
Switch | state of relay 8 | only if F8LOCKED = OFF
|
IO1NAME |
String | name of I/O 1 | no |
IO2NAME |
String | name of I/O 2 | no |
IO3NAME |
String | name of I/O 3 | no |
IO4NAME |
String | name of I/O 4 | no |
IO5NAME |
String | name of I/O 5 | no |
IO6NAME |
String | name of I/O 6 | no |
IO7NAME |
String | name of I/O 7 | no |
IO8NAME |
String | name of I/O 8 | no |
IO1ISINPUT |
Switch | whether I/O 1 is input | no |
IO2ISINPUT |
Switch | whether I/O 2 is input | no |
IO3ISINPUT |
Switch | whether I/O 3 is input | no |
IO4ISINPUT |
Switch | whether I/O 4 is input | no |
IO5ISINPUT |
Switch | whether I/O 5 is input | no |
IO6ISINPUT |
Switch | whether I/O 6 is input | no |
IO7ISINPUT |
Switch | whether I/O 7 is input | no |
IO8ISINPUT |
Switch | whether I/O 8 is input | no |
IO1 |
Switch | state of I/O 1 | only if IO1ISINPUT = ON
|
IO2 |
Switch | state of I/O 2 | only if IO2ISINPUT = ON
|
IO3 |
Switch | state of I/O 3 | only if IO3ISINPUT = ON
|
IO4 |
Switch | state of I/O 4 | only if IO4ISINPUT = ON
|
IO5 |
Switch | state of I/O 5 | only if IO5ISINPUT = ON
|
IO6 |
Switch | state of I/O 6 | only if IO6ISINPUT = ON
|
IO7 |
Switch | state of I/O 7 | only if IO7ISINPUT = ON
|
IO8 |
Switch | state of I/O 8 | only if IO8ISINPUT = ON
|
Although the device's configuration can be used to directly switch a relay with an input channel, the very same can be done with this rule:
rule "regular switch on Anel1 IO1 input for relay 1"
when Item io1 changed then
sendCommand(f1, io1.state)
end
An input channel can also be used as a push button (also demonstrated in the video):
rule "push button switch on Anel1 IO2 input for relay 2"
when Item io2 changed to ON then
sendCommand(f2, if (f2.state != ON) ON else OFF)
end
In combination with the MiLight Binding, this rule uses I/O 3 as dimmer for MiLight bulb milight_zone1
(also demonstrated in the video).
As long as I/O 3 is pressed, the bulb dims up until its brightness reaches 100%.
import org.openhab.core.library.types.*
var org.openhab.model.script.actions.Timer timer2
rule "switch dimmer on Anel1 IO3"
when Item io3 changed to OFF then
sendCommand(milight_zone1, 10)
timer2 = createTimer(now.plusMillis(333)) [|
val int newValue = (milight_zone1.state as DecimalType).intValue + 5
if (newValue > 100) {
timer2 = null
} else if (timer2 != null) {
sendCommand(milight_zone1, newValue)
if (io3.state == OFF)
timer2.reschedule(now.plusMillis(333))
}
]
end
ℹ Please find all documentation for openHAB 2 under http://docs.openhab.org.
The wiki pages here contain (outdated) documentation for the older openHAB 1.x version. Please be aware that a lot of core details changed with openHAB 2.0 and this wiki as well as all tutorials found for openHAB 1.x might be misleading. Check http://docs.openhab.org for more details and consult the community forum for all remaining questions.
- Classic UI
- iOS Client
- Android Client
- Windows Phone Client
- GreenT UI
- CometVisu
- Kodi
- Chrome Extension
- Alfred Workflow
- Cosm Persistence
- db4o Persistence
- Amazon DynamoDB Persistence
- Exec Persistence
- Google Calendar Presence Simulator
- InfluxDB Persistence
- JDBC Persistence
- JPA Persistence
- Logging Persistence
- mapdb Persistence
- MongoDB Persistence
- MQTT Persistence
- my.openHAB Persistence
- MySQL Persistence
- rrd4j Persistence
- Sen.Se Persistence
- SiteWhere Persistence
- AKM868 Binding
- AlarmDecoder Binding
- Anel Binding
- Arduino SmartHome Souliss Binding
- Asterisk Binding
- Astro Binding
- Autelis Pool Control Binding
- BenQ Projector Binding
- Bluetooth Binding
- Bticino Binding
- CalDAV Binding
- Chamberlain MyQ Binding
- Comfo Air Binding
- Config Admin Binding
- CUL Transport
- CUL Intertechno Binding
- CUPS Binding
- DAIKIN Binding
- Davis Binding
- DD-WRT Binding
- Denon Binding
- digitalSTROM Binding
- DIY on XBee Binding
- DMX512 Binding
- DSC Alarm Binding
- DSMR Binding
- eBUS Binding
- Ecobee Binding
- EDS OWSever Binding
- eKey Binding
- Energenie Binding
- EnOcean Binding
- Enphase Energy Binding
- Epson Projector Binding
- Exec Binding
- Expire Binding
- Fatek PLC Binding
- Freebox Binding
- Freeswitch Binding
- Frontier Silicon Radio Binding
- Fritz AHA Binding
- Fritz!Box Binding
- FritzBox-TR064-Binding
- FS20 Binding
- Garadget Binding
- Global Caché IR Binding
- GPIO Binding
- HAI/Leviton OmniLink Binding
- HDAnywhere Binding
- Heatmiser Binding
- Homematic / Homegear Binding
- Horizon Mediabox Binding
- HTTP Binding
- IEC 62056-21 Binding
- IHC / ELKO Binding
- ImperiHome Binding
- Insteon Hub Binding
- Insteon PLM Binding
- IPX800 Binding
- IRtrans Binding
- jointSPACE-Binding
- KM200 Binding
- KNX Binding
- Koubachi Binding
- LCN Binding
- LightwaveRF Binding
- Leviton/HAI Omnilink Binding
- Lg TV Binding
- Logitech Harmony Hub
- MailControl Binding
- MAX!Cube-Binding
- MAX! CUL Binding
- MCP23017 I/O Expander Binding
- MCP3424 ADC Binding
- MiLight Binding
- MiOS Binding
- Mochad X10 Binding
- Modbus Binding
- MPD Binding
- MQTT Binding
- MQTTitude binding
- MystromEcoPower Binding
- Neohub Binding
- Nest Binding
- Netatmo Binding
- Network Health Binding
- Network UPS Tools 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
- Panasonic TV Binding
- panStamp Binding
- Philips Hue Binding
- Picnet Binding
- Piface Binding
- PiXtend Binding
- pilight Binding
- Pioneer-AVR-Binding
- Plex Binding
- Plugwise Binding
- PLCBus Binding
- PowerDog Local API Binding
- Powermax alarm Binding
- Primare Binding
- Pulseaudio Binding
- Raspberry Pi RC Switch Binding
- RFXCOM Binding
- RWE Smarthome Binding
- Sager WeatherCaster Binding
- Samsung AC Binding
- Samsung TV Binding
- Serial Binding
- Sallegra Binding
- Satel Alarm Binding
- Siemens Logo! Binding
- SimpleBinary Binding
- Sinthesi Sapp Binding
- Smarthomatic Binding
- Snmp Binding
- Somfy URTSI II Binding
- Sonance Binding
- Sonos Binding
- Souliss Binding
- Squeezebox Binding
- Stiebel Eltron Heatpump
- Swegon ventilation Binding
- System Info Binding
- TA CMI Binding
- TCP/UDP Binding
- Tellstick Binding
- TinkerForge Binding
- Tivo Binding
- UCProjects.eu Relay Board Binding
- UPB Binding
- VDR Binding
- Velleman-K8055-Binding
- Wago Binding
- Wake-on-LAN Binding
- Waterkotte EcoTouch Heatpump Binding
- Weather Binding
- Wemo Binding
- Withings Binding
- XBMC Binding
- xPL Binding
- Yamahareceiver Binding
- Zibase Binding
- Z-Wave Binding
- Asterisk
- DoorBird
- FIND
- Foscam IP Cameras
- LG Hombot
- Worx Landroid
- Heatmiser PRT Thermostat
- Google Calendar
- Linux Media Players
- Osram Lightify
- Rainforest EAGLE Energy Access Gateway
- Roku Integration
- ROS Robot Operating System
- Slack
- Telldus Tellstick
- Zoneminder
- Wink Hub (rooted)
- Wink Monitoring
- openHAB Cloud Connector
- Google Calendar Scheduler
- Transformations
- XSLT
- JSON
- REST-API
- Security
- Service Discovery
- Voice Control
- BritishGasHive-Using-Ruby
- Dropbox Bundle
A good source of inspiration and tips from users gathered over the years. Be aware that things may have changed since they were written and some examples might not work correctly.
Please update the wiki if you do come across any out of date information.
- Rollershutter Bindings
- Squeezebox
- WAC Binding
- WebSolarLog
- Alarm Clock
- Convert Fahrenheit to Celsius
- The mother of all lighting rules
- Reusable Rules via Functions
- Combining different Items
- Items, Rules and more Examples of a SmartHome
- Google Map
- Controlling openHAB with Android
- Usecase examples
- B-Control Manager
- Spell checking for foreign languages
- Flic via Tasker
- Chromecast via castnow
- Speedtest.net integration