- *Outdoor Camera / Presence*. Reports last event, consult picture and video from event/camera.
- *Doorbell*
- *Smoke Detector*
+- *Smart Door Sensor*
See https://www.netatmo.com/ for details on their product.
| thermostat | Thing | NATherm1 | The Thermostat device placed in a given room. | id |
| room | Thing | NARoom | A room in your house. | id |
| valve | Thing | NRV | A valve controlling a radiator. | id |
+| tag | Thing | NACamDoorTag | A door / window sensor | id |
| battery | low-battery | Switch | Read-only | Low battery |
+**Supported channels for the Door Tag thing:**
+
+| Channel Group | Channel ID | Item Type | Read/Write | Description |
+|---------------|-------------------|--------------|------------|------------------------------------------------------|
+| tag | status | Contact | Read-only | Status of tag (OPEN,CLOSED) |
+| signal | strength | Number | Read-only | Signal strength (0 for no signal, 1 for weak...) |
+| signal | value | Number:Power | Read-only | Signal strength in dBm |
+| timestamp | last-seen | DateTime | Read-only | Last time the module reported its presence |
+| battery | value | Number | Read-only | Battery level |
+| battery | low-battery | Switch | Read-only | Low battery |
+
### Welcome Person
Netatmo API distinguishes two kinds of persons:
public static final String GROUP_PRESENCE = "presence";
public static final String GROUP_SIREN = "siren";
public static final String GROUP_PERSON = "person";
+ public static final String GROUP_TAG = "tag";
public static final String GROUP_PROPERTIES = "properties";
public static final String GROUP_SETPOINT = "setpoint";
public static final String GROUP_LOCATION = "location";
import org.openhab.binding.netatmo.internal.handler.channelhelper.AirQualityChannelHelper;
import org.openhab.binding.netatmo.internal.handler.channelhelper.ApiBridgeChannelHelper;
import org.openhab.binding.netatmo.internal.handler.channelhelper.CameraChannelHelper;
+import org.openhab.binding.netatmo.internal.handler.channelhelper.DoorTagChannelHelper;
import org.openhab.binding.netatmo.internal.handler.channelhelper.EnergyChannelHelper;
import org.openhab.binding.netatmo.internal.handler.channelhelper.EventChannelHelper;
import org.openhab.binding.netatmo.internal.handler.channelhelper.EventDoorbellChannelHelper;
ChannelGroup.SIGNAL, ChannelGroup.EVENT,
new ChannelGroup(CameraChannelHelper.class, GROUP_CAM_STATUS, GROUP_CAM_LIVE)),
+ TAG(FeatureArea.SECURITY, "NACamDoorTag", WELCOME, Set.of(ChannelHelperCapability.class), ChannelGroup.SIGNAL,
+ ChannelGroup.BATTERY, ChannelGroup.TIMESTAMP, new ChannelGroup(DoorTagChannelHelper.class, GROUP_TAG)),
+
SIREN(FeatureArea.SECURITY, "NIS", WELCOME, Set.of(ChannelHelperCapability.class), ChannelGroup.SIGNAL,
ChannelGroup.BATTERY, ChannelGroup.TIMESTAMP, new ChannelGroup(SirenChannelHelper.class, GROUP_SIREN)),
--- /dev/null
+/**
+ * Copyright (c) 2010-2022 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.openhab.binding.netatmo.internal.handler.channelhelper;
+
+import static org.openhab.binding.netatmo.internal.NetatmoBindingConstants.CHANNEL_STATUS;
+
+import java.util.Set;
+
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.jdt.annotation.Nullable;
+import org.openhab.binding.netatmo.internal.api.dto.HomeStatusModule;
+import org.openhab.binding.netatmo.internal.api.dto.NAThing;
+import org.openhab.core.config.core.Configuration;
+import org.openhab.core.library.types.OpenClosedType;
+import org.openhab.core.types.State;
+import org.openhab.core.types.UnDefType;
+
+/**
+ * The {@link DoorTagChannelHelper} handles channels of door sensor things.
+ *
+ * @author Gaël L'hopital - Initial contribution
+ *
+ */
+@NonNullByDefault
+public class DoorTagChannelHelper extends ChannelHelper {
+
+ public DoorTagChannelHelper(Set<String> providedGroups) {
+ super(providedGroups);
+ }
+
+ @Override
+ protected @Nullable State internalGetProperty(String channelId, NAThing naThing, Configuration config) {
+ if (naThing instanceof HomeStatusModule) {
+ HomeStatusModule doorTag = (HomeStatusModule) naThing;
+ if (CHANNEL_STATUS.equalsIgnoreCase(channelId)) {
+ return doorTag.getStatus().map(status -> (State) OpenClosedType.valueOf(status.toUpperCase()))
+ .orElse(UnDefType.UNDEF);
+ }
+ }
+ return null;
+ }
+}
channel-group-type.netatmo.sub-event-doorbell.channel.vignette.description = Vignette of the Snapshot.
channel-group-type.netatmo.sub-event-doorbell.channel.vignette-url.label = Vignette URL
channel-group-type.netatmo.sub-event-doorbell.channel.vignette-url.description = URL of the vignette.
+channel-group-type.netatmo.tag.label = Door Tag
channel-group-type.netatmo.temperature-extended.label = Temperature
channel-group-type.netatmo.temperature-extended.channel.max-time.label = Today Max Timestamp
channel-group-type.netatmo.temperature-extended.channel.max-time.description = Moment when temperature was measured at its maximum today.
channel-type.netatmo.siren-status.description = Status of the siren
channel-type.netatmo.siren-status.state.option.no_sound = Silent
channel-type.netatmo.siren-status.state.option.sound = Alarm
+channel-type.netatmo.tag-status.label = Door Status
channel-type.netatmo.th-mode.label = Thermostat Mode
channel-type.netatmo.th-mode.description = Chosen thermostat mode (home, frost guard, manual, max).
channel-type.netatmo.th-mode.state.option.HOME = Home
thing-type.netatmo.account.description = This bridge represents an account, gateway to Netatmo API.
thing-type.netatmo.doorbell.label = Smart Video Doorbell
thing-type.netatmo.doorbell.description = The Netatmo Smart Video Doorbell device.
+thing-type.netatmo.tag.label = Smart Door Sensor
+thing-type.netatmo.tag.description = The Netatmo Smart Door or Window sensor.
thing-type.netatmo.home-coach.label = Healthy Home Coach
thing-type.netatmo.home-coach.description = Healthy home coach reporting health-index, temperature, humidity, pressure, air quality and sound level.
thing-type.netatmo.home.label = Home
<state readOnly="true"/>
</channel-type>
+ <channel-type id="tag-status">
+ <item-type>Contact</item-type>
+ <label>Door Status</label>
+ <category>Door</category>
+ <state readOnly="true"/>
+ </channel-type>
+
<channel-type id="anticipating-heating">
<item-type>Switch</item-type>
<label>Anticipated Heating</label>
</channels>
</channel-group-type>
+ <channel-group-type id="tag">
+ <label>Door Tag</label>
+ <channels>
+ <channel id="status" typeId="tag-status"/>
+ </channels>
+ </channel-group-type>
+
<channel-group-type id="presence">
<label>Presence Camera</label>
<channels>