openHAB newbie - binding config

HI there,

I’ve been playing with openHAB all weekend, and after a few teething troubles and the steep learning curve (It’s been a while since I did anything remotely technical like this), I’m making progress, it’s a lot of fun and it’s just soooo powerful!

Anyway, as all of my home automation is currently handled by my veralite, I’m tackling the setup of the binding.
I’m running the latest 1.7 snapshot (on the advice of a google forum post), but I’m not seeing anything in logs other than the startup/update.

Starting using start_debug.sh - logging instructions followed and looks to be working.

openhab.cfg:

mios:house.host=192.168.xxx.xxx

mios.log output:

2015-03-15 20:53:43.466 [DEBUG] [.b.mios.internal.MiosActivator] - MiOS binding has been started
2015-03-15 20:53:43.542 [DEBUG] [.o.b.mios.internal.MiosBinding] - MiosBinding activate()
2015-03-15 20:53:43.543 [TRACE] [.o.b.mios.internal.MiosBinding] - MiosBinding updated()
2015-03-15 20:53:43.547 [DEBUG] [.o.b.mios.internal.MiosBinding] - updated: Created Unit 'house'
2015-03-15 20:53:43.548 [DEBUG] [.o.b.mios.internal.MiosBinding] - registerAllWatches: start

And that’s it - I don’t see anything else in the log file - I’m assuming I should be seeing events in the logs that I haven’t configured as items?

Thanks
James

There may be a syntax error in your Items file, or potentially the logging isn’t capturing everything. For the latter, you’ll want to check the default log file, [tt]logs/openhab.log[/tt], just in case.

If you post the Items file here, I can take a look for obvious errors.

I’m guessing you used the Item file Generator though, since it makes things easier, but there’s still potential for it to make mistakes.

Thanks for your help.

I’d assumed I didn’t need to build any items, and that the logging would capture any events.

I’ve run the Item file generator, added them, and still aren’t seeing anything in either openhab.log or mios.log.

Items file attached.

Thanks again
James

Ok. I just renamed your file to:

house.items
and copied it to my Dev environments directory:

OH/configurations/items/foo.items

and then restarted openHAB. I can see a bunch of the normal stuff in the logs:

16:29:19.991 DEBUG o.o.b.m.internal.MiosActivator[:36]- MiOS binding has been started 16:29:20.001 DEBUG o.o.b.m.i.MiosBindingProviderImpl[:92]- setItemRegistry: called 16:29:20.002 DEBUG o.o.m.i.i.GenericItemProvider[:334]- Start processing binding configuration of Item 'ZWaveId (Type=NumberItem, State=Uninitialized)' with 'MiosBindingProviderImpl' reader. 16:29:20.004 DEBUG o.o.b.m.i.c.MiosBindingConfig[:188]- Successfully loaded UPnP Service Aliases from 'org/openhab/binding/mios/internal/config/ServiceAliases.properties', entries '87' 16:29:20.005 DEBUG o.o.b.m.i.c.MiosBindingConfig[:205]- Successfully loaded Device Parameter defaults from 'org/openhab/binding/mios/internal/config/DeviceDefaults.properties', entries '14' 16:29:20.005 DEBUG o.o.b.m.i.MiosBindingProviderImpl[:139]- processBindingConfiguration: Adding Item 'ZWaveId' Binding 'unit:house,device:1/id', from 'foo.items' 16:29:20.006 DEBUG o.o.m.i.i.GenericItemProvider[:334]- Start processing binding configuration of Item 'ZWaveDeviceStatus (Type=StringItem, State=Uninitialized)' with 'MiosBindingProviderImpl' reader. 16:29:20.006 DEBUG o.o.b.m.i.MiosBindingProviderImpl[:139]- processBindingConfiguration: Adding Item 'ZWaveDeviceStatus' Binding 'unit:house,device:1/status,in:MAP(miosStatusIn.map)', from 'foo.items' 16:29:20.006 DEBUG o.o.m.i.i.GenericItemProvider[:334]- Start processing binding configuration of Item 'ZWaveUse45 (Type=StringItem, State=Uninitialized)' with 'MiosBindingProviderImpl' reader. 16:29:20.007 DEBUG o.o.b.m.i.MiosBindingProviderImpl[:139]- processBindingConfiguration: Adding Item 'ZWaveUse45' Binding 'unit:house,device:1/service/urn:micasaverde-com:serviceId:ZWaveNetwork1/Use45', from 'foo.items' 16:29:20.007 DEBUG o.o.m.i.i.GenericItemProvider[:334]- Start processing binding configuration of Item 'ZWaveUseMR (Type=StringItem, State=Uninitialized)' with 'MiosBindingProviderImpl' reader. ... 16:29:20.264 DEBUG o.o.m.i.i.GenericItemProvider[:334]- Start processing binding configuration of Item 'SceneAlarmWakeUp (Type=StringItem, State=Uninitialized)' with 'MiosBindingProviderImpl' reader. 16:29:20.264 DEBUG o.o.b.m.i.MiosBindingProviderImpl[:139]- processBindingConfiguration: Adding Item 'SceneAlarmWakeUp' Binding 'unit:house,scene:21/status,command:,in:MAP(miosStatusIn.map)', from 'foo.items' 16:29:20.264 DEBUG o.o.m.i.i.GenericItemProvider[:334]- Start processing binding configuration of Item 'SceneAlarmWakeUpActive (Type=ContactItem, State=Uninitialized)' with 'MiosBindingProviderImpl' reader. 16:29:20.265 DEBUG o.o.b.m.i.MiosBindingProviderImpl[:139]- processBindingConfiguration: Adding Item 'SceneAlarmWakeUpActive' Binding 'unit:house,scene:21/active,in:MAP(miosSceneActiveIn.map)', from 'foo.items' 16:29:20.267 DEBUG o.o.a.m.internal.MiosActivator[:33]- MiOS Action has been started. 16:29:20.270 DEBUG o.o.b.m.internal.MiosBinding[:144]- allBindingsChanged: start provider 'org.openhab.binding.mios.internal.MiosBindingProviderImpl@6d70f305' 16:29:20.271 DEBUG o.o.b.m.internal.MiosBinding[:172]- registerWatch: start miosProvider 'org.openhab.binding.mios.internal.MiosBindingProviderImpl@6d70f305', itemName 'SceneLampsOn1' 16:29:20.271 DEBUG o.o.b.m.internal.MiosBinding[:172]- registerWatch: start miosProvider 'org.openhab.binding.mios.internal.MiosBindingProviderImpl@6d70f305', itemName 'VacationGhostOnTime4' 16:29:20.271 DEBUG o.o.b.m.internal.MiosBinding[:172]- registerWatch: start miosProvider 'org.openhab.binding.mios.internal.MiosBindingProviderImpl@6d70f305', itemName 'InfoViewerId' 16:29:20.271 DEBUG o.o.b.m.internal.MiosBinding[:172]- registerWatch: start miosProvider 'org.openhab.binding.mios.internal.MiosBindingProviderImpl@6d70f305', itemName 'RFXRemoteL21000508CId' ... 16:29:21.884 DEBUG o.o.b.m.i.MiosUnitConnector[:676]- processResponse: success! loadTime=1426461842, dataVersion=461843268 devices(126) scenes(94) rooms(0) sections(0) 16:29:21.888 DEBUG o.o.b.m.internal.MiosBinding[:482]- internalPropertyUpdate: BOUND (Full) Updating 'ZWaveDeviceStatus {mios="unit:house,device:1/status"}' to 'NONE', was 'Uninitialized' 16:29:21.891 DEBUG o.o.b.m.internal.MiosBinding[:482]- internalPropertyUpdate: BOUND (Full) Updating 'ZWaveLastUpdate {mios="unit:house,device:1/service/urn:micasaverde-com:serviceId:ZWaveNetwork1/LastUpdate"}' to '2015-03-15T16:24:05', was 'Uninitialized' 16:29:21.892 DEBUG o.o.b.m.internal.MiosBinding[:482]- internalPropertyUpdate: BOUND (Full) Updating 'ZWaveNetStatusID {mios="unit:house,device:1/service/urn:micasaverde-com:serviceId:ZWaveNetwork1/NetStatusID"}' to '1', was 'Uninitialized' 16:29:21.893 DEBUG o.o.b.m.internal.MiosBinding[:482]- internalPropertyUpdate: BOUND (Full) Updating 'ZWaveNetStatusText {mios="unit:house,device:1/service/urn:micasaverde-com:serviceId:ZWaveNetwork1/NetStatusText"}' to 'OK', was 'Uninitialized' ...

(large sections clipped, since it’s long)

So it’s definitely working. It’ll be worth double-checking the location of your Items file, since it looks like openHAB isn’t picking it up.

You should also see lines along the lines of the following in your [tt]OH/logs/openhab.log[/tt] file, indicating that it’s loading the [tt]house.items[/tt] file.

16:39:36.517 INFO  o.o.m.c.i.ModelRepositoryImpl[:79]- Loading model 'house.items'
16:39:36.663 DEBUG o.o.m.i.i.GenericItemProvider[:154]- Processing binding configs for items from model 'house.items'

These occur just before it launches my MiOS Binding code, since they’re part of the regular openHAB Framework.

Hmm,

I added the items to a separate file - vera.items, and see that it gets picked up by openhab:

06:30:10.722 [INFO ] [c.internal.ModelRepositoryImpl:79   ] - Loading model 'vera.items'
06:30:11.432 [DEBUG] [i.internal.GenericItemProvider:154  ] - Processing binding configs for items from model 'vera.items'
06:30:11.463 [DEBUG] [i.internal.GenericItemProvider:133  ] - Read items from model 'house.items'
06:30:11.485 [DEBUG] [i.internal.GenericItemProvider:133  ] - Read items from model 'vera.items'

But that’s it, I don’t get anything like the output you showed?

James

Ok, this is a stab in the dark, but can you undo the changes made to:
[tt] OH/configurations/logback.xml
OH/configurations/logback_debug.xml
[/tt]

You should only need to remove the bit that links in the new Appender, the part to remove would look like:

<!-- valid log levels: OFF | ERROR | INFO | DEBUG | TRACE --> <logger name = "org.openhab.binding.mios" level = "TRACE" additivity = "FALSE"> <appender-ref ref="MIOSFILE" /> </logger>

After that, the MiOS entries should be back in the regular [tt]OH/logs/openhab.log[/tt] file.

That part of the config was added later on by one of the users, and is not something that I have in my config (yet) so I’m not 100% familiar with it. Getting you back as close to default-install as possible will help diag further… although you’ve definitely got me a little stumped.

I’ll need to sleep on it some.

I’ve made the changes you suggested, and I’m still seeing nothing in the openhab.log.

What I have done, is copied my configuration across to my windows desktop, where it works, I see the items created, and having added them to the sitemap, can see status updates, control items etc.

for info, the installation I’m having trouble with is running on my vortexbox server, which is running fedora 16 (Vortexbox 2.2).

Cheers
James

ok, at this point, you should have all of the critical logs, for both openHAB itself as well as for the MiOS Binding, and they’ll be neatly wrapped in [tt]OH/logs/openhab.log[/tt] (when needed)

So let’s get back to some basics…

What version of Oracle’s JDK are you running?

“[tt]java -version[/tt]” reports the following for me on my two platforms:

On my Mac Mini:

java version "1.7.0_45" Java(TM) SE Runtime Environment (build 1.7.0_45-b18) Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

And on my Odroid C1:

java version "1.8.0_33" Java(TM) SE Runtime Environment (build 1.8.0_33-b05) Java HotSpot(TM) Client VM (build 25.33-b05, mixed mode)

IIRC, the MiOS Binding has a dependency upon [at least] Java 7 (Oracle JDK 1.7), although I can’t recall what code construct and/or lib I use that triggered that dependency.

And, of course, OpenJDK won’t work for openHAB for a variety of compatibility reasons (as reported in the forums)

And, of course, OpenJDK won't work for openHAB for a variety of compatibility reasons (as reported in the forums)

That’ll be it then, vortexbox is running OpenJDK.

I’ll carry on with the windows instance until I decide/find a suitable hardware platform.

Thanks for you help - having spent the evening reading through this sub-forum, they would have been very useful as I scaled the near vertical learning curve of openHAB late Friday/Saturday!

Cheers
James

@jdr0berts

I'll carry on with the windows instance until I decide/find a suitable hardware platform.

For what it’s worth. I am new as well to opehnab and I am having a fairly easy time to get an Raspberry Pi 2 loaded with Debian, Openhab and the MiOS binding. You can for instance use “apt-get” to pull down Openhab to get a fully self starting system with the correct users and permissions. To understand the intricacies of the binding and rules is quite different though…

Good luck with whatever you choose.