```
Dimmer Light_LivingRoom { channel="milight:rgbLed:milight2:4:ledbrightness", channel="bluetooth:ptm215b:bluegiga0:rocker_livingroom:rocker1" [profile="rawrocker-to-on-off"], channel="bluetooth:ptm215b:bluegiga0:rocker_kitchen:rocker1" [profile="rawrocker-to-on-off"] } // We have a combined kitchen / livingroom, so we control the living room lights with switches from the living room and from the kitchen
Switch Light_Kitchen { channel="hue:group:1:kitchen-bulbs:switch", channel="bluetooth:ptm215b:bluegiga0:rocker_kitchen:rocker2" [profile="rawrocker-to-on-off"] }
-```
\ No newline at end of file
+```
See also the following extensions for further examples:
-<!--list-subs-->
\ No newline at end of file
+<!--list-subs-->
actions.bypass()
end
-```
\ No newline at end of file
+```
val success = castActions.playURL("http://192.168.1.160:81/mjpg/front1/video.mjpg")
val success2 = castActions.playURL("http://192.168.1.160:81/mjpg/front1/video.mjpg", "image/jpeg")
-```
\ No newline at end of file
+```
/**
* The {@link ChromecastActions} class defines rule actions for playing URLs
*
- * @author Scott Hanson - Added Actions
+ * @author Scott Hanson - Initial contribution
*/
@ThingActionsScope(name = "chromecast")
@NonNullByDefault
if (model == null) {
return null;
}
- if (model.equals("Chromecast Audio")) {
- return THING_TYPE_AUDIO;
- } else if (model.equals("Google Cast Group")) {
- return THING_TYPE_AUDIOGROUP;
- } else {
- return THING_TYPE_CHROMECAST;
+ switch (model) {
+ case "Chromecast Audio":
+ return THING_TYPE_AUDIO;
+ case "Google Cast Group":
+ return THING_TYPE_AUDIOGROUP;
+ default:
+ return THING_TYPE_CHROMECAST;
}
}
playURLActionDescription = Plays a URL.
playURLTypeActionLabel = play a URL with a media type
-playURLTypeActionDescription = Plays a URL with a defined media type attribute.
\ No newline at end of file
+playURLTypeActionDescription = Plays a URL with a defined media type attribute.
You can also manually configure your air unit in case you don't want to use autodiscovery
(e. g. if you want to have a portable configuration):
-Create a new file, e. g. `danfoss.things`, in your _things_ configuration folder:
+Create a new file, e. g. `danfoss.things`, in your _things_ configuration folder:
+
```
Thing danfossairunit:airunit:myairunit [host="192.168.0.7",
refreshInterval=5,
Selection item=Lueftung_Mode mappings=[DEMAND="Bedarfslüftung", OFF="Aus", PROGRAM="Programm", MANUAL="manuell"]
Switch item=Lueftung_Boost
Switch item=Lueftung_Bypass
-```
\ No newline at end of file
+```
import java.net.InterfaceAddress;
import java.net.NetworkInterface;
import java.net.SocketTimeoutException;
-import java.util.*;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.config.discovery.AbstractDiscoveryService;
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<features name="org.openhab.binding.haywardomnilogic-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
+ <repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
+
+ <feature name="openhab-binding-haywardomnilogic" description="Hayward OmniLogic Binding" version="${project.version}">
+ <feature>openhab-runtime-base</feature>
+ <bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.haywardomnilogic/${project.version}</bundle>
+ </feature>
+</features>
The binding tries to detect and maintain the correct state, but due to device limitations this is not always possible.
Make sure the receiver's and binding's state are in sync when OH is restarted (binding assumes state is OFF).
- Channels receiving event information get updated when changing the channel or playing a video.
+
There is no way to read the current status, therefore they don't get initialized on startup nor being updated in real-time.
The player channel supports the following actions:
to switch it off.
-After an openHAB restart you need to make sure that OH and receiver are in sync, because the binding can't read the power status at startup.
\ No newline at end of file
+After an openHAB restart you need to make sure that OH and receiver are in sync, because the binding can't read the power status at startup.
MagentaTVDevice dev = deviceList.get(udn.toUpperCase());
return dev.properties;
}
- if (deviceList.size() > 0) {
+ if (!deviceList.isEmpty()) {
logger.debug("getDiscoveredProperties(): Unknown UDN: {}", udn);
}
return null;
if (method.equals(HttpMethod.POST)) {
fillPostData(request, data);
}
- if (cookies.size() > 0) {
+ if (!cookies.isEmpty()) {
// Add cookies
String cookieValue = "";
for (HttpCookie c : cookies) {
channel-type.magentatv.key.command.option.IPTV = IPTV
channel-type.magentatv.key.command.option.PIP = PIP
channel-type.magentatv.key.command.option.MULTIVIEW = Multi View
-
\ No newline at end of file
<representation-property>macAddress</representation-property>
- <config-description uri="thing-type:magentatv:receiver">
+ <config-description>
<parameter name="ipAddress" type="text" required="true">
<label>Device IP Address</label>
<description>IP address of the receiver</description>
| Yemen | YE | sg |
| Zambia | ZM | sg |
| Zimbabwe | ZW | sg |
-| Åland Islands | AX | de |
\ No newline at end of file
+| Åland Islands | AX | de |
|communicationState | Shows the communication status to Paradox. Different from Bridge status. Bridge may be online and able to receive commands but communication may be offline due to various reasons. Possible values [Offline, Online] |
#### Communication command channel allowed values
+
| Value | Description |
|--------|------------------------------------------------------------------------------------|
| LOGOUT | Logs out and disconnects from Paradox alarm system |
| disarmEnabled | Optional boolean flag. Valid for partitions. When set to true the command DISARM will be allowed for the partition where the flag is enabled. CAUTION: Enabling DISARM command can be dangerous. If attacker can gain access to your openHAB (via API or UI), this command can be used to disarm your armed partition (area) |
### Panel channels:
+
| Channel | Type | Description |
|--------------------------|----------------------------|-------------------------------------------------------------------------------------------|
| state | String | Overall panel state |
}
}
```
+
## Acknowledgements
+
This binding would not be possible without the reverse engineering of the byte level protocol and the development by other authors in python, C# and other languages. Many thanks to the following authors and their respective GitHub repositories for their development that helped in creating this binding:
João Paulo Barraca - https://github.com/ParadoxAlarmInterface/pai
Jean Henning - repository not available
-Tertuish - https://github.com/Tertiush/ParadoxIP150v2 / https://github.com/Tertiush/ParadoxIP150
\ No newline at end of file
+Tertuish - https://github.com/Tertiush/ParadoxIP150v2 / https://github.com/Tertiush/ParadoxIP150
Default item=SenecLiveGridExport
}
}
-```
\ No newline at end of file
+```
Bridge somfymylink:mylink:mylink1 "myLink Bridge" @ "Office" [ ipAddress="192.168.1.1", systemId="mysystemidhere" ] {
Thing shade shade1 "Living Room" [ targetId="CC114A21.1" ]
}
-```
\ No newline at end of file
+```
*/
package org.openhab.binding.somfymylink.internal.handler;
-import static org.openhab.binding.somfymylink.internal.SomfyMyLinkBindingConstants.*;
+import static org.openhab.binding.somfymylink.internal.SomfyMyLinkBindingConstants.CHANNEL_SCENES;
import java.io.BufferedReader;
import java.io.IOException;
import java.net.Socket;
import java.net.SocketTimeoutException;
import java.nio.charset.StandardCharsets;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
SomfyMyLinkCommandShadePing command = new SomfyMyLinkCommandShadePing(config.systemId);
sendCommandWithResponse(command, SomfyMyLinkPingResponse.class).get();
updateStatus(ThingStatus.ONLINE);
-
} catch (SomfyMyLinkException | InterruptedException | ExecutionException e) {
logger.warn("Problem with mylink during heartbeat: {}", e.getMessage());
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, e.getMessage());
Writer out = new OutputStreamWriter(socket.getOutputStream(), StandardCharsets.US_ASCII);
BufferedReader in = new BufferedReader(
new InputStreamReader(socket.getInputStream(), StandardCharsets.US_ASCII))) {
-
// send the command
logger.debug("Sending: {}", json);
out.write(json);
telegramAction.sendTelegramAnswer(telegramReplyId.state.toString, "Ok, I'll leave them *on*.")
}
end
-```
\ No newline at end of file
+```
LED_1_program.sendCommand(99)
LED_1_preset_23.sendCommand(OFF)
end
-```
\ No newline at end of file
+```
import org.openhab.binding.wifiled.internal.configuration.WiFiLEDConfig;
import org.openhab.binding.wifiled.internal.handler.AbstractWiFiLEDDriver.Driver;
import org.openhab.binding.wifiled.internal.handler.AbstractWiFiLEDDriver.Protocol;
-import org.openhab.core.library.types.*;
+import org.openhab.core.library.types.HSBType;
+import org.openhab.core.library.types.IncreaseDecreaseType;
+import org.openhab.core.library.types.OnOffType;
+import org.openhab.core.library.types.PercentType;
+import org.openhab.core.library.types.StringType;
import org.openhab.core.thing.ChannelUID;
import org.openhab.core.thing.Thing;
import org.openhab.core.thing.ThingStatus;
Number cooler_cool_thrs "Cooler Cool Threshold Temp [%.1f C]" (gCooler) {homekit="CoolingThresholdTemperature" [minValue=10.5, maxValue=50]}
Number cooler_heat_thrs "Cooler Heat Threshold Temp [%.1f C]" (gCooler) {homekit="HeatingThresholdTemperature" [minValue=0.5, maxValue=20]}
```
+
## Additional Notes
HomeKit allows only a single pairing to be established with the bridge.
## Troubleshooting
### openHAB is not listed in home app
+
if you don't see openHAB in the home app, probably multicast DNS (mDNS) traffic is not routed correctly from openHAB to home app device or openHAB is already in paired state.
You can verify this with [Discovery DNS iOS app](https://apps.apple.com/us/app/discovery-dns-sd-browser/id305441017) as follow:
- verify the flag "sf".
- if sf is equal 1, openHAB is accepting pairing from new iOS device.
- if sf is equal 0 (as on screenshot), openHAB is already paired and does not accept any new pairing request. you can reset pairing using `openhab:homekit clearPairings` command in karaf console.
-- if you see openHAB bridge and sf is equal 1 but you dont see openHAB in home app, probably you home app still think it is already paired with openHAB. remove your home from home app and restart iOS device.
\ No newline at end of file
+- if you see openHAB bridge and sf is equal 1 but you dont see openHAB in home app, probably you home app still think it is already paired with openHAB. remove your home from home app and restart iOS device.
import static org.openhab.io.homekit.internal.HomekitCharacteristicType.*;
import java.lang.reflect.InvocationTargetException;
-import java.util.*;
import java.util.AbstractMap.SimpleEntry;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import java.util.Map.Entry;
+import java.util.Objects;
+import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* creates HomeKit accessory for a openhab item.
- *
+ *
* @param taggedItem openhab item tagged as HomeKit item
* @param metadataRegistry openhab metadata registry required to get item meta information
* @param updater OH HomeKit update class that ensure the status sync between OH item and corresponding HomeKit
/**
* return HomeKit accessory types for a OH item based on meta data
- *
+ *
* @param item OH item
* @param metadataRegistry meta data registry
* @return list of HomeKit accessory types and characteristics.
/**
* return list of HomeKit relevant groups linked to an accessory
- *
+ *
* @param item OH item
* @param itemRegistry item registry
* @param metadataRegistry metadata registry
/**
* collect all mandatory characteristics for a given tagged item, e.g. collect all mandatory HomeKit items from a
* GroupItem
- *
+ *
* @param taggedItem HomeKit tagged item
* @param metadataRegistry meta data registry
* @return list of mandatory
/**
* collect optional HomeKit characteristics for a OH item.
- *
+ *
* @param taggedItem main OH item
* @param metadataRegistry OH metadata registry
* @return a map with characteristics and corresponding OH items
/**
* return true is characteristic is a mandatory characteristic for the accessory.
- *
+ *
* @param accessory accessory
* @param characteristic characteristic
* @return true if characteristic is mandatory, false if not mandatory
/**
* check whether accessory is root accessory, i.e. without characteristic tag.
- *
+ *
* @param accessory accessory
* @return true if accessory has not characteristic.
*/
import io.github.hapjava.characteristics.impl.common.StatusFaultEnum;
import io.github.hapjava.characteristics.impl.common.StatusTamperedCharacteristic;
import io.github.hapjava.characteristics.impl.common.StatusTamperedEnum;
-import io.github.hapjava.characteristics.impl.fan.*;
+import io.github.hapjava.characteristics.impl.fan.CurrentFanStateCharacteristic;
+import io.github.hapjava.characteristics.impl.fan.CurrentFanStateEnum;
+import io.github.hapjava.characteristics.impl.fan.LockPhysicalControlsCharacteristic;
+import io.github.hapjava.characteristics.impl.fan.LockPhysicalControlsEnum;
+import io.github.hapjava.characteristics.impl.fan.RotationDirectionCharacteristic;
+import io.github.hapjava.characteristics.impl.fan.RotationDirectionEnum;
+import io.github.hapjava.characteristics.impl.fan.RotationSpeedCharacteristic;
+import io.github.hapjava.characteristics.impl.fan.SwingModeCharacteristic;
+import io.github.hapjava.characteristics.impl.fan.SwingModeEnum;
+import io.github.hapjava.characteristics.impl.fan.TargetFanStateCharacteristic;
+import io.github.hapjava.characteristics.impl.fan.TargetFanStateEnum;
import io.github.hapjava.characteristics.impl.lightbulb.BrightnessCharacteristic;
import io.github.hapjava.characteristics.impl.lightbulb.ColorTemperatureCharacteristic;
import io.github.hapjava.characteristics.impl.lightbulb.HueCharacteristic;
{::options toc_levels="2..4"/}
- TOC
+
{:toc}
## Prerequisites
-DDYNAMODBTEST_REGION=REGION-ID
-DDYNAMODBTEST_ACCESS=ACCESS-KEY
-DDYNAMODBTEST_SECRET=SECRET
-````
\ No newline at end of file
+````
If you have a username and password it looks like this: url = mongodb://[username]:[password]@[localhost]:27017/[database]
The database is required: http://mongodb.github.io/mongo-java-driver/3.9/javadoc/com/mongodb/MongoClientURI.html
-All item and event related configuration is done in the file `persistence/mongodb.persist`.
\ No newline at end of file
+All item and event related configuration is done in the file `persistence/mongodb.persist`.