[New Binding] EMBY Server Binding - Alpha

Same problem here, OH 2.5M1. Is the plugin still maintained?

Yes the binding is still being maintained. I have paused on development as of late while the migration in build systems has been going on ā€¦

@somy and @Nosepull

As i mentioned above run the following line in the karaf console and that should fix the import-Package: com.google.gson

bundle:install http://central.maven.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar

Thanks for the hint. Now a new error:

2019-07-09 19:27:12.272 [WARN ] [org.openhab.binding.emby ] - FrameworkEvent WARNING - org.openhab.binding.emby
2019-07-09 19:27:12.287 [ERROR] [org.openhab.binding.emby ] - bundle org.openhab.binding.emby:2.5.0.201905141750 (235)[org.openhab.binding.emby.internal.discovery.EmbyClientDiscoveryService(272)] : The activate method has thrown an exception
at org.openhab.binding.emby.internal.discovery.EmbyClientDiscoveryService.activate(EmbyClientDiscoveryService.java:61) ~[?:?]

@Nosepull send me the full log

Well, there is no more info. The lines above have been repeated over and over if I grep for ā€œembyā€ in openhab.log.
Strange thing: Some time over the night this line stopped appearing in the log. PaperUI does not show anything Emby-related, but in HABmin I now can find an Emby binding and can add things. So maybe the problem has solved itself?!

I now installed an Emby bridge, but I cannot configure it,

2019-07-10 04:35:43.813 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while calling thing handler factory 'org.openhab.binding.emby.internal.EmbyHandlerFactory@967890': For input string: ""
	at org.openhab.binding.emby.internal.handler.EmbyBridgeHandler.getIntConfigParameter(EmbyBridgeHandler.java:95) ~[?:?]
	at org.openhab.binding.emby.internal.handler.EmbyBridgeHandler.getServerAddress(EmbyBridgeHandler.java:85) ~[?:?]
	at org.openhab.binding.emby.internal.handler.EmbyBridgeHandler.<init>(EmbyBridgeHandler.java:60) ~[?:?]
	at org.openhab.binding.emby.internal.EmbyHandlerFactory.createHandler(EmbyHandlerFactory.java:76) ~[?:?]
2019-07-10 04:36:58.925 [ERROR] [st.core.internal.thing.ThingResource] - Exception during HTTP PUT request for update config at 'things/emby:controller:16bd9b8c437/config'
java.lang.IllegalStateException: Thing with UID emby:controller:16bd9b8c437 has no handler attached.

All changes I do in PaperUI or HABmin are discarded as soon as I leave the config page. API key has been generated.

Iā€™m planning to update to OH2.5 soon, but noticed no activity here since July.

Will the Emby plugin work with 2.5?

Hi, Iā€™m using one of the previous one of the binding with OH 2.5. itā€™s working well. I never tried the latest, but should work.

1 Like

Hi,

First of all thanks @volfan6415 for the binding it looks really promising.

Iā€™m not able to get it working so looking for some advice.

  • Iā€™ve installed the binding
  • Added my Server Thing and configured by API key
  • Added my Client Things

So I expected to be able to define my items and see what was playing on my clients. However Iā€™ve defined my items. Added the channels to them (linking to the client channels) but I donā€™t get any information in my items.

There are no errors in my logsā€¦and no item updates (for the Emby items).

Any ideas on what Iā€™ve missed or if Iā€™ve taken the wrong approach? Iā€™m happy to post my configuration if that helpsā€¦not sure if Iā€™ve made a mistake or got the wrong idea on how the binding should work.

Thanks

(Iā€™m using Openhab 2.5 on Windows 10)

Then debug logging on for the binding restart openHAB and start playing something in one of your clients then upload the log here.

I need to find some time to push this through to completion but life has gotten in the way. And for now the binding has been pretty rock solid for me.

1 Like

Iā€™ve actually managed to get it to work now for one client. I didnā€™t change anything (except logging to debug) but the TV client is now working. I think it might have been the additional reboot that helped (I had done a reboot but didnā€™t initially help).

I still canā€™t get it to work for Chrome web clients. Has anyone got web clients working? (Not a major issue for me the TV was the main aim) but would be good to know if others have got those working.

Also for anyone else I think part of the problem I was experiencing was that the Title channel doesnā€™t seem to populate. The ShowTitle is the channel to use. I think the reboots coupled with the Title channel not populating may have been my issue.

volfan6415 I understand about life getting in the wayā€¦Iā€™ve had the same! Iā€™d be happy to put together a pull request to update the Git readme file if that helps. I could post some example config and an overview of the things in this thread?!? No problem if you would rather I didnā€™t!

@db.steele Glad you got it working. I would love the help. Please do.

hey,

small question is there any other download location for the bundle install of maven ? The doesnā€™t seem to be working for me.

I am confused are you trying to build from my source?

My apoligies, i didnā€™t see your reply.
i didnā€™t got it to work so i figured i had to install the bundle install of maven.

eventually it did work but now it is again failing to acces my instance of emby. the bridge is trying to connect but it fails. Is there any way i can extract only the logs for the emby-binding ?

Regards
sander

Yes, there is.
Go to userdata/etc and find this file: org.ops4j.pax.logging.cfg then insert this code at end.

# Emby log appender
log4j2.appender.out.type = RollingRandomAccessFile
log4j2.appender.out.name = LOGFILE
log4j2.appender.out.fileName = ${openhab.logdir}/emby.log
log4j2.appender.out.filePattern = ${openhab.logdir}/emby.log.%i
log4j2.appender.out.immediateFlush = true
log4j2.appender.out.append = true
log4j2.appender.out.layout.type = PatternLayout
log4j2.appender.out.layout.pattern = %d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n
log4j2.appender.out.policies.type = Policies
log4j2.appender.out.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.out.policies.size.size = 4MB 

Maybe, you should create file ā€œemby.logā€ first under /userdata/logs

This seems to just put all of the logs from openhab into the emby.log file ?

Also thank you, i just had to search the right file locations for linux :slight_smile:

Yes, it does only. But easier to follow the logging

What OH version do you use?

iā€™m running 2.5.2-1 on linux ubuntu server

@volfan6415 thank you for the binding.

I have load the Plugin in the folder /usr/share/openhab2/addons
But I donā€™t find the binding in PaperUI, and with log:tail I donā€™t see any error from emby binding.

Does someone have an idea where I can dound the problem