Amazon Alexa SmartHome Skill - Lockstate - Lock

Hello there,

Linux openhabian 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64
openHAB 3.4.3 - Release Build
installed on SD Card

I have a problem with the datatype from the amazon alexa smarthome skill.

I’ve purchased an electrical lock for the door (Homematic IP).
The Doorlock is working perfectly with the Homematic IP Binding. → I am using Rasperrymatic aswell.

I saw, that the Skill for Alexa is supporting door locks.
So I tried to implement the Thing into Alexa.

The doorlock has a channel called “target lock level” which gives feedback to me on the actual state and I can control it via this channel.

The data type is “String”.
If I look into the documentation from the Alexa SmartHome Skill, the data type for Alexa is a Switch.

With datatype String the Alexa App cannot find my Item → If I configure it as a Switch it is recognized instantly from the Alexa App.
The problem is, that it is not controllable then → cause the lock requires String.
I’ve tried different datatypes for try and error → contact, switch, string, dimmer, etc.
Of course, the testing is not practical, but try and error helps sometimes :slight_smile:

My goal is to create a functional item for the Alexa app.

Has someone any idea?

Greetings

Expose a proxy switch item to Alexa and use rules to synchronize the switch with the string.

  • When the proxy item receives a command (from or an openHAB UI or Alexa), send the appropriate command to your string item.
  • When the string item changes (because you unlocked the door), post an update to the proxy item to update Alexa.

Make sure that you don’t accidentally create an endless loop.

2 Likes

that worked, thanks for that hint ! =)