This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
Flows Z-Wave

Need homey to see a generic Z-wave contact as a door lock

edited March 2018 in Questions & Help
Here is my situation. I do not have an electronic door lock. I cannot install one because of the way my door is made (you have to pull up the handle which mechanically locks two additional bolts before you can turn the key). So I have to do some home made stuff and I thought the Homey would be just the right thing to support that without having to program stuff.

I have builtin a reed switch in the door frame and put a small magnet on the door bolt. This way I can see if the door is locked and avoid getting out of the car or out of bed to pull the handle when the wife asks "Are you sure you locked the door?"

To get the state of the reed relay I have hardware hacked a small Aeotec Door / Window Sensor Gen5 ZW120 so it detects the reed sensor in the door frame instead of the one in the sensor.

I have added this sensor to Homey. It is not supported by the Aeotec app but it appears fine as a Generic Z-wave device and it correctly detects when I lock and unlock the door.

I named the sensor "Lock" and put it in the Front Door group where I also have some hue lights inside and outside.

Now the trouble starts where I need help.

I have linked Homey with Amazon Alexa and installed the Homey skills.

If I ask "Alexa, ask Homey what is the status of the Front Door Lock?" I get the answer that I do not seem to have a door lock installed.
If I try to create my first flow and want to use the word "Lock" I am warned that this is already used.

There seem to be some built-in feature in Homey that reserves the word "Lock" in a way that I cannot relate this to a generic Z-wave device.

So I renamed the sensor to "Banana". I assumed that noone in Athom had added a default Banana device.

And yes. "Alexa, Ask Homey what is the status of the front door banana?" and Alexa correctly tells me "Banana is being switched on/off". Hurray. I am far

So the question is:

How do I get Homey (and Alexa) to accept my Banana as a Lock?

Or in more generic terms. How do I get Homey to see a generic Z-wave sensor as a specific kind of device like a lock?

(I am a newbie so I would appreciate a detailed how to, or even better a good written reference so I can learn how to do it)
Tagged:

Comments

  • edited March 2018
    Follow up. I tried to rename the Banana to Bolt. Front door bolt - not too bad.

    It does not work. Alexa says that Homey did not provide an answer. Then I changed it to "Kiwi". Does not work. Back to "Banana". That works. Lock, Bolt, Kiwi does not work. Banana does work. I am confused.

    UPDATE: OK, the alexa log shows that it is Alexa that does not understand bolt or kiwi. Kiwi becomes Key We and bolt becomes boat. I can see that in the History undet Settings in the Alexa App. So ignore that update. That is an Alexa problem in combination with my Danish accent.

    Bolt works when pronounced right (longer o sound). Lock does not. Original question still open. How do I get the generic Z-wave device defined as a sensor which is a Lock?
  • Make an app for it or add it to the aeotec app (or let it be added) 
  • That was not a very nice reply

    My question was "How do I setup a generic Z-wave device to appear as a lock?"

    And then you answer - make an app = program it yourself.

    I do not know how to program Javascript. Is it only programmers that are welcome on this forum? Is the Homey only for people that can program Javascript? Then I should have gone the Home Assistant or OpenHab route. I bought the Homey because it was advertised as having a user friendly user interface that is easy to setup.

    Is the real answer that this is not possible (without programming the whole thing myself)?

    How are other people working around this? It cannot be a very unique thing buying a Z-wave sensor and wanting it to be a door or window. I cannot believe they all call them Banana and Strawberry.
  • That's not what @lubbertkramer said. If you have a device which is not supported, let it be added (assuming you can't do that yourself, like 95% of the users can't do themselves). That's what Github is for then as a list of things Athom should do  : https://github.com/athombv/com.aeotec/issues/87 and you already added your comment there. What's not nice about the reply?
  • The generic answer that you can go and program it yourself. It appears  (at least to me) as very rude to assume everyone can program in Javascript or program at all. You should never give that reply to any question unless you are communicating programmer to programmer.

    The other is that the answer did not at all respond to the real subject of the question.
    Even if the device I am using will be added to the Aeotec app it will not resolve the issue. It will be presenting itself as a door or window sensor which can be open or closed. It will still not be a lock because as I understand it Homey thinks a lock is a thing that it can lock and unluck, and get the locked status from. What I am doing can never be that. It is a sensor that I have put inside the lock that can sense if the door is locked.

    The device works. It sends the status and I can work with it if I call it banana.

    My question is if there is anyway I can work around the issue so I can query if the door is locked?

    Can I change some of the advanced settings of the device?
    Can I do it with flows?
    Can I do something with some of the Apps available in the app store?

    I am sure it would help not only me but many that have ideas how to use a Z-wave device that is either generic, or meant for something else.

    (PS I can program a little in C in Arduino and some experience with Perl. But I have never written a line of code in Javascript. I am a hardware guy and a total geek when it comes to hardware and work with RF technology professionally. Ping me if you have a hardware question)
  • lubbertkramerlubbertkramer Member
    edited March 2018
    Not a rude answer but a short one because your answer could be found when after reading the forum rules which suggest to search before you open up a topic.  When the answer would not be on the forum already i would have made a longer reply but in many topics about z-wave/zigbee you find that the capabilities of the device need to be defined in an app. So just like a stated when you can't you need to find a developer to do it for you but there are many examples on this forum where people that are no programmer now make Homey apps or improve them

    Edit:
    Just like you already did before opening up this topic as can be seen here
  • But I still have no answer to my question

    And I have searched the forum and found no answer to my question. I searched for hours.

    The question is still open and unanswered

    How would you use a device which is not a door lock as a door lock sensor? Any cool ideas to work around it? If you take the time to read my original question you will understand the background. I do not expect anyone to write an app that turns a window sensor into a lock. If we go that route we can write hundreds of apps to pretend that a sensor is all sorts of other things.

    Maybe even a IFTTT work around would work as a work around Think. Wife wants to ask Alexa or Google Home. Is the door locked. And Homey answers back “the door is locked”. It seems to be nearly there with the flow engine. I just cannot get around that somewhere in the middle Homey refuse to let me interpret a sensor as a door lock sensor. 

    There must be some creative minds that can share ideas (in the best spirit of the forum rules)
  • For as far i know, it isnt possible what you want. 
  • LurendrejerLurendrejer Member
    edited March 2018
    You might brug able to map the sensor to a virtual device via a single flow.

    Try the virtual device app from the app store. I don't use it myself.

    Have a nice day :)
  • Lurendrejer
    You are a genius 
    Yes. That was the hint I needed.
    I am not sure if I did it the perfect way but here is the description of what works
    1. Installed the Virtual App
    2. Added a new device which is a Virtual Device
    3. Chose Device > Name Lock > Class Lock > Chose Locked (not sure if the other would have worked) > Add Device

    Now I have a lock and I can ask Alexa what is the Status of the Front Door Lock.

    Now we need to sync it with the generic Z-wave device. I am not sure if this is the best way but it was the way I could figure out

    Create two flows. One for locked and one for unlocked.

    Trigger is the Generic device on (off) and THEN is the newly added lock locked or unlocked.

    Then you need to change the physical lock once to get them in sync.

    Voila! It works.

    Thank you thank you
  • LurendrejerLurendrejer Member
    edited March 2018
    Great to hear.
    I prefer to keep stuff in sync with 'logic+tag' and a 'and+tag' - because it keeps me from having two flows (on+off).

    /Mobile 
  • LurendrejerLurendrejer Member
    edited March 2018
    Ex. If 'tag(sensor1) changed and sensor1=on then 'action' else ''opposite action'

    /Mobile.
  • edited March 2018
    Thanks,  Just for the learning experience I want to try that.

    Just watched the video about tags. On my device, which is a generic Z-wave sensor, there is no little green tag. So it does not look like a simple thing unless there are default tags assigned to any device that one can use

    EDIT: Found it. Tags menu at the top. I will report back when I have learned more (so other newbies can learn from it)
  • LurendrejerLurendrejer Member
    edited March 2018
    You can find all the tags in the flow editor, by pressing the tag button :)

    /Mobile
  • Hi
    Remember, my need was resolved! I am just learning alternative ways now.

    I was never able to get a flow to work using the tags. The device presents a tag called Contact Alarm but
    - If I use it in an action Logic A Variable Changed and put the Contact Alarm in it then nothing is triggered except the actual sensor turns a white LED on.
    - If I use the actual sensor as trigger then there is no Change feature of any of the windows sensors I have. They trigger either on or off, so you can not test for on or off.
    - And if I put a logic box in the AND column I cannot put the "Contact Alarm" tag in the condition. I can only put it as a value. 

    I do not understand how you would do this. And I really do not understand the tag feature at all yet other than the simple example in the documentation. This feature really lags better documentation. I can see that there is some material to read in forum posts so that is what I will do next. I have also found a Swedish group that seem to share a lot of Homey info and I read Swedish.

    I'd gladly take more education here but I do not expect any more. I have the feature to work with two simple flows.
  • I think this thread is turning into a flow thread so I will moderate myself. I think it is not possible to make a single flow solution unless the device has a change feature. When I got something hooked up that looked at a value changing it started monitoring the battery of the sensor keeping its LED on. I am sure its battery will be drained in days like that. It has to be a changed pushed from the sensor.

    On the AND part. The issue is that the tag I tried to test is a bool. And I tried to add it to an "is equal to" assuming I would have to write its value "No" or "Yes". But it refuses - you have to pick the "is true/is false" card.

    Unless someone has a really slick solution smarter than mine I guess this thread can end here. Thanks again for the hints. They helped a lot
  • You might be right
    I think I came to the same conclusion - devices needs a ''change card'.

    Sorry ,

    mobile
Sign In or Register to comment.