openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.69k forks source link

MiOS Binding - Tracking last used pin on locks #3317

Closed silencery closed 8 years ago

silencery commented 9 years ago

I'd like to see if there is a method to obtain the last used pin on a door lock (Specifically, in my case, i'm using a Schlage BE469)?

Vera reports this as sl_UserCode service ID. For instance: <state id="80" service="urn:micasaverde-com:serviceId:DoorLock1" variable="sl_UserCode" value="UserID="1" UserName="John""/>

Using the item file generator out of the box, the sl_UserCode is set as a number by default, which is the wrong datatype in my case. Updating the item to string is the first step. However, after taking this first step, some transformation still needs to be done since the default output is not really usable. With the preceding example, the item value would look like this:

UserID="1" UserName="John"

Any suggestions on capturing either just the UserID or Username?

mrguessed commented 9 years ago

@silencery, The bug part of this is that the MiOS Item Generator is using Number instead of String... when it's a String value in the MiOS source material (an encoded one)

The "what to do" part of this should be opened as a discussion on http://community.openhab.org, since a straight "it's a String" will only fix the immediate issue.

Likely it'll need a REGEX to pull out the UserID and UserName parts, and it seems like the Item Generator should do that, but let's use the Community forum to have that part of the discussion.

Original MiOS Discussion: http://forum.micasaverde.com/index.php/topic,34125.0.html

mrguessed commented 9 years ago

@teichsta, Can you assign this to me? I won't be able to do it for a week or so, but I don't have permissions to self-assign issues from the openHAB repo.

teichsta commented 9 years ago

sure :-) thanks for taking over!

mrguessed commented 8 years ago

@teichsta, This bug can be closed, the base merge has the necessary fixes. If you grant me access, I'll close it (and close issues in my space and/or some agreed upon set)

mrguessed commented 8 years ago

This issue was fixed by the base PR #3377