Errors in openHAB Log

Does anyone know if the serviceID of binaryswitch is supported in the mios binding. I do not see it listed. I am just trying to do a simple test of reading the status of the binaryswitch and then turn it on or off. Unfortunately, nothing happens. I read all of the documentation, but I am at a loss. This is such a basic function and I am sorry to bring it up in this excellent discussion. Maybe I should start a topic of Mios binding for dummies?
Note: I am using Openhab 1.6.1 and Miosbinding 1.6.1. There are a lot of addons. It would be nice to know which are the essential addons to run Openhab with Vera, so I could simplify the run time.
Thanks
John

@jm - @guessed actually created the binding so he is the expert to chime in. I can tell you though that there is nothing else needed for the Vera and OpenHAB to work other than the basic runtime (1.6.1 is fine) and the mios binding (which there are newer builds, but I’m not sure if they contain the component you are in search of). I don’t THINK what you are referencing is currently in the binding. But if you can dig into the Lua/LUPNP files to understand the calls needed and how they translate to the HTTP calls, it is my understanding you could essentially map them in yourself. That’s one of the beautiful things about this system and this binding, it’s open ended to allow folks to plumb in their own type of devices and such. The ones documented in the Wiki of the binding, are the base to get people started and you could use this as the the mios binding for dummies section. :wink: Read through it a few times, and experiment. It does take some time to get used to, but once you do you’ll come to love.

PS - Welcome to OpenHAB and the futurure, where Vera is but a ZWave gateway! ;D ;D

The MiOS Binding deals in UPnP serviceIds. For the DeviceType [tt]BinaryLight[/tt], the serviceId is [tt]SwitchPower1[/tt]

One DeviceType will implement on-or-more serviceIds, which are basically it’s API.

Most of the openHAB Switch items in my configuration are bound to the SwitchPower1 serviceId of the corresponding Device in my Vera.

ie. They’re mostly light switches in Vera (Nest TStats also expose this Service)

Bindings wise, I use MiOS, Prowl, Sonos, Astro and HTTP. I may have the ZWave Binding installed in there also, but I’m not using it.

That’s all there is in my AddOns directory, so I’m not currently loading a lot of stuff.

I did try the SwitchPower1, but nothing happen. I do not think the mios was loading properly. I have deleted all of the files in the addon except mios and it does not load. It must need some other files in the addon directory.

The others in the directory relate to RRD persistence (3 total) and to TTS service (1).

I think I published my items and sitemap files before, want to publish yours (and the one line in openHAB.cfg) so we can see what’s going on?

Log lines might be handy also since I emit a lot of info, esp in start-debug mode.

Yes, I looked at your files and I got the basic idea. I trying to use a very simple example so that I can understand basic principle. I am avoiding the “group” concept for now. I do not think it is loading the mios binding.

Launch OpenHAB in debug mode with start_debug.sh, you must see something like this on the console or in the ./logs/openhab.log file:
[DEBUG] [.o.b.mios.internal.MiosBinding:111 ] - MiosBinding activate()
[DEBUG] [.o.b.mios.internal.MiosBinding:401 ] - updated: Created Unit ‘house’
[DEBUG] [.o.b.mios.internal.MiosBinding:164 ] - registerAllWatches: start
[DEBUG] [.o.b.mios.internal.MiosBinding:167 ] - registerAllWatches: provider ‘class org.openhab.binding.mios.internal.MiosBindingProviderImpl’

and here is an exemple of a switch item in my setup :

/* TYPE NAME “SCREEN-NAME” (GROUP) {MIOS-COMMAND} */
Switch SLN_Z1_SW “Salon Zone 1” (Salon) {mios=“unit:house,device:48/service/SwitchPower1/Status”}

But, I’ve also faced to a situation exactly like yours. OpenHAB worked with other binding (like philips HUE) but not the Vera Binding. After a lot of time and facedesk … I’ve found that the mios bindind require java 7 when I’ve got java 6 on my server. A little update and it works like a charm !

Hope it help.

Wow:
I miss type the SwitchPower1. I thought I had check that, but I have been changing the file so many times I miss type it. I correct that and it works. However, still do not see the status, but I can work on that. Thanks for your help, sorry to waste your time.
John

It is never that easy for me. I rebooted the machine and openhab. It initially reports that the light is off even though it is on. If I manual turn the light on/off there is no change. The vera site says the light went off and then on. But there is no change in openhab. I can turn the light on and off in openhab, but if I us another program to turn the light on and off, openhab does not know it. Probably another stupid typo by me. I have attached the debug log.
John

I looked and tried all sort of examples to get OpenHab to display the status of the switch. But nothing happens. The error that I see in the debug log is this:

07:10:24.781 [ERROR] [b.m.internal.MiosUnitConnector:450 ] - Exception ‘opening file ‘miosSwitchIn.map’ throws exception’ raised pushing property ‘unit:house,device:3/service/urn:upnp-org:serviceId:SwitchPower1/Status’ value ‘1’ into openHAB
org.openhab.core.transform.TransformationException: opening file ‘miosSwitchIn.map’ throws exception

There’s a section in the MiOS Binding Documentation entitled:

MiOS Transformations

and this outlines a step to copy-over a set of MiOS specific Transformation files into your openHAB environment (under [tt]OH/configurations/transform[/tt])

From the error in the log, it looks like you might have missed this step.

Can you confirm?

PS: Sorry for the delay, I was in Vegas on Thu/Fri/Sat and only had my Cell phone.

Also note that, for this Error entry:

06:32:37.515 [DEBUG] [.b.m.i.MiosBindingProviderImpl:159 ] - processBindingConfiguration: Exception parsing/validating context 'stoney.items', item'CameraMotionLastTrip (Type=DateTimeItem, State=Uninitialized)', bindingConfig 'unit:house,device;29/service/SecuritySensor1/LastTrip'. Exception is Config for item 'CameraMotionLastTrip' could not be parsed. Bad thing format 'unit:house,device;29/service/SecuritySensor1/LastTrip'.

It’s indicating that the format of the Binding, for the CameraMotionLastTrip Item, is incorrect (“Bad thing format”. Specifically, you’ve used “device;29” instead of “device:29” so I bailed on the parsing of this Item declaration.

I read that step, but I did not fully understand it. I thought the all I had to do was copy the jar file and it would place the necessary map files in the directory. I did find the files and copied them into the directory and it worked. Thanks!!! I really,really appreciate your help!!!
John

You’re welcome. This step is required in openHAB 1.x because the Transformation service only works on local resources.

In ESH, and in openHAB 2.x (based on ESH), they’re supposed to address this problem by allowing transformation resources to be bundled into the Binding itself. I haven’t checked if that’s been done or not :wink:

I am trying to set up Openhab on a Vera2. I initially was using the VeraEdge, but it was problematic so I returned it. Openhab connects to the Vera 2 without problems and reads the status of all of the devices. The challenge that I face is that when I turn on a light there is an ON command, but the next statement is that MIOS binding is down and the light does not turn on and the status is updated back to being off.
John

Logs?

Line 14:11:40.682
Thanks

Thanks!

You have a few different things going on.

a) You’re running a pre-December build
You may want to upgrade to 1.6.2 (Release), since there have been a number of changes made since then. I can tell this because the exception that’s going on is from logic that was eliminated in early December. Either way, 1.6.2 will give you less logs to sift through, and a few other benefits, so it’s worth the move.

b) You’re binding a DateTime item to a String (or similar)
Specifically, it’s a String Item that’s being bound to a MiOS StateVariable from this type list.
This fixed-logic only existed in the pre-early-December builds, and I’d forcably convert certain “listed” UPnP State variables to DateTime, no matter what they’d been bound to.

I’m guessing that you’re [tt]stoney.items[/tt] file has an entry like:

String ...

instead of

DateTime ...

Positionally, it may be near the Item declaration for “[tt]NestHomeStatus[/tt]”, something like NestHomeLastUpdate or NestControllerLastUpdate would be good candidates to check.

If it’s not that, I’ll need a copy of your [tt]stoney.items[/tt] file.

Hope this helps…

I upgraded to 1.6.2 and commented out my nest. The light switches work now. Thanks. I just have to figure out my nest issue.

Good to hear, at least you’re on your way to the next steps.

You may want to pickup last nights Cloudbees Nest since @watou made some additions, as well as some debugging improvements, that should help you.