Snapserver - enable HTTP Json RPC (HTTP POST and websockets)

  • Hello is there any plan to enable this feature in Snapserver?

  • Hi Mr.Tiptop could you share the background to what you are trying to achieve?

    A few ways to complete this, edit the file, update the addon settings system to allow user config, turn it on for all. All have pluses and minuses?

  • Hello, thanks for the reply.. So to my knowledge the snapserver addon seems to be a light version (no full config file) - again to my knowledge. So if there is a way i can edit the addon config where can i find this file. the normal snapserver.conf is in /etc/snserver.conf, but this file does not exist in libreelec as its an addon.. Sorry if i am not explaining properly.

    Currently port 1704/1704 are open. i would like to enable 1780 http JSon RPC so that i can install snapweb on my server.. this will allow me to control all my snapclients via web interface instead of CLI

  • In looking at the config here is what you will need to update / change:

    - Update the bin/snapserver.start file adding the option “--http.enabled 1” to the snapserver startup line, the addon files can be found in “/storage/.kodi/addons/service.snapserver“.

    For bonus points: update settings.xml and strings.po using variables to enable / disable http. You could then submit this as a LibreELEC PR via github :)

    Help details from snapserver

  • So i have managed to do some of what you suggested, but i cant edit advancedsettings.xml or settings.xml as it say file system readonly. i am also struggling to get http service up.. naturally in can browse to my box on port 8080, but its not binding port 1780 as i have specified in the snapserver config.

  • Can you run the following:

    Code
    Pastebinit snapserver.start <—- and shard the url
    systemctl restart kodi 

    These are the files of interest. You don’t need to edit the other files (just the ones in .Kodi/addons/service.snapserver

    and “netstat -ant | grep LISTEN” will allow you to check if port 1780 is actually LISTENing

  • http://ix.io/2UDr

    strings.po looks like this:

    netstat -ant | grep LISTEN

    does not seem to be binding on port 1780

  • What is in the settings file?

    - ./resources/settings

    Note: I did my tests with LE10b1

    But Lets try and check if 9.2.x will work :)

    Does snapserver -hh describe the http options?

    in the Kodi addons settings application (are both of your new options showing up? And set as 1 and 1780 respectively?

    Remembering that either a Kodi restart or ensuring the addon is restarted once making the changes is required.

  • So it seems that version v0.15.0 does not have this feature or options in them yet :(. so it seems that we have found the route of the issue.. is it possible to use LE10 office addon snapserver with LE9.2.6?

  • The LE10 add on binary (as-is) will not run on 9.x due to glibc library changes and others. It is possible that Snapcast current could be backported - though 9.x is in a maintenance state, I would suggest that the functionality changes be built and committed to LE10, then raise a request for the backport. Alternatively - compile the current and update the local copy.

    Are you planning on staying with Kodi 18/LE9 or planning on upgrading?

  • The LE10 add on binary (as-is) will not run on 9.x due to glibc library changes and others. It is possible that Snapcast current could be backported - though 9.x is in a maintenance state, I would suggest that the functionality changes be built and committed to LE10, then raise a request for the backport. Alternatively - compile the current and update the local copy.

    Are you planning on staying with Kodi 18/LE9 or planning on upgrading?

    I am planning to go to LE10 as soon as its available on Pi3.

    Ill let you know how i get along. Thanks for all the help! been really good.