[Solved] MiOS Binding - Motion Detector Always Uninitialised

I’m running OH v1.7.1 using the MiOS binding to talk to my Veralite (UI5). I’m having issues with capturing movement via the motion detectors trigger. OH allows me to arm and disarm all of them both manually and via rules, but I NEVER get any response when motion is detected.

{
type: "ContactItem",
name: "Sensor_GF_Snug_Motion",
state: "Uninitialized",
link: "https://xxxxxxxxxxxxxxxxxxx:8443/rest/items/Sensor_GF_Snug_Motion"
}

I can see they are tripped in the Vera UI5 interface, but OH just sits there with an ‘Uninitialised’ or ‘Unknown’ message. I have 2x Aeon Multi-sensor and 1x EZMotion+ 3-in-1.

I’m guessing that the problem is in my OH item definition, but I can’t see it….

Aeons:

Contact Sensor_GF_Snug_Motion  "Motion [MAP(miosMotionIn.map):%s]”  <lock>  (GF_Snug, Security, Sensors)          {mios="unit:house,device:83/service/SecuritySensor1/Tripped,in:MAP(miosMotionIn.map)"}
Contact Sensor_FF_Master_Motion  "Motion [MAP(miosMotionIn.map):%s]”  <lock>  (FF_Master, Security, Sensors)          {mios="unit:house,device:89/service/SecuritySensor1/Tripped,in:MAP(miosMotionIn.map)"}

EZMotion

Contact Sensor_GF_Kitchen_Motion  "Motion [MAP(miosMotionIn.map):%s]”  <lock>  (GF_Kitchen, Security, Sensors)          {mios="unit:house,device:94/service/SecuritySensor1/Tripped,in:MAP(miosMotionIn.map)"}

Can anyone suggest a solution - this is now getting boring :frowning:

Looks like you might have built the Item’s binding by hand. If you built them by hand, how do they compare to the equivalent ones built by the generator?

Two potential issues/causes:

  • what does transform/miosMotionIn.map look like. It’s not part of the regular transformations, so it must be custom and may have a problem in the definition you’ve built.

  • you’ve modified the in: part of the Binding declaration with a custom Transform, but that’s not needed. The internal defaults for in:, out: (etc) are correct for the common use-cases, so you don’t typically need to augment/annotate the definition unless you’re doing something special.

You may want to run the MiOS Item Generator over your Vera’s config, as it’ll generate a really good configuration that can then be tweaked (if needed), but also acts as a reference source of info.

Hi Mark,

I think the miosMotionIn.map transform comes from the original version of the MiOS binding (from GitHub?):

//I wanted to use some different nomenclature for the motion sensors vs door/window sensor
//For this I simply changed the 0/1 to Clear/Tripped vs defaults

0=CLEAR
1=TRIPPED
undefined=unknown
-=unknown

I’ve not used the Item Generator, as when I did the first installation, it wasn’t very stable, so I did all of the items by hand. I’ll give that a try if I get a chance.

Bottom line - if I remove the custom transforms… would this be better?

Contact Sensor_GF_Kitchen_Motion  "Motion [%s]”  <lock>  (GF_Kitchen, Security, Sensors) {mios="unit:house,device:94/service/SecuritySensor1/Tripped"}

N

Mark

Dropping the map/transform worked. Usual story can’t see the woods for the trees!

I’ve also run the miosLoad and miosTransform so I’ve got something to reference next time I’m being stupid :tired_face:

Thanks,

Nick

Cool, glad you got it working. Note that you can use a Transform on the label component of the Item Binding and it’ll transform the display value.

That’s different from the transforms I use to convert the Vera/MiOS UPnP value (eg 1 / 0) to the equivalent openHAB state value (eg OPEN / CLOSED)

From memory, the newer Generator uses en.map for Contact items (although that could just be in my imagination :slight_smile: )