I use a number of these modified contact sensors as switches.
So I've created a contact sensor driver which can also be used as a switch.
Although I made it for the Foxx Project contact I'm sure it can work with the Aeon contact sensor along with many other Z-Wave contact sensors
You have the ability within the driver settings to configure the switch to be on when the contact is open or closed.
Awesome!!
I used a self-modified version of @krlaframboise contact sensor driver... but it had a bunch of states that I didn't need for my application (power detection). I didn't have the time to sort through this code and remove the unnecessary parts. This looks like exactly what I need. Many Thanks!
Works perfectly...but...it didn't report on/off until I manually hit the off button in the driver.
I've had this issue with one of my drivers in the past...I didn't have my logs open to verify this is the same issue but something tells me there was an error regarding a null value for the attribute until I manually set it.
You may need to add the configure capability that creates a default on off state. This can be called from the install/update methods if not already there...buy also let's the user manually call it by hitting configure.
Just a suggested "feature" for a great driver. Thanks again for this.
Just found this driver and it's just what I needed for use with the Aeotec Dry Contact Sensor since it reports what I consider to be reversed information in the standard driver. (ie ...it shows open if the circuit is shorted and closed if it is open) My question/issue is about the switch state reporting and may possibly have to do with what @stephack mentioned above. I noticed the switch state only changes if I hit the button in the driver. It never changes with the contact state. Am I missing something in how I'm thinking this feature is used?
The driver was originally modified to work with a Foxx Project door contact
Then I found out that the same driver is used for a number of Aeon devices.
However, it's not but on the configuration side.
I would install you device using the standard built-in driver.
Then save and click 'Configure'
This should send the correct commands to the device to configure itself.
After about a minute or so you can change the driver to mine and save
Now.. this is where it works or doesn't'
You need to click all the buttons (open/close/on/off etc) toggling them on/off with about 10 seconds between toggles. - Also toggle the reverse switches before saving again
After that try using the open/close magnet on the device to see if it works (may take a couple of goes before it works.
If everything is ok, then at that point when the sensor is opened/closed it should change all the other attributes.
If not... then I'm afraid the driver will not work with your device .
Got it! Thanks for the response. I don't actually need the switch functionality so it may yet work for me anyway. I will do as you suggest though and test that out.