Major Frustration with Vera Integration

I’m a current Vera (MIOS) user and have a VeraLite and about 50 devices. I’m looking at migrating over to openHab and keeping my Vera as the ZWave interface like many others have done. I also use imperiHome for tablet interfaces and would love to keep that interface, or one equal/better. I’ve started out with an Odroid C1+ as my test computer. I’ll also preface with that I’m an electrical engineer and do programming in Java for Android as well as several embedded processors, so this is not my first rodeo regarding computers and electronics. That said, I’m not a Linux user. I last played with it 15 years ago, and didn’t like it then and haven’t had the time to go back. After a few days worth of work, I still don’t have things working, so I figured I’d post here. Here are my thoughts and issues.

I started this project by installing version 1.x on my Odroid. That went OK, and I have it where I can see the demo sitemap from a browser. I then tried to get the MIOS binding working and this is where things hit a brick wall. I have the IP set in the config file, and can use the item generator to get all my items built into a file. That’s as far as I get. I created a testing sitemap and put one item in it (text item for the state of a door switch I hadn’t installed yet). The sitemap shows a spot, but it’s obviously not getting the connection. I tried to get the logging working better, and failed there too.

My first trial was with a 8GB EMMC, which was too small (kept getting OS messages that it was almost out of memory), so I ordered a 32GB. I decided to use the 32GB and try openHab2 instead as maybe it would work better for me. I have openHab2 downloaded and can start it and hit the base website using localhost. However, I can’t hit it from an outside computer - I get connection refused. I’ve done the same things as above in trying to get the MIOS hooked up, and have ended up stalled at basically the same point.

So now that you know my issues, I have a couple suggestions.

  1. Make images for the most common processors (Odroid, PI2, PC, etc.) with everything set up and working. Make it as idiot-proof as possible.
  2. Most of the step-by-step guides assume a higher level of Linux knowledge than at least I do. I doubt I’m in the minority. Again, idiot-proof.
  3. Very little guide-type info for openHab2. If it’s the future, I’d put more focus on it.

Thanks,

Danny

Hi Danny,
there are some easy to get going guides out there on the internet. Try this one:
http://homeautomationforgeeks.com/openhab.shtml

You might also start off running Openhab on your PC as then its really simple to edit files locally/look at logs etc.
Then when you have a good handle on OH, you can easily move the configs/addons to your Odroid or wherever.

I’ve read every guide I can fin (including that one).

I can start the base openhab. My issues are around getting it to tie to mios as that’s where my devices are.

Also, I don’t think that you can run openhab on windows is mentioned much at all. The first inclination I found was the bat files with openhab2. So I guess openhab 1.x will run on windows too? If so that will help ease the learning curve.

Thanks,

Danny

If you’re new to openHAB, and to Linux, then it’s going to be easiest to start with OH 1.x. In today’s world, that’s openHAB 1.8.2.

Configuration-wise, an ODroid C* machine is very similar to using a RPi machine, so the step-by-step guides for those machines will give you a lot of mileage.


Hardware/OS preparation
This assumes you bought an eMMC module with the basic Linux OS on it already. If not, then you can download an Ubuntu OS image from HardKernel, but you’ll need the adapter to flash it from your primary machine (Mac, Windows, etc).

  1. Get your ODroid software running, update to the latest patches.
sudo apt-get update
sudo apt-get upgrade

Software preparation

  1. openHAB 1.8.2, and uses the apt-get style of installation (atop the base Linux install)
  2. adding the MiOS components, using the same apt-get approach as step (1)
sudo apt-get install openhab-addon-action-mios
sudo apt-get install openhab-addon-binding-mios

Software configuration

:wrench: The steps listed below are an abridged version of the primary MiOS Binding Documentation. Please refer to the primary documentation for full, and complete, installation steps.

  1. Download, and run, the MiOS Item generator that’s referenced in the MiOS Binding page
  2. Copy the generated Items file and place it into the /etc/openhab/configurations/items directory
  3. Add the following to your /etc/openhab/configurations/openhab.cfg file *:
mios:house.host = 192.168.xx.xxx
  1. Download and install the MiOS Transformation files
  2. Start openHAB, and validate that it’s connecting, and seeing changes to the MiOS unit as you control the switches (etc) via MiOS/Vera or manually.
  3. At this point you’d manually create a sitemap, to display a dashboard (or sorts).
    This is, as they say, a rite-of-passage. There are a bunch of examples around, but start small… and only after doing the validation above.

*Assuming what you generated in step (1) uses the name “house”, and correct the IP Address to match the IP address of your Vera Lite.


kept getting OS messages that it was almost out of memory

Memory, or Disk? The eMMC unit is just a storage unit so you should not see Memory-related errors. I’ve run with both 16G and 32G eMMC units (ODroid C1, C1+) and both run with a ton of headroom.

If you have a copy of the specific error messages you see, then folks can chime in with assistance.

I have the IP set in the config file, and can use the item generator to get all my items built into a file. That’s as far as I get. I created a testing sitemap and put one item in it (text item for the state of a door switch I hadn’t installed yet). The sitemap shows a spot, but it’s obviously not getting the connection. I tried to get the logging working better, and failed there too.

Post what you have, along with any relevant logs (as attachments, or links to any bit-bucket site). I recommend you validate as you go, since errors in early steps (like MiOS Binding config) will mean you get nothing in later steps…

Either way, posting what you have (logs, item files, sitemap files) will mean we can see what you’re seeing, and it’ll avoid a lot of guesses.

I have openHab2 downloaded and can start it and hit the base website using localhost.

openHAB 2 is targeted at developers, and experienced tinkerers, to prepare/get ready for the next wave. A number of Bindings, my MiOS Binding included, have very rough edges when run in the openHAB compatibility layer (under openHAB 2) so you’re in for a world of hurt if you start off at this layer.

The newer software gets better every week, but it’s just not there (yet) for mass-consumption

1 Like

Ok, this was really helpful. I realized that I had a naming difference - house and home. Changed it but no change… Your * note is probably critical and I haven’t seen that mentioned anywhere before…

Went back to my 32gb card and wiped out oh2 and followed your instructions to the letter. I have progress. I see mios items in the openhab.log now. Pretty much every item has an error that it could not be parsed because of a bad general format. I’ll post the logs and items file tomorrow.

I didn’t use apt-get for the oh1 install last time so that was probably part of the issue. Someone should make a script as typing all that in correctly is a big pain in the butt…

How do I see whether things are controllable (#4)?

I did go ahead and add something to a sitemap, and it still doesn’t work (no surprise)…

Error was for storage. Didn’t get it tonight with either card. Odroid also didn’t lock up yet, which is a first (hasn’t lasted more than 30min til now).

Thank you very much for the help!!!

Danny

Since it’s not the middle of the night and I’m not on my tablet, I’ll clarify a bit:

The naming difference was between the items file (home.items) and in my cfg file, the IP was pointed to “house”. Fixed this on my 8GB OH1 install, and it didn’t seem to fix anything. As I mentioned last night, this seems like something that’s pretty critical, and the post yesterday was the first time I’ve seen it pointed out. Probably needs to be added to the instructions as I could see a lot of people making a mistake here.

Switched to my 32GB card and basically started over. I did your instructions as well as adding a line to the logback file. Also, a note here - the instructions say it’s under /etc/openhab/configurations/. Mine’s not - it’s just in the base /etc/openhab/ directory. This took me a bit to figure out as it wasn’t where the instructions said it was… Referring to the instructions at: https://github.com/openhab/openhab/wiki/MiOS-Binding#logger

I’ll move the MIOS logging out to it’s own file now that this is working at least…

On your step #4 for testing is where I’m stumped. How do I tell that it’s connecting? Or control MIOS things / see MIOS changes on OH without a sitemap?

I also mentioned other Odroid issues. I’ve had chronic lock-up issues. Screen would completely lock up periodically. Powering up and doing nothing, and it would still lock up after 15-30 minutes. Opening multiple tabs in Chromium was the fastest way to make it lock up. I posted this to their forum and the suggestion was to increase NVRAM using these instructions: http://forum.odroid.com/viewtopic.php?f=112&t=18226 I haven’t had a chance to try this yet, but I didn’t get any lockups last night, so that’s good…

Log and config files uploaded to:

Thanks,

Danny

Had some time to sit down at a PC and look at the log files and the config files with more detail. I think I found a big problem and I even know why it happened after doing some more reading.

In my items.config file, it has the mios unit as “user_data.xml” instead of “house”. That would cause an issue…

The why is when I ran the miosTransform.sh, I used an argument for the file, not what I wanted it to be labeled. I.E. I put in:

sudo bash miosTransform.sh user_data.xml

instead of:

sudo bash miosTransform.sh house

Not home, so I can’t test it, but I’m sure this is a problem…

Now, once I know how I test things, I’ll hopefully be all set…

Thanks,

Danny

Made the change to the items, and still not working. Also broke the mios logging to its own file for clarity. This helped a lot, and I noticed that things are closer to working, but not there yet.

Did some more reading and looking and found a couple references to transforms. Looked in that folder, and there was nothing for mios. Downloaded them from github (one at a time, there has to be a better way). Now, no more errors in the log and I can see where my test device is changing states.

Is there a better way to test it?

Can’t get the device to work in the sitemap. In looking at the log file, it appears that the “address” in the log is significantly different than what the auto generator put on them. Tried a few combinatons, but I haven’t been able to get it to work properly. Ideas?

I’ll post updated logs and configure files in the morning.

Thanks,

Danny

Hi Danny,

could you just post some items from your items file and how you try to display them in your sitemap?
My MiOS binding is working fine. But had some problems in the beginning too. Especially the transforms. There I had the same issues. But now it’s working fine.

Mario

Here are my logs and configuration files:

Thanks,

Danny

From the logs, it looks like you’re missing the MiOS Transformation files.

Without these, only Number and String Items will pull values from MiOS. All others will create an exception as the code attempts to load the various MAP files to perform the openHAB Item <-> MiOS serviceVariable value transformations (these are at the heart of the MiOS Binding)

The abridged version of the instructions (above) was missing the Transformation setup, so I added it. This is a link into the relevant section of the primary MiOS Binding documentation, which should always be used as the SoT.

Downloaded them from github (one at a time, there has to be a better way)

There is, see the MiOS Binding documentation for the answer. :sunglasses:

Sitemaps…

Here is a link to the Sitemaps documentation and to the Demo sitemap.

You can use the Demo sitemap to compare against what you’re building/tweaking.

When there are format errors, you’ll often get nothing out of the Classic UI, maybe some errors in the logs, but that’s about it.

Items…

I see this in your Items file, which is really odd:

Contact  BackDoorSensorTripped "Back Door Sensor Tripped [MAP(door.map):%s]" <contact> (GDevices,GRoom1) {mios="unit:house,device:122/service/SecuritySensor1/Tripped"}
Contact  BackDoorSensorTripped2 "Back Door Sensor Tripped2 [MAP(door.map):%s]" <contact> (GDevices,GRoom1) {mios="unit:house,device:122/service/urn:micasaverde-com:serviceId:SecuritySensor1/Tripped"}

You’ve got two of these, which the Items generator would not build.

Did you add these by hand? The second one is odd looking because it’s using the fully qualified UPnP serviceName. That form is legit, but not how the generator builds them.

Also for this to work, the door.map file must be present (in the correct form) in the OH/configurations/transform/ directory. Without it, there will be errors when the values are being presented (eg. via Classic UI)

I recommend getting the basics working first before moving onto the more complex stuff. It’ll save you a lot of heartache in debugging the various issues that’ll crop up (and/or interact)

1 Like

From the logs, it looks like you’re missing the MiOS Transformation files.

Yep. Figured that out. Downloaded and installed them as I had mentioned above, but it’s still not working…

Re: downloading using a simpler method:

There is, see the MiOS Binding documentation1 for the answer. :sunglasses:

I tried the svn method, but it didn’t work. Don’t have SVN installed out of the box, and I didn’t really want to go down the road of trying to figure out how to install one thing just to find out that I needed to install yet another thing to make it work. So, I downloaded them one at a time. My recommendation for making it simpler would to just zip them up… This comes back to one of my biggest issues - all the documentation assumes a higher knowledge base than it should…

Here is a link to the Sitemaps documentation and to the Demo sitemap.

You can use the Demo sitemap to compare against what you’re building/tweaking.

When there are format errors, you’ll often get nothing out of the Classic UI, maybe some errors in the logs, but that’s about it.

I’ve read all that, and I think that I have my sitemap configured properly. But it’s not working - I don’t know if the problem is sitemap or something else. That’s the reason I’m here and I’ve posted all my logs and files…

A week ago you alluded to there was a way to “verify” things:

Start openHAB, and validate that it’s connecting, and seeing changes to the MiOS unit as you control the switches (etc) via MiOS/Vera or manually.

And for the 3rd time, I’m asking HOW??? Just the logs, or is there something else I should be looking at?

I see this in your Items file, which is really odd:

Contact BackDoorSensorTripped “Back Door Sensor Tripped [MAP(door.map):%s]” (GDevices,GRoom1) {mios=“unit:house,device:122/service/SecuritySensor1/Tripped”}
Contact BackDoorSensorTripped2 “Back Door Sensor Tripped2 [MAP(door.map):%s]” (GDevices,GRoom1) {mios=“unit:house,device:122/service/urn:micasaverde-com:serviceId:SecuritySensor1/Tripped”}
You’ve got two of these, which the Items generator would not build.

Did you add these by hand? The second one is odd looking because it’s using the fully qualified UPnP serviceName. That form is legit, but not how the generator builds them.

Yes, I added the 2nd one by hand. Again - trying to troubleshoot. I saw in the logs that the format was completely different, so I figured I’d try it and see if it worked. It hasn’t. Sounds like both are acceptable formats (again, first I’ve seen mention of any details about this).

Also for this to work, the door.map file must be present (in the correct form) in the OH/configurations/transform/ directory. Without it, there will be errors when the values are being presented (eg. via Classic UI)

And where do I find this? Since it appears to be a base function, I figured it would come with the base install… Or should I be using something else for contacts? I’ve actually tried a few different things as I’m just interested in getting ANYTHING to work at this point.

I recommend getting the basics working first before moving onto the more complex stuff. It’ll save you a lot of heartache in debugging the various issues that’ll crop up (and/or interact)

This is what I’ve been trying to do for the last 2 weeks. As far as I’m concerned, I haven’t tried anything complex yet… Heck, with all the trouble I’ve had, I’m afraid to try anything complex…

When I posted for help a week ago, I was very frustrated. And at this point, I’m even more frustrated. Based on everything I’ve said and the files I’ve posted up, I figured someone could look at my files and say “you did X wrong - change it to Y and you’re set. This was documented at Z.”

Guessed, I really appreciate the help, so please don’t let my frustration make you think otherwise. Your last post helped confirm a couple things I’ve tried, but didn’t push me any further toward a solution. I had already added the transformation files prior to my last posts. I don’t see anything wrong with my items or sitemap. You didn’t mention any specific issues, so I’m guessing they’re good. So what can be the problem???

Start openhab in debug mode. (start_debug.sh) That’ll spit copious amounts (seriously, it’ll be annoying at first but it’s super useful) of logging info into the log(s). From there it should be apparent if the binding is getting called at all (if isn’t it’s a sitemap issue) and/or what’s happening once the mios binding is called. It will likely be useful to split the Mios output to its own logfile (See the Mios wiki, continuing until “mios item configuraiton”).

??? I thought earlier on you said you downloaded all the mios transforms by hand, and had copied them over?

Just to belabor the point a bit, you can either get the files off of github manually and copy them over (which is frankly the annoying, kind of slow, and error prone way to do it) or you can have svn do it for you automatically.

What I’d do if I were you would be do a cd {openhab directory}/configurations/transform/ and do a ls -l . My hunch is that everything is there but you may have a permissions or user/group issue preventing openhab from using the files you downloaded earlier. (Copying and downloading from a web page isn’t exactly rocket science, so I figure you likely managed that part OK! :smiley: )

FWIW, I use the mios binding as well. It definitely works! I’ve found the limiting factor on it the Vera itself, but there’s not a whole lot Mark can do about that. :wink:

1 Like

Start openhab in debug mode. (start_debug.sh) That’ll spit copious amounts (seriously, it’ll be annoying at first but it’s super useful) of logging info into the log(s). From there it should be apparent if the binding is getting called at all (if isn’t it’s a sitemap issue) and/or what’s happening once the mios binding is called.

Good to know. I’ll have to try it and see what else I see.

With the regular logging, I know the binding is working (mentioned above). I can see the state change of a device in the log. I just can’t figure out how to get it to the sitemap, etc. so I can see it in the real world…

It will likely be useful to split the Mios output to its own logfile (See the Mios wiki, continuing until “mios item configuraiton”).

Did it. Mentioned above, and it’s in a separate file in my attachments. It does make it a lot easier to see what’s going on with the MIOS specifically. I have this set to debug, so I’m getting a lot of info at this point (until I get it working, then I’ll crank it back).

??? I thought earlier on you said you downloaded all the mios transforms by hand, and had copied them over?

I did the MIOS ones. I haven’t tried to go after any other ones yet.

I’m not at home, so I haven’t looked to verify whether that file is or isn’t actually there. I was taking his recommendation on faith that he had seen something in the logs to indicate that the file isn’t there.

FWIW, I use the mios binding as well. It definitely works! I’ve found the limiting factor on it the Vera itself, but there’s not a whole lot Mark can do about that. :wink:

Please post your item and sitemap files. That would probably help me more than anything as I’ve yet to see those files for OH tied to a Vera… All the examples I see use mosquito or some other binding that will have different syntax. I have a feeling that what’s wrong on my system is really simple, and this may be where it’s at (or let me verify that my files are correct so the problem must lie elsewhere).

Thanks,

Danny

Sure! I don’t have much still going through my Vera, mainly just my secure devices (locks and such).

An example lock definition (3 items):

String   GARAGE_SMALL_DOOR_LOCK_TARGET "Small door lock target [%s]" {mios="unit:livingroom,device:7/service/DoorLock1/Target"}
Switch   GARAGE_SMALL_DOOR_LOCK "Small door lock [MAP(miosLock.map):%s]" <lock> (Group_Garage, Group_Locks, Group_Persistence)  {mios="unit:livingroom,device:7/service/DoorLock1/Status"}
Number GARAGE_SMALL_DOOR_LOCK_BATTERY "Garage Small Door Lock Battery [%f]" (Group_Locks, Group_Battery, Group_Persistence)  {mios="unit:livingroom,device:7/service/HaDevice1/BatteryLevel"}

My sitemap isn’t really all that interesting, but it might give you a start point. I threw all my locks into their own group (Group_Locks), so I just have that group as a subgroup on my sitemap:

    Frame label="By Type" {
        Group item=Group_Appliances label="Appliances"
        Group item=Group_Dimmers label="Dimmers"
        Group item=Group_Lamps label="Lamps"
        Group item=Group_Contacts label="Contacts"
        Group item=Group_Power label="Power"
        Group item=Group_Locks label="Locks"
    ....
                         }

You get the idea.

If you don’t want to mess around with groups, you can show the lock status directly on the sitemap:

Switch item=GARAGE_SMALL_DOOR_LOCK label="Garage small door lock"

which will show it with an on/off switch which locks/unlocks my garage small door when you twiddle it.

Hope that helps!

1 Like

Uh dude, here’s a giant problem… your sitemap doesn’t match your item definitions! Parts in bold must match.

Sitemap:


Frame label=“Testing”
{
Switch item=BackDoorSensorDeviceTripped
Switch item=BackDoorSensorDeviceTripped2
Text item=BackDoorSensorDeviceTripped
Text item=BackDoorSensorDeviceTripped2
}


Item definition:


Contact BackDoorSensorTripped “Back Door Sensor Tripped [MAP(door.map):%s]” (GDevices,GRoom1) {mios=“unit:house,device:122/service/SecuritySensor1/Tripped”}

Don’t know where all the "Device"s came from in your sitemap, but none of them are correct as none of them exist in your item definitions! (They exist under slightly different names, which only counts if you’re playing horseshoes. :wink: )

2 Likes

Thanks for the examples. This will definitely help. You don’t have any contacts in your system by chance? I’m beginning to think that’s part of the issue with my test case as I don’t think many people are using contacts thru Vera into OH (see below).

THANK YOU!!! I figured it was something stupid, and it was.

Fixed that, and also found an extra “/” in the items file that was completely hosing things up. Got those fixed and moved one step closer to getting it working (my door switch still won’t work).

Looking in the logs, there’s something going on with the mapping for this contact. Here is the log info for when it changes between the two states:

2016-05-02 21:55:22.781 [TRACE] [.b.m.i.MiosBindingProviderImpl] - getItemNamesForProperty: MATCH property 'unit:house,device:122/service/urn:micasaverde-com:serviceId:SecuritySensor1/Tripped' against BindingConfig.toProperty 'unit:house,device:122/service/urn:micasaverde-com:serviceId:SecuritySensor1/Tripped'
2016-05-02 21:55:22.787 [WARN ] [t.i.s.MapTransformationService] - Could not find a mapping for '0' in the file 'miosContactIn.map'.
2016-05-02 21:55:22.787 [DEBUG] [b.m.i.config.MiosBindingConfig] - Couldn't create state of type 'class org.openhab.core.library.items.ContactItem' for value ''
2016-05-02 21:55:22.788 [TRACE] [.o.b.mios.internal.MiosBinding] - internalPropertyUpdate: transformation performed, from '0' to ''
2016-05-02 21:55:22.788 [DEBUG] [.o.b.mios.internal.MiosBinding] - internalPropertyUpdate: BOUND (Incr) Updating 'BackDoorSensorTripped {mios="unit:house,device:122/service/urn:micasaverde-com:serviceId:SecuritySensor1/Tripped"}' to ''
2016-05-02 21:55:22.789 [TRACE] [.o.b.mios.internal.MiosBinding] - internalPropertyUpdate: BOUND {mios="unit:house,device:122/service/urn:micasaverde-com:serviceId:SecuritySensor1/Tripped"}, value=0, bound 1 time(s)

2016-05-02 21:55:30.590 [TRACE] [.b.m.i.MiosBindingProviderImpl] - getItemNamesForProperty: MATCH property 'unit:house,device:122/service/urn:micasaverde-com:serviceId:SecuritySensor1/Tripped' against BindingConfig.toProperty 'unit:house,device:122/service/urn:micasaverde-com:serviceId:SecuritySensor1/Tripped'
2016-05-02 21:55:30.595 [WARN ] [t.i.s.MapTransformationService] - Could not find a mapping for '1' in the file 'miosContactIn.map'.
2016-05-02 21:55:30.596 [DEBUG] [b.m.i.config.MiosBindingConfig] - Couldn't create state of type 'class org.openhab.core.library.items.ContactItem' for value ''
2016-05-02 21:55:30.596 [TRACE] [.o.b.mios.internal.MiosBinding] - internalPropertyUpdate: transformation performed, from '1' to ''
2016-05-02 21:55:30.596 [DEBUG] [.o.b.mios.internal.MiosBinding] - internalPropertyUpdate: BOUND (Incr) Updating 'BackDoorSensorTripped {mios="unit:house,device:122/service/urn:micasaverde-com:serviceId:SecuritySensor1/Tripped"}' to ''
2016-05-02 21:55:30.597 [TRACE] [.o.b.mios.internal.MiosBinding] - internalPropertyUpdate: BOUND {mios="unit:house,device:122/service/urn:micasaverde-com:serviceId:SecuritySensor1/Tripped"}, value=1, bound 1 time(s)

What’s strange to me is that it warns that it can’t find a mapping for the states, but the last line in each shows the value changing. But this isn’t being reflected in the sitemap. I haven’t tried to dive into mappings yet. Hoping to get some suggestions before I dig into it. Also, if it is a mapping problem, this will need to be added into the version on github so future people don’t have this issue.

In my items I went ahead and uncommented SystemLocalTime and added it to my sitemap. It works, so I know that my Vera -> OH communication is working. I’ll start adding in one of each device type that I have (door locks, thermostat, multi sensors, lights, etc.) to make sure there are no other issues while I’m getting to the bottom of the contact issue.

Since I know I have communication working, and to make sure I’m not missing something with the sitemap, I went ahead and added the binding for Imperihome. In Imperihome, I connected to both devices. SystemLocalTime is updating properly, but I’m not seeing any change in the door sensor, so it’s not a sitemap issue.

Thanks,

Danny

No, not anymore. Back when I was evaluating OH I had literally everything running through my Vera and correctly reporting to OH, but since Vera was the part that was breaking once I decided to go I quickly bought a couple of z-sticks and transitioned everything away from my Vera.

I’m reading that as it can’t find a mapping, and is changing the value to NULL. Which at first glance doesn’t seem to be the appropriate action; I’d expect if it couldn’t find a transform value to leave it at whatever it was coming in, but I’m no expert on transformations.

So we’re kind of back to the ‘what’s going on with your transformation files?’ question. I’m guessing either the file is blank, or OH doesn’t have rights to read it, or it’s corrupted. For reference, here’s the contents of miosContactIn.map:

0=CLOSED
1=OPEN
undefined=unknown

so 1 as a value definitely exists in that file when it’s correct.

Yeah, you’re not helping yourself here. I too use Imperihab, and while I’m very happy to have it and am not complaining whatsoever it’s quite a bit more brittle, opaque, and finicky as far as its configuration goes. On more than one occasion I’ve made a non-obvious mistake in my imperihab configuration and broken the entire thing with not so much as a single log messages as to what the problem is! (For example, name any room with an underscore as the leading character, and everything as far as Imperihab breaks – even non-related previously perfectly fine items!) So I would highly highly caution against using imperihab really for anything until you get the basics working first; you’ll likely spend a lot of time chasing phantoms.

1 Like

Can you post a new set of logs and configs? It sounds like you’ve touched on some of the issues already, so it’ll filter out the chaff a little.

I’ve tweaked those instructions to include the corresponding apt-get that installs you the SVN client. The two commands, together, will do the right thing. The files will download to the current directory, so they just need to be moved to the configurations/transforms directory.

OH2 does this a little differently, including the OH1 “compatibility mode” that’s being developed. It’ll automatically download the relevant extras, so things like Images, Transforms, etc, will all be pulled down, so that part is a 1000% better.

[quote]And for the 3rd time, I’m asking HOW??? Just the logs, or is there something else I should be looking at?
[/quote]
It’s just the logs.

  • Got ERROR entries, get those identified and fixed before moving on to UI’s and such
    You’ll see this as a common theme, starting simple, becoming familiar with how that part is working, and then making small changes to move to the next level.
  • Got Stack traces, in either openhab.log (default), or mios.log (custom), get those identified and fixed

Look at your log files:
When a system is working, data will appear in events.log, in summary form.
When it’s not working, the reasoning can be derived from openhab.log, or your custom mios.log.

  • after manually Switching a Z-Wave switch/dimmer attached to Vera (assuming you have HAIL/Instant Status type switches), validate that you see that switch activated.
    Here’s an example of the various elements. In this case, I have a Dimmer that’s also paired/associated with a 4x Button scene controller. Changing the Light/Dimmer status is triggering the [Leviton] Scene Controller to be tweaked by Vera/Z-Wave (for the LED status updates)
grep Family /var/log/syslog/events.log
2016-05-04 23:02:31 - FamilyControllerDeviceStatus state updated to PENDING
2016-05-04 23:02:31 - FamilyControllerLastUpdate state updated to Uninitialized
2016-05-04 23:02:32 - FamilyControllerDeviceStatus state updated to NONE
2016-05-04 23:02:32 - FamilyControllerLastUpdate state updated to 2016-05-04T23:02:32
2016-05-04 23:02:32 - FamilyControllerId state updated to 144
2016-05-04 23:23:34 - FamilyControllerDeviceStatus state updated to PENDING
2016-05-04 23:23:34 - FamilyControllerLastUpdate state updated to Uninitialized
2016-05-04 23:23:34 - FamilyControllerId state updated to 144
2016-05-04 23:23:41 - FamilyControllerDeviceStatus state updated to NONE
2016-05-04 23:23:41 - FamilyControllerLastUpdate state updated to 2016-05-04T23:23:42
2016-05-04 23:23:41 - FamilyControllerId state updated to 144
2016-05-04 23:24:47 - FamilyTheatreLightsStatus state updated to ON
2016-05-04 23:24:47 - FamilyTheatreLightsLoadLevelStatus state updated to 100
2016-05-04 23:24:47 - FamilyTheatreLightsId state updated to 13
2016-05-04 23:24:47 - FamilyControllerId state updated to 144
2016-05-04 23:25:05 - FamilyTheatreLightsLoadLevelStatus state updated to 78
2016-05-04 23:25:05 - FamilyTheatreLightsId state updated to 13
2016-05-04 23:25:05 - FamilyControllerId state updated to 144
2016-05-04 23:25:11 - FamilyTheatreLightsStatus state updated to OFF
2016-05-04 23:25:11 - FamilyTheatreLightsLoadLevelStatus state updated to 0
2016-05-04 23:25:11 - FamilyTheatreLightsId state updated to 13
  • after manually opening a Contact sensor (opening Door or Window), and see that it’s showing up correctly in the logs.
    Here’s some sample output from my system using
grep DoorZone /var/log/syslog/events.log

I have a TON of contact sensors, since my Paradox Alarm system hangs off Vera. These values are all being auto-generated by Vera, and bridged over the openHAB 1.8 MiOS Binding:

2016-05-04 20:48:11 - FrontDoorZoneTripped state updated to OPEN
2016-05-04 20:48:11 - FrontDoorZoneId state updated to 131
2016-05-04 20:48:11 - FrontDoorZoneLastTrip state updated to 2016-05-04T20:48:16
2016-05-04 20:48:11 - FrontDoorZoneLastUpdate state updated to 2016-05-04T20:48:16
2016-05-04 20:48:11 - FrontDoorZoneId state updated to 131
2016-05-04 20:48:23 - LetterboxDoorZoneTripped state updated to OPEN
2016-05-04 20:48:23 - LetterboxDoorZoneLastTrip state updated to 2016-05-04T20:48:29
2016-05-04 20:48:23 - LetterboxDoorZoneLastUpdate state updated to 2016-05-04T20:48:29
2016-05-04 20:48:23 - LetterboxDoorZoneId state updated to 438
2016-05-04 20:48:26 - LetterboxDoorZoneTripped state updated to CLOSED
2016-05-04 20:48:26 - LetterboxDoorZoneLastUpdate state updated to 2016-05-04T20:48:31
2016-05-04 20:48:26 - LetterboxDoorZoneId state updated to 438
2016-05-04 20:48:51 - FrontDoorZoneTripped state updated to CLOSED
2016-05-04 20:48:51 - FrontDoorZoneLastUpdate state updated to 2016-05-04T20:48:56
2016-05-04 20:48:51 - FrontDoorZoneId state updated to 131

[quote]Contact BackDoorSensorTripped2 “Back Door Sensor Tripped2 [MAP(door.map):%s]” (GDevices,GRoom1) {mios=“unit:house,device:122/service/urn:micasaverde-com:serviceId:SecuritySensor1/Tripped”}
[/quote]

door.map is a custom addition. If you’ve not created door.map, and put it into the configurations/transform directory, then it’s going to be unpredictable the behavior that the UI layer gives.

Without this UI MAP, and with the default/generated output from the MiOS Item generator, you’ll see values of open and closed, along with a “special” (state-sensitive) icon.

Here’s (roughly) what the Item Generator would have built:

Contact  EXTGardenBackMotionZoneTripped "EXT Garden Back Motion (Zone 34) [MAP(en.map):%s]" (GContact,GMotion,GPersist) {mios="unit:house,device:444/service/SecuritySensor1/Tripped"}

*en.map ships by default, in the configurations/transform directory, and can be used as an example of how to create something like door.map

Given the tweaks, I’d recommend making a backup copy of your Items file, and performing a regen to get a clean MiOS Item Generator. Let’s get that working before making changes - I think that’ll avoid a lot of heartache, it’s actually the motivation for writing the tool, as a number of people struggled to get working files (and one typo can silently prevent 1/2 the config file from loading)

Once the basics are functional with no errors (see tests above), we then move onto a _basic_Sitemap that lets you see (Text, Dates, Status, Contacts) and change (Buttons, Scene-Buttons) the values.

openHAB 1.x does require a degree of patience to get going, and the best advise I can give is to get it working in increments. OH 1.x config can be edited using the openHAB Designer, which adds a structured editor, or the Text files (as you’ve been doing). I live in a text editor (vi) so the latter is more familiar, faster and at the same time much more error prone (no safety net)

Errors tend to build atop each other, so when I find a few obvious ones, I tend to stop, wait for those to be corrected, and then get new logs/config to validate the next layer.

Source code reviews are similar :wink:

In some case, when I find tweaks/customizations in a number of different areas, the overall review progress slows markedly.

Here’s the general progression I’ve seen people be successful at when learning to work with openHAB and Vera, validating at each step along the way:

  1. Generate a default MiOS Item generator output validate it per-above (no tweaking!)
  2. Create a super-simple Sitemap (see the Demo Sitemap for common Item visualizations) and keep it to one Text, one Contact, one Switch (for now)
  3. Round out the Sitemap file for your rooms, keep reloading it as you add to the file. It’s very brittle as a file format, so best to add-and-validate as you go with any additions here.
  4. Tweak any Item Labels to suit personal tastes
  5. Create a MAP file, and stitch it in to the Presentation layer (label="..." on an Item)
  6. Create a Rule.

BTW: I’ve incorporated changes, based upon your experiences, into the MiOS Item generator tooling and Wiki pages. These should make it clearer how to avoid at least some of the issues you’ve run into along the way.

Everyone goes through the same teething problems with OH 1.x config, so it’s not a problem. I’m v.busy at work, so my responses will be sporadic… at best.

@TheKorn, thanks for all your assists in this thread, much appreciated! Your pointers on the MAP files sees on-point.

0=CLOSED
1=OPEN
undefined=unknown

Yup, exactly how it should look. It also should not be “saved” using a Windows editor - unless in pure/plain ASCII. By default Windows text-editors (Notepad, we’re looking at you) tend to put BOM characters at the beginning, for UTF-8 Character encoding, and that’ll screw up everything.

ie. The file will be present, but most likely wont load correctly into the MAP engine.

1 Like

[quote=“TheKorn, post:18, topic:10146”]
So we’re kind of back to the ‘what’s going on with your transformation files?’ question. I’m guessing either the file is blank, or OH doesn’t have rights to read it, or it’s corrupted.[/quote]

Yep. This ended up being the problem. Had a chance to look in the miosContactIn.map file last night, and it was just a bunch of jibberish. All I can guess is that it corrupted somehow when I originally downloaded it. Made a new one with your info and all was good. At that point, I used the SVN method to re-download all the MAP files in case others have the same issue.

Once I plugged in that map file, my contact sensor started working properly (logs, sitemap and imperihome).

Yeah, I get that feeling about most of the configuration. One errant character will break everything without any logs, etc… I’m just adding one thing, getting it working and adding another. This entire discussion has been about ONE device (a door contact - sitting on my desk so it’s easy to actuate while I’m at the computer). Now that it is working, I’ll add a temp sensor, then a door lock, then a light switch, etc…

I saw that last night - thanks. That kind of thing is exactly what a new user needs. I’d also add the command to cd into the transform directory, or add the line after to cp mios*.* to… I know you mention to copy them over, but I’d just add the command for how to do it (or put them in the directory first). Seems really trivial, but for those that don’t have any Linux or DOS experience, they don’t even know those commands. I at least have a ton of DOS experience so a lot of those commands are familiar to me.

I would think it would be trivial for someone with the right knowledge to write a script to do the same thing for 1.X. Maybe just a miosInstall.sh or something that downloads everything needed, puts it in the correct folders, and also initiates the scripts you’ve already written to get the data from the Vera and generate an items file from them.

I agree, and that’s what I tried to do. My problems really come down to three things:

  1. When I ran the miosTransform.sh, I used the argument for the file I was “pointing it to” instead of the name I wanted it to give. And then renamed it to “house” afterwards. This made all the pointers inside the file to "mios=“unit:user_data.xml…” instead of "mios=“unit:house…”

  2. The above was pointing to “house” as the unit name (once fixed). In the openhab.cfg, I had the name listed as “home”. I.E. mios:home.host = 192.168.xx.xxx

  3. Didn’t have the transform files and when I did it was corrupted.

I figured my issues was with the sitemap, etc. and it was good all along. A note for future people with issues starting up - the sitemap isn’t dynamic. It has to be refreshed to see a state change on a door sensor for instance. I’m hoping this is something changing for OH2 as refreshing the page is annoying and not intuitive in today’s world.

I’ve noticed that, and I really appreciate it (and future users will really appreciate it). My only suggestion is that I’d include the seemingly “trivial” commands like “cp mios*.map /etc/openhab/configurations/transform/”. I’d also put in the top section to download/install gedit or a similar text editor that will be easy for new people, and then use it in the rest of the directions. Like for editing, just put the command “sudo gedit house.items”, etc.

Like I’ve said before - “idiot proof”. I’ve written a lot of technical documentation over the years, and when I started, I was given a really good piece of advise - never assume they have any base experience. You should assume they’ve never even seen this thing before. It makes it much more tedious to write the documentation, but it makes it work for anyone.