[HowTo] Moonlight-Embedded (former Limelight) using Luna Launcher

We are working on this since its all pretty much alpha atm its gonna be pretty unstable im working on systemd files while dodslaser is working on the addon

our plan is to have a simple setup for all of this so the user doesnt have to know anything in order to setup and use moonlight but its gonna take some time so please have some patience

3 Likes

That’s good news!!

Looking forward to this !:blush: Any estimated release dates for controller fixes?

no deadline got shitloads of other things to do before this

Its ok:)

We are keeping our fingers crossed…:wink:

My thoughts about this add-on (what i d like to see more in this add-on):

  1. Ability to create a custom map file throught addon’s gui (e.g xbox.map, logitech.map etc) and save it
  2. Ability to add 2nd, 3rd controller
  3. General optimization! (especially when you exit moonlight it takes some time to get back to kodi)

Keep up the good work:smile:

First of all, a huge THANK YOU to @Toast and @dodslaser for their work. Kodi and Moonlight side-by-side on Raspberry Pi is a dream.

I am having trouble getting my controller working with Moonlight. It works perfectly in Kodi. I go into Moonlight settings, enable the controller, point to my .map file, and /dev/input/event3. When I launch Moonlight it says no controllers are present. How can I further debug this issue? Do you have any suggestions?

Edit: Maybe the same problem as @Haris1977? Has the cause of the bug been identified?

I just pushed some updates to the development branch on GH (both moonlight-osmc and script.moonlight-osmc). Unfortunately I’ve been unable to test the controller stuff right now (which is why it’s buggy) so I’ve disabled the settings for now. I can’t test it out until I compile xpad (since i only have an xbox one pad). Hopefully I’ll get basic input support working sometime next week.

However, in order to fully support some controllers out of the box we’ll have to build some new drivers with the kernel. That might take a while before it happens. Keep in mind this is very much in alpha right now.

Edit: I just realized I forgot to release the debs ans zip for the new version. I could put them on GH, but they’re probably buggy, and controllers will be disabled for now.

The slow response to closing the stream bugged me too. I basically rewrote the whole thing this week, and most of the slowness seems to be fixed. I think. See the above post for an answer about the controller stuff. Basically I just don’t have a working controller to test it with right now.

If I can find time this weekend I’ll have a go at enabling controller support myself in your latest dev branch.

I don’t mind slowness opening and closing (5 or 10 seconds) as long as works reliably and I can use a controller.

Thank you again for the work you’re putting into this! I’m looking forward to have it set up and running smoothly in my living room.

Just noticed @toast posted an example config. I couldn’t find that before. This should make things easier. Expect a test version soon!

Edit: Test versions are released on GH now. I’m not sure if the RBP2 version will work or not, as I’m unsure of it uses the snd-bcm2835 module like the RBP1 or if it uses a snd-bcm2836 (which is what I guessed).

Controllers should work now, anyways!

Edit2: Merged the pi versions. Couldn’t find any mention of a snd-bcm2836 module, so I used snd-bcm2835 for both. Also forgot to enable the settings (doh!). I’ll fix it in a few hours.

Edit3: Settings are now enabled. I also pushed the latest commit to moonlight-osmc. Aparently I forgot to do that before building the package. The last commit will claim to have happened after the last release, but that’s incorrect.

@dodslaser Thanks for the quick reply and new version! However, when I try to install it I get an error. I don’t know much about .deb files, but perhaps you’re missing a backslash after /usr/bin?

osmc@osmc:~$ sudo dpkg -i rbp-moonlight-osmc_0.3.2_all.deb
(Reading database ... 25183 files and directories currently installed.)
Preparing to unpack rbp-moonlight-osmc_0.3.2_all.deb ...
Unpacking rbp-moonlight-osmc (0.3.2) ...
dpkg: error processing archive rbp-moonlight-osmc_0.3.2_all.deb (--install):
 trying to overwrite directory '/usr/bin' in package evtest 1:1.32-1 with nondirectory
Errors were encountered while processing:
 rbp-moonlight-osmc_0.3.2_all.deb
osmc@osmc:~$ dpkg --info rbp-moonlight-osmc_0.3.2_all.deb 
 new debian package, version 2.0.
 size 2998 bytes: control archive=749 bytes.
     436 bytes,    12 lines      control              
     276 bytes,     4 lines      md5sums              
     204 bytes,    10 lines   *  postrm               #!/bin/bash
     119 bytes,     9 lines   *  preinst              #!/bin/bash
 Package: rbp-moonlight-osmc
 Source: moonlight-osmc
 Version: 0.3.2
 Architecture: all
 Maintainer: Erik Lundgren <eriklundgren93@gmail.com>
 Installed-Size: 40
 Depends: rbp1-mediacenter-osmc | rbp2-mediacenter-osmc, moonlight-embedded
 Section: misc
 Priority: optional
 Homepage: https://github.com/dodslaser/moonlight-osmc
 Description: Moonlight scripts for OSMC
  Scripts for running moonlight-embedded on OSMC for the RaspberryPi (1 and 2)
osmc@osmc:~$ dpkg --contents rbp-moonlight-osmc_0.3.2_all.deb 
drwxr-xr-x root/root         0 2015-11-06 17:45 ./
drwxr-xr-x root/root         0 2015-11-06 17:45 ./lib/
drwxr-xr-x root/root         0 2015-11-06 17:45 ./lib/systemd/
drwxr-xr-x root/root         0 2015-11-06 17:45 ./lib/systemd/system/
-rw-r--r-- root/root       362 2015-11-06 17:44 ./lib/systemd/system/moonlight-osmc@.service
drwxr-xr-x root/root         0 2015-11-06 17:45 ./usr/
-rwxr-xr-x root/root      1508 2015-11-06 17:45 ./usr/bin
drwxr-xr-x root/root         0 2015-11-06 17:45 ./usr/share/
drwxr-xr-x root/root         0 2015-11-06 17:45 ./usr/share/doc/
drwxr-xr-x root/root         0 2015-11-06 17:45 ./usr/share/doc/rbp-moonlight-osmc/
-rw-r--r-- root/root       382 2015-11-06 17:44 ./usr/share/doc/rbp-moonlight-osmc/changelog.gz
-rw-r--r-- root/root      1023 2015-11-06 17:44 ./usr/share/doc/rbp-moonlight-osmc/copyright
osmc@osmc:~$

Is that a bug on line 43: hard-coded IP address? https://github.com/dodslaser/moonlight-osmc/blob/development/moonlight-osmc#L43

Found a few syntax errors in default.py, too. I wanted to send a pull request but I won’t have the time tonight. Sorry.

Whoops. Well, this is awkward. I’ll try to fix it right away.

Edit: Hmm, this is why I don’t like pushing code I can’t test. I’ll have to look into these things after the weekend. Until I can test it I’ve removed the latest releases of both the add-on and moonlight-osmc.

No worries, I understand. It was enough to point me in the right direction and keep hacking. :smiley:

Cool! I’ll probably won’t do releases without testing and merging to master in the future. I did most the coding this week early in the morning on the train to university, so I can see why there were so many bugs. Never code before your morning coffee.

I’m away this weekend, so I won’t be able to iron out all bugs right now. I did compile xpad before leaving though, so once I get home I should be able to get a fairly stable version up.

How do i update the moonlight-osmc when new versions come? I have used this site (https://github.com/dodslaser/moonlight-osmc) to download it

Don’t update from the version in the debian repo, it might break stuff. I’ve fixed the nasty bugs, but I’m having some issues with input stuff (it lags when using config files for some reason) so I won’t release the update until I’ve worked that out.

Once I merge the update to master and release it I’ll probably take my debian repo down and put the debs in the GH release page instead. You’ll have to install using dpkg.

Dang… literally just setup a new OSMC installation just to try this and getting unmet dependancy and broken packages errors - is this because of what you’re mentioning?

Do I need to clean up/remove the attempted installation? I’m happy to wait for an update but in the meantime where can I find the package to install with dpkg? Thanks for your work and patience. :smile:

@diagonali Hmm, the one in my debian repo should work… What dependencies are you missing?

From memory (not at my Pi at the moment) it said something like moonlight-osmc was missing dependency on moonlight-embedded. I followed the instructions at the top of this thread and ended up manually editing the sources.list because the one of the commands wouldn’t work. I’ll try again and post with the exact message. Thanks

Edit: This is the message i’m getting:

I’m running a Raspberry Pi 1 (original) does that make a difference to the source? I tried replacing “wheezy” with “jessie” and that didn’t work for probably obvious reasons.

The duplicate is because i added the source to the sources.list as well as the method given at the top of this thread.

osmc@osmc:/etc/apt$ sudo apt-get install moonlight-osmc
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
moonlight-osmc : Depends: moonlight-embedded but it is not installable
W: Duplicate sources.list entry http://repo-dodslaser.rhcloud.com/ wheezy/main armhf Packages (/var/lib/apt/lists/repo-dodslaser.rhcloud.com_dists_wheezy_main_binary-armhf_Packages)
W: You may want to run apt-get update to correct these problems
E: Unable to correct problems, you have held broken packages.
osmc@osmc:/etc/apt$ osmc@osmc:/etc/apt$ sudo apt-get install moonlight-osmc
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
moonlight-osmc : Depends: moonlight-embedded but it is not installable
W: Duplicate sources.list entry http://repo-dodslaser.rhcloud.com/ wheezy/main armhf Packages (/var/lib/apt/lists/repo-dodslaser.rhcloud.com_dists_wheezy_main_binary-armhf_Packages)
W: You may want to run apt-get update to correct these problems
E: Unable to correct problems, you have held broken packages.

@diagonali Well, first of all you seem to have my repo added twice in sources.list (or you’ve made changes to the list without running apt-get update).

The wheezy tag just denotes the distro the package was built for (basically tells apt-get what dir to look in on the repo). This doesn’t mean it won’t work on Jessie (this is often, but not always, the case for small repos; we just need to have a distro tag to build the package).

The main issue in your case is probably that you haven’t installed the moonlight-embedded package. I set moonlight-embedded as a dependency rather than a suggested package, so unless you install moonlight-embedded via apt it won’t work. Hence if you built moonlight from source the package won’t work.

Tl;dr: You need to add irtimmers debian repo for moonlight-embedded to sources.list, make sure my repo isn’t in there twice and run sudo apt-get update && sudo apt-get install moonlight-osmc. Source built moonlight-embedded will not work.