Kodi Community Forum

Full Version: Does HTTP web server in kodi system the same of SimpleHTTPServer ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Hi Guys,

I want to know if the HTTP web server which I can enable it with port 8080 in kodi service the same of SimpleHTTPServer?

because I tried to access the file with 192.168.1.200:8080/test.py but I couldn't see it until I activate python -m SimpleHTTPServer 8000 then I can see the content of test.py filr through this link 192.168.1.200:8000/test.py!

are they different?
Two different things.  The 'HTTP web server port' in Kodi is actually the port you need to send jsonrpc requests to.  The python command you executed has started the SimpleHTTPServer on port 8000.  Therefore, connecting to that port will display whatever the python server is serving.  Kodi doesn't 'serve' stuff on that port, rather it listens on it.

https://kodi.wiki/view/Archive:Web_Server_HTTP_API
Thank you yes clear!

So it's better to make Ubuntu server and enable Simple HTTPServer on it I think it's better!
(2018-09-21, 19:36)Spiderfish Wrote: [ -> ]Thank you yes clear!

So it's better to make Ubuntu server and enable Simple HTTPServer on it I think it's better!
 SimpleHTTPServer is really only designed for development and testing. What are you using it for? Usually, you would use something like apache, nginx or lighttpd.
Actually I am using it to pass values between two kodi users!

Can I install apache in kodi libreelec ?
(2018-09-21, 19:36)Spiderfish Wrote: [ -> ]Thank you yes clear!

So it's better to make Ubuntu server and enable Simple HTTPServer on it I think it's better!
 Libreelec is not Ubuntu !!  If you were running an Ubuntu server then Apache2 or nginx would be my choice.  But you're not running Ubuntu.  If you want to share stuff between two Kodi instances, wouldn't it be easier to use a directory shared between the two instances, both with r/w access ? I'm already sharing stuff between 4 kodi instances using shared directories and file substitution in advancedsettings.xml
How can I install apache server in LibreELEC 8.2.5 ?

what I have to edit in advancesetting.xml to be able to share between kodi users?

Many thanks
(2018-09-21, 19:42)Spiderfish Wrote: [ -> ]Actually I am using it to pass values between two kodi users!

Can I install apache in kodi libreelec ?
I'm a bit confused by "I am using it to pass values between two kodi users".. what do you mean by "two kodi users"?  Do you mean:
  • two separate machines, each running kodi installations
  • two separate users on the same machine, both running kodi
As LibreElec is based on Linux, you can definitely install apache on it (this is completely independent of Kodi).  However, given LibreElec is intended to be a "just enough OS to get Kodi up and running" you're kinda moving away from its core goal and you could end up spending more time building it out when perhaps you could be better off getting a fuller-built OS (like Raspbian) then dropping Kodi on that.

For what it's worth, I originally went the former route - I wanted a media player that I could build up to provide server services so began with Raspbian, then figured out the Pi wasn't powerful enough.  I then went the KodiBuntu route on a more powerful box (a Zotac) and experienced less problems dropping services in place.  I'm not sure if that's what you're after.
@Preacher 
Yes I mean 
"two separate machines, each running kodi installations"

I was be able to pass values between them but I have to run SimpleHTTPServer on it. Thats why I am asking for Apache service to be inside LibreELEC.

Can I install Raspbian Kodi in any hardware like nano pc? or need Raspery platform?

because I have LibreELEC 8.2.5 and spend a lot of time to modify the skin  Big Grin  so can I upgrade or updae my current OS into Rasbian Kodi or i have to install it from scratch?
Read about the golden hammer pattern.

There is 100% a better solution than installing apache on a kodi client.
@fritsch 

Any link suggestion  Wink
(2018-09-22, 11:53)Spiderfish Wrote: [ -> ]Any link suggestion  Wink
 https://deviq.com/golden-hammer/

Basically: "if the only tool you have is a hammer, every problem begins to look like a nail" - it's a well-known antipattern in which people familiar with a specific solution deem it the solution to ALL their problems.  It occurs a lot in the business world, for example the number of people using Excel as a database or table formatting program because they're so comfortable with it they don't entertain the idea that there could be similar tools out there.

A similar concept is something called the X-Y problem: https://en.wikipedia.org/wiki/XY_problem - where someone decides on a solution then asks for help with that particular solution, rather than explaining the problem - robbing them of any possibility that there are alternative (and potentially easier) solutions.  I often describe this as: "tell me your destination, not your journey" - describe to me what you wish to achieve, not the way you believe you ought to go about it... and let me propose different journeys for you to consider.

So, in summary: what is the problem you're trying to solve here?  I'm not saying that HTTP isn't the right approach, just that it appears to be the only approach you've considering but the problem seems to be interoperability or communication between two systems - the fact they happen to both be running Kodi seems incidental.
(2018-09-22, 08:16)Spiderfish Wrote: [ -> ]because I have LibreELEC 8.2.5 and spend a lot of time to modify the skin  Big Grin
Is your concern here that you had to expend effort making modifications to get things working, or that you wish to preserve the skin for any other installations?

If it's the latter, I believe there's a way of exporting that skin so it becomes another theme/skin that can be ported across.  I presume you know how to do this, simply as a means of taking a backup of your settings?
Quote:Is your concern here that you had to expend effort making modifications to get things working, or that you wish to preserve the skin for any other installations?

If it's the latter, I believe there's a way of exporting that skin so it becomes another theme/skin that can be ported across.  I presume you know how to do this, simply as a means of taking a backup of your settings?

If I took backup for Folder skin.confluence >>>Will be enough ? and replace it in new OS ?
(2018-09-22, 14:23)Spiderfish Wrote: [ -> ]
Quote:Is your concern here that you had to expend effort making modifications to get things working, or that you wish to preserve the skin for any other installations?

If it's the latter, I believe there's a way of exporting that skin so it becomes another theme/skin that can be ported across.  I presume you know how to do this, simply as a means of taking a backup of your settings?

If I took backup for Folder skin.confluence >>>Will be enough ? and replace it in new OS ? 
No.  You need to take a backup of skin.confluence under Addons and you need to take a backup of skin.confluence under userdata/addon_data  .  That way, you will preserve all the settings (configuration) of the skin as well.  If you then overwrite those two directories on the target machine, the skin will be exactly the same as on the source machine.  If you don't copy skin.confluence in addon_data (which is where the settings for the skin are) then although the actual skin will be copied, any setup changes, such as turning off a particular menu will not be.
Pages: 1 2 3 4