| roller shutter, screen, venetian blind, garage door, awning, pergola, curtain | control | device controller which reacts to commands UP/DOWN/ON/OFF/OPEN/CLOSE/MY/STOP + closure 0-100 |
| window | control | device controller which reacts to commands UP/DOWN/ON/OFF/OPEN/CLOSE/STOP + closure 0-100 |
| silent roller shutter | silent_control | similar to control channel but in silent mode |
-| venetian blind, adjustable slats roller shutter, bioclimatic pergola | orientation | percentual orientation of the blind's slats, it can have value 0-100. For IO Homecontrol devices only (non RTS) |
+| venetian blind, adjustable slats roller shutter, bioclimatic pergola | orientation | percentual orientation of the blind's slats, it can have value 0-100. For IO Homecontrol devices only (non RTS) |
| venetian blind, adjustable slats roller shutter | closure_orientation | percentual closure and orientation of the blind's slats, it can have value 0-100. For IO Homecontrol devices only (non RTS) |
| adjustable slats roller shutter | rocker | used for setting the rocker position of the roller shutter, the only position allowing the slats control |
| bioclimatic pergola | slats | slats state (open/closed) |
### Remarks
-All things which have a RSSI (relative received signal) state, expose a channel "rssi".
+All things which have a RSSI (received signal strength indication) state, expose a channel "rssi".
When a roller shutter-like thing receives STOP command, there are two possible behaviours
import org.openhab.core.thing.binding.BaseThingHandler;
import org.openhab.core.thing.binding.builder.ChannelBuilder;
import org.openhab.core.thing.binding.builder.ThingBuilder;
+import org.openhab.core.thing.type.ChannelTypeUID;
import org.openhab.core.types.Command;
import org.openhab.core.types.RefreshType;
import org.openhab.core.types.State;
private void createRSSIChannel() {
if (thing.getChannel(RSSI) == null) {
logger.debug("{} Creating a rssi channel", url);
- createChannel(RSSI, "Number", "RSSI Level");
+ ChannelTypeUID rssi = new ChannelTypeUID(BINDING_ID, "rssi");
+ createChannel(RSSI, "Number", "RSSI Level", rssi);
}
}
- private void createChannel(String name, String type, String label) {
+ private void createChannel(String name, String type, String label, ChannelTypeUID channelType) {
ThingBuilder thingBuilder = editThing();
- Channel channel = ChannelBuilder.create(new ChannelUID(thing.getUID(), name), type).withLabel(label).build();
+ Channel channel = ChannelBuilder.create(new ChannelUID(thing.getUID(), name), type).withLabel(label)
+ .withType(channelType).build();
thingBuilder.withChannel(channel);
updateThing(thingBuilder.build());
}
Map<String, String> properties = new HashMap<>();
for (SomfyTahomaState state : states) {
logger.trace("{} processing state: {} with value: {}", url, state.getName(), state.getValue());
- properties.put(state.getName(), state.getValue().toString());
+ properties.put(state.getName(), TYPE_NONE != state.getType() ? state.getValue().toString() : "");
if (RSSI_LEVEL_STATE.equals(state.getName())) {
// RSSI channel is a dynamic one
updateRSSIChannel(state);