Kodi Community Forum
MediaFrontPage - Web interface with widget type architecture to control multiple apps - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+--- Thread: MediaFrontPage - Web interface with widget type architecture to control multiple apps (/showthread.php?tid=83304)



- _Mikie_ - 2011-05-26

Nick8888 Wrote:Php is executed on the server. Therefore provided your web server is on the same local network as the computer running xbmc, you shouldn't need to forward any ports?
Good point. That's if you can get it to work when the script is hosted on a local webserver..


- gugahoi - 2011-05-26

Nick8888 Wrote:What happens when you ping a machine that is running, xbmc is running but the jsonrpc is turned off?

I don't think there's anything we can do in this case, is there?I believe this should be set up when configuring MFP at first, and never changed again.

Nick8888 Wrote:This will only benefit people who have xbmc on a different computer to their web server?

I understand your point now. Hadn't thought of that before but you're right. If the machine where MFP is, is sleeping, there's not much one could do! So, ye, only benefits people that have WebServer and XBMC on different computers.


- hernandito - 2011-05-26

This logo looks much better on Navigation bar. I am including a full size version, and one that is a replacement for the home icon in /media.


Image

Image


- DejaVu - 2011-05-26

hernandito Wrote:I am including a full size version
Holy Shit.. Your not kidding!
That might just be a tad oversized for the small space it lives in. lol


- drunkendragon - 2011-05-26

gugahoi Wrote:That's expected, wSystem is not using xbmcjsonlib.php, it uses a new class I found on the forum so it will not have fixed itself. I'll see if I get somewhere today with regards to that. Can I ask you to delete wSystem (also remember to remove it from layout.php) and see if you still get the jQuery errors? Just to make sure that that is, in fact, the problem.

disabled it in layout.php ( // "wSystem" => array etc ) and i can edit, move, close the widgets again..


- hernandito - 2011-05-26

DejaVu Wrote:Holy Shit.. Your not kidding!
That might just be a tad oversized for the small space it lives in. lol

When MFP becomes the next Google, the large size graphic may become handy, to produce large signage for the many buildings of the corporate headquarters campus.


- SleepyP - 2011-05-26

A couple things.
1-Most of the people I know of who do this kind of stuff a lot run one main "server" box and then one or more XBMC client boxes. These are the people who are using MySQL databases for the backend. I am one of them, we have XBMC running off and on on 4 different systems on my LAN. Any of the enthusiast guys using the MySQL database stuff are probably in the same boat and will be potential users of this functionality.

2-Wake-On-LAN is by necessity a "local network only" kind of thing and generally not something you want do over the internet. This is because when a machine is sleeping, it generally has no IP address. As a result, the "magic packet" sent to wake it is sent as a UDP broadcast, meaning it's sent everywhere on the LAN. It contains the MAC address for the machine you intend to wake, which is why it will only effect that machine.

3-Given 2, it works in this context because MFP would be doing the WOL broadcast to the local LAN. Where you are connecting FROM is irrelevant because your client machine isn't the one making the WOL broadcast. Its strictly your server box talking to the LAN. As a result there is zero port forwarding required to do this, and indeed trying to do such stuff over the internet is usually a bad idea and potentially also a security risk if you're paranoid.

4-This should be doable entirely with the built-in PHP socket functions, no extra software will be needed. Last night I made a function that sends a UDP packet to my machine that runs XBMC. The script sends a simple UDP packet to a specific port on my desktop box. EventGhost's "UDP Broadcast" plugin can send and receive UDP packets and react to them, so that's what listens for this signal and then I have that triggering my "Launch XBMC" macro. The same exactly function will also work if used with the XBMC UDP Launcher app, but why install more stuff if I already have Event Ghost? Anyways, its not a very large leap to go from "send a random packet over here" to "Send a wake-on-LAN" packet.

5-I need to add curl to the script I made that checks your server's configuration for compatibility and issues. I think having a script like that will help with the troubleshooting and support of MFP. So far it checks for PHP, and then inside of PHP it displays your PHP version #, checks for the XML Library, and will check for CURL. What else should it do?


- gugahoi - 2011-05-27

drunkendragon Wrote:disabled it in layout.php ( // "wSystem" => array etc ) and i can edit, move, close the widgets again..

Just as I suspected, that error is propagating so that confirms that the interaction with XBMC nightlies is what breaks things. I've been a bit busy, will try and make it compatible with them as soon as I can. Thanks for checking that for me!


- gugahoi - 2011-05-27

drunkendragon Wrote:disabled it in layout.php ( // "wSystem" => array etc ) and i can edit, move, close the widgets again..

Alright drunkendragon, please try the latest version as I believe it should all be working with nightlies. I've tested the widget running on both Dharma 10.1 and the latest nightly for Mac and both worked without a hitch. Let me know...


- DejaVu - 2011-05-27

I finally figured it was time to let my MFP spread it's wings and see what also this reverseproxy and confs business was all about. Bad idea!

I'm running MFP on XBMCLive using direct IP and Port numbers.
I tried to follow this to setup Apache -
http://mediafrontpage.lighthouseapp.com/projects/76089/apache-configuration-hints

But it went completely pear shaped from the off.
Locations and filenames are different.

These are locations and settings I found in XBMCLive

Code:
Default Web Root (where your files are served from): /var/www/
Default Log File location: /var/log/apache2/
Default Main Config File: /etc/apache2/httpd.conf
Auxiliary Config Folder (where the SSL and any custom config files are): /etc/apache2/conf.d/
Default command to start Apache: service apache2 start
Default command to stop Apache: service apache2 stop
Default command to restart Apache: service apache2 restart
This is where all the problems started, I added all the relevant bits to config.php and thought, right, lets sort out this conf business.

Created a file in /etc/apache2/conf.d/ called zzz-mfp.conf to make sure it was last. Used all the settings in the example one from the link above, restarted Apache2 and got this -

Quote:xbmc@XBMCLive:~$ sudo service apache2 restart
* Restarting web server apache2 Syntax error on line 5 of /etc/apache2/conf.d/zzz-mfp.conf:
Invalid command 'ProxyRequests', perhaps misspelled or defined by a module not included in the server configuration
[fail]
xbmc@XBMCLive:~$
It falls over at the first uncommented line. Sad
It seems like the 'services' are not available to the Apache2 as standard. How do I go about adding them?

--EDIT--
I've sussed how to move in the Modules, but it's still failling over. Once I sort this, I'll add a write up what exactly I did. I still think I have a module missing...?

--EDIT 2--
Given up. Bed time!


- Nick8888 - 2011-05-27

DejaVu Wrote:This is where all the problems started, I added all the relevant bits to config.php and thought, right, lets sort out this conf business.
I'd personally get the reverse proxies working before I start messing with mfp's config.

DejaVu Wrote:It falls over at the first uncommented line. Sad
From what you posted it fails at the 5th line (which is the 6th line on the page you linked):
Code:
ProxyRequests On # doesn't appear to matter if this is on or not actually

Have you tried removing this line? This should be the 3rd uncommented line in your config if you used the sample.

DejaVu Wrote:It seems like the 'services' are not available to the Apache2 as standard. How do I go about adding them?
I'm pretty sure they are standard in Apache2. Error message sounds more like an error in your zzz-mfp.conf


- Nick8888 - 2011-05-27

DejaVu Wrote:But it went completely pear shaped from the off.
Locations and filenames are different.

These are locations and settings I found in XBMCLive

Code:
Default Web Root (where your files are served from): /var/www/
Default Log File location: /var/log/apache2/
Default Main Config File: /etc/apache2/httpd.conf
Auxiliary Config Folder (where the SSL and any custom config files are): /etc/apache2/conf.d/
Default command to start Apache: service apache2 start
Default command to stop Apache: service apache2 stop
Default command to restart Apache: service apache2 restart

Quote: Some of the specifics for Apache, like file names and default locations for things, are different depending on which Linux distribution you are running.

For Redhat-derived distributions like Fedora-
Default Web Root (where your files are served from): /var/www/html/
Default Log File location: /var/log/httpd/
Default Main Config File: /etc/httpd/conf/httpd.conf
Auxiliary Config Folder (where the SSL and any custom config files are): /etc/httpd/conf.d/
Default command to start Apache: service httpd start
Default command to stop Apache: service httpd stop
Default command to restart Apache: service httpd restart

I've added the debian-derived distributions ones. Thanks


- SleepyP - 2011-05-27

haha you beat me too it, I was gonna post that the Debian derivatives like Ubuntu are different and need to be added to the hints page. It was on my "to do" list but had other higher priorities.


- steve1977 - 2011-05-27

Is the trakt.tv widget working for anyone using xampp on win7? Mine is still not and I am wondering whether it is functioning with this set-up? Thanks!!!


- gugahoi - 2011-05-27

steve1977 Wrote:Is the trakt.tv widget working for anyone using xampp on win7? Mine is still not and I am wondering whether it is functioning with this set-up? Thanks!!!

I just noticed this right now. For some reason, when running from my laptop's XAMPP server it works fine - this is the one I test most things. But if I run MFP from my actual server's webserver, the widget doesn't seem to load anything! Don't understand why! Will look into it, but if anyone can give me some input would be great. Completely lost with regards to this!