Driver for Logitech Media Server

Hi.

I've pushed my driver for Logitech Media Server on GitHub:

https://github.com/br0wny/neeo_driver_squeezebox

It's a fork from https://github.com/clegendre/neeo_driver_squeezebox with many changes:

  • Restructured project for multi-driver approach
  • Async/Await for Req/Res
  • Telnet-Listener for notifications (New Song) --> Current Song info is updated when a new song is played
  • Changed Neeo "DeviceBuilding" use discovery

It's still not fully finished yet. Some features are not supported (yet) by the SDK.

TODO/Planed Features

  • DONE Automatically add favorites
  • DONE Display playlist
  • DONE Update to NEEO CLI
  • (Sync Players)

Many thanks to Cédric Legendre and Stuart Trout  for the previous work.

 

PS: The reason I restructured the project is the following:
I use a Netgear NAS to store my media and the LMS is also running on it. In my living room I have a UDOO X86 (A sort of Raspberry) with Ubuntu and KODI. I've combined the LMS and the KODI driver and this is running on the UDOO. So now I have a single SDK-Adapter running in my home and it's easy to add new device-drivers if needed.

UPDATE 2018-11-01: I've just pushed an update to GitHub. I added some directories. Now you can browse through your current playlist, your favorites and even your music library. The setup also got easier, because the SDK supports a musicplayer now by default.

UPDATE 2019-01-13: I've just pushed an update to GitHub. The driver is now compatible with the NEEO CLI.

UPDATE 2019-04-14: Removed combined Squeezebox/Kodi Repo

Have fun!

Reply
19replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi Mario Braun I got the following error with your code:

    NeeoDriver: +++++ Starting NEEO driver
    NeeoDriver: Discover one NEEO Brain...
    events.js:167
          throw er; // Unhandled 'error' event
          ^
    
    Error: addMembership EADDRINUSE
        at Socket.addMembership (dgram.js:626:11)
        at Socket.<anonymous> (/root/neeo_driver_squeezebox/node_modules/multicast-dns/index.js:57:18)
        at Socket.emit (events.js:187:15)
        at startListening (dgram.js:168:10)
        at _handle.lookup (dgram.js:286:7)
        at process._tickCallback (internal/process/next_tick.js:63:19)
        at Function.Module.runMain (internal/modules/cjs/loader.js:721:11)
        at startup (internal/bootstrap/node.js:228:19)
        at bootstrapNodeJSCore (internal/bootstrap/node.js:576:3)
    Emitted 'error' event at:
        at Socket.<anonymous> (/root/neeo_driver_squeezebox/node_modules/multicast-dns/index.js:59:16)
        at Socket.emit (events.js:187:15)
        [... lines matching original stack trace ...]
        at bootstrapNodeJSCore (internal/bootstrap/node.js:576:3)

    Can you pls help? I configured according to your instructions on github repository. Thank you in advance!

    Reply Like
    • Hi janus.  Sorry for the late reply.

      Looks like the Address is in use already.

      Are you running two neeo drivers at the same time?

      BR Mario

      Reply Like
      • janus
      • janus
      • 11 mths ago
      • Reported - view

      Hi Mario Braun ok thanks I rebooted the brain and deleted all references to the drivers. Now I got the following error:

      NeeoDriver: +++++ Starting NEEO driver
      NeeoDriver: Discover one NEEO Brain...
      NeeoDriver: Brain discovered: NEEO Living Room
      NeeoDriver: Start server
      NeeoDriver: Error: BRAIN_NOT_REACHABLE
      

      I pinged the brain ip address and I got reply. What seemed to be the problem here? Thanks in advance!

      Reply Like
    • Hi janus.

      I assume you are using a Windows OS.
      This version of the SDK has a problem with the autodetection of the neeo brain.

      Go to neeoDriver/neeoDriver.js and change line 29 to the correct IP displayed in you Neeo App or set the env variable.

      const brainIp = "192.168.0.xx";//process.env.BRAINIP;

       

      PS: I made some updates (Current Playlist, Music Library and Favorites as lists) to my driver 4 month ago, but then I had no time to finish them.

      BR Mario

      Reply Like
      • janus
      • janus
      • 11 mths ago
      • Reported - view

      Hi Mario Braun thank you so so much for the solution. Now the driver is working! And no, I'm not running Wi downs but on a Raspberry Pi Model 3B+ 😊

      There is still a small issue when the music is playing: NEEO doesn't show that it's playing on the home screen. I tried restarting the driver but it doesn't help. Do you know what can I do? 

      I like the idea of adding my playlists on NEEO. How do I add my music library? 

      Awesome driver! Kudos to you! 

      Eric

      Reply Like
    • janus 

      Do you mean the now active display on the home screen? It is working in my configuration...

      The configuration of the music library (Adding folders the library) can be done via the webinterface of the Logitech Media Server. Just go to: http://xxx.xxx.xxx.xxx:9000/ insert the ip address of you Server.

      BR Mario

      Reply Like
      • janus
      • janus
      • 10 mths ago
      • Reported - view

      Mario Braun 

      Sorry for my late reply. The now active display for LMS works now after I added Power On command to my recipe. Kudo! ;-)

      Somehow I still have problems adding my playlists. Here is my configuration:

      // Set Favorites
      config.squeeze.favorites = [
      {
              name : 'daily mix 3',
              name : 'Billboard Hot 10',
              name : 'Chill Mode: On',
              name : 'Daily Mix 2018',
              name : 'Deep House Relax',
              name : 'Discovery Weekly',
              name : 'EDM HOUSE 2018 presented by bigFM nitroX',
              name : 'Good Vibes',
              name : 'Lazy Sunday Music',
              name : 'Mood Booster',
              name : 'Pop Remix',
              name : "Summer '18",
              name : 'Summer Party',
              name : 'Young, Wild & Free',
              name : 'Summer songs',
              name : 'Your Summer Rewind'
      
      

      The playlists just don't show up on the remote. Do you have any instructions for me on how to set it up?

      Another thing is: I have already setup my music library on LMS. How do I add it in NEEO? And the cover art image doesn't work as well. 

      Thank you for your driver! I really appreciate it!

      Janus

      Reply Like
    • Hi janus.

      There is only a little mistake in the configuration. It should be an array of JSON Object with a name field. Like this:

      // Set Favorites
      config.squeeze.favorites = [
      {
              name : 'daily mix 3'
      },{
              name : 'Billboard Hot 10'
      },{
              name : 'Chill Mode: On'
      }];

      The names of the favorites have to be the same as configured in the Logitech Media Server (via web interface).
      If you change the values in config.js, you have to newly add (delete and add) the device to you remote. Otherwise the new favorites are not shown as Shortcuts in your remote.

      Regarding adding (playing) music library via NEEO: At the moment it's not possible the play a certain track/album of the library. There are two shortcuts. With "Play random album" a random album is loaded in the playlist and only this album is played. With "Play random tack" the whole library is loaded in the playlist. Working on it.

      Regarding album cover: Are the images displayed in the web interface? The driver is requesting the image directly from the LMS. I have sorted my library by hand and added the image to the ID3 Tag of each mp3/flac file with mp3tag. A very tedious and long-term process 😉.

      I think you can also paste an image in the album folder. You can find more info here: http://wiki.slimdevices.com/index.php/Album_Artwork

      BR Mario

      Reply Like
  • Hi  Mario Braun , thank you for the codes. Now I have my playlists on NEEO! Neat!

    As for the album art, my local music files were tagged correctly and they show on the remote. However, when I stream music the album art doesn't work.

    And also the song info (title, artist and album) is not updated when the playback continues to the next song. Perhaps this is something you are aware of/and fixing?

    Thank you!

    Janus

    Reply Like
  • Hi!

    I just pushed an update on GitHub.
    The driver is now compatible with the NEEO CLI.

    If you have any issues, contact me!

    BR Mario

    Reply Like
  • I tried your driver, but I doesn't get it to run. I have already installed 4 other drivers without any issue. I installed the driver like described on github, step by step. Afterwards I tried to run all the driver with: npx neeo-cli start. Theres the output after that command:

    pi@raspberrypi:~/my-neeo-server $ npx neeo-cli start
    Info: No Brain address configured, attempting to discover one...
    Warning: loading driver from legacy devices/index.js for neeo-denon-avr. Please check if an updated driver is available.
    Warning: loading driver from legacy devices/index.js for neeo-driver-enigma2. Please check if an updated driver is available.
    Warning: loading driver from legacy devices/index.js for neeo-simple-http. Please check if an updated driver is available.
    Warning: loading driver from legacy devices/index.js for neeo_driver-kodi. Please check if an updated driver is available.
    NEEO SDK Example "Denon" adapter
    ---------------------------------------------
    NEEO SDK Example "Enigma2" adapter
    ---------------------------------------------
    Kodi Driver by Niels de Klerk.
    Info: - Brain discovered: NEEO Living Room
    Info: Start server, connect to NEEO Brain: { brain: 'NEEO Living Room', host: 'NEEO-73bf64ea.local' }
    [CONTROLLER] register update state
    Updater registered.
    events.js:183
          throw er; // Unhandled 'error' event
          ^

    Error: listen EADDRINUSE 0.0.0.0:6336
        at Object._errnoException (util.js:1022:11)
        at _exceptionWithHostPort (util.js:1044:20)
        at Server.setupListenHandle [as _listen2] (net.js:1367:14)
        at listenInCluster (net.js:1408:12)
        at doListen (net.js:1517:7)
        at _combinedTickCallback (internal/process/next_tick.js:141:11)
        at process._tickCallback (internal/process/next_tick.js:180:9)

    I don't know if this helps, I understand nothing from this output, only that something went wrong.

    Is there another way to localise the error better?

    I hope you can help me, would like to use your driver ;).

    If you need more Info, is no Problem, but at the moment I don't know what necessary.

    By the way, are you German?

     

    Thanks

    Ben

    Reply Like
    • Hi Ben

      Sorry for the delay, I didn't have the time to take a closer look at the error.

      I had the similar problem this week. The Error "listen EADDRINUSE 0.0.0.0:6336" means, that the address/port the driver is trying to use is already taken. The problem with my setup was that an instance of the driver was still running. I couldn't stop it, so I did a restart on my Udoo (Similar to Raspberry Pie).
      Then the driver(s) where running without problems.

      If you still have problems, just let me know.

      No, I am Austrian. 😉🇦🇹

      BR Mario

      Reply Like
  • Hi Mario Braun did you manage to check if the album art is working now for music streaming? The album art is shown correctly on LMS but not on the remote. Thank you so much for your time!

    Reply Like
    • Hi janus I just pushed an update of the driver to GitHub.

      The album art should now be working, for currently playing cover and the covers in the favorite directory.

      Please let me know if you still have issues.

      BR Mario

      Reply Like
      • janus
      • janus
      • 5 mths ago
      • Reported - view

      Mario Braun Wow kudos to you! Such a quick reply! And the album art works now flawlessly! And I followed your github instructions to add the shortcuts and they look awesome! Really great! 

      I found some glitches though when browsing my local music library. It has mixed English and Chinese songs. The browsing will somehow timeout and threw an error: Sorry, could not load Artists list. Press here to retry... I obeyed and the list will start at the top again. I never got to browse the list to the end. In the console output I could see that the Chinese characters were rendered correctly so I wondered if it's a limitation of NEEO?

      Thank you for your time and efforts! 👍

      Reply Like
    • Hi janus
      I also noticed some issues with the music library. Only the first 64 entries where loaded. I have done some fixes and optimizations here.

      The current playlist directory also made some problems. My old solution was kind of slow and for long playlist (> 100 entries) it took too long and timed out. I've also optimized this feature.

      Please let me know if you still have issues with the Chinese songs or if it is working now.

      BR Mario

      Reply Like
      • janus
      • janus
      • 5 mths ago
      • 1
      • Reported - view

      Mario Braun Hi awesome! It works now. Even Chinese characters are now rendered correctly! Hoorah!!!! Now my NEEO is more useful!! Thanks a lot!!!!

      Reply Like 1
  • Hi Mario Braun , I noticed that the song title and artwork do not get updated when I start playing from LMS and it also doesn't update when I switch on the recipe on NEEO. It doesn't sync with the currently playing song. Do you notice this too? And is there a fix? Thanks!

    Reply Like
    • Hi janus, sorry for the delay. I also noticed this issue, but had no time to take a closer look.

      The error message I get is COMPONENTNAME_NOT_FOUND. Do you get the same error message?

      I've tried to fix this problem, but haven't found a solution jet. The curious thing is that it's working on my windows machine (development) but not working on my linux machine.

      Maybe this helps to solve your problem: https://planet.neeo.com/t/36p2pj/componentname_not_found-when-sending-update

      BR Mario

      Reply Like
Like2 Follow