Kodi Community Forum

Full Version: MediaFrontPage - Web interface with widget type architecture to control multiple apps
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
drunkendragon Wrote:This is with xbmcjsonlib_nightly.php, without xbmcjsonlib.php it's al fine except for the same wsystem widget error. Also i can't move the widgets.

I could try to install xbmc 10.1, just to make sure Smile

Image

Looking at your setup, it's on Windows running EasyPHP. I had all sorts of problems when I tried using that - not sure it fully supports JQuery yet. It's far too specific and is very picky about minor things in the coding.

Try using The Uniform Server. It's much better and does not generate those horrible Orange error messages.

It cant be the widgets or MFP as it is working for everyone else. Only really leaves the server software your using.
Seems the easy way out, because i have no problem with the main branch, but Ill deinstall wampserver. It's kinda fun and no effort for me. Hopefully i can at some point give more usefull information or help someone out Smile

Uniform server looks good btw. Im gonna switch for sure! Nice tip!
drunkendragon Wrote:Seems the easy way out, because i have no problem with the main branch, but Ill deinstall wampserver. It's kinda fun and no effort for me. Hopefully i can at some point give more usefull information or help someone out Smile

Uniform server looks good btw. Im gonna switch for sure! Nice tip!

I use wamp and its erratic. Sometime I get the error you are getting and sometime not. However I do have like 4 different MFP branches running and I'm editing code all the time so I possible am the one breaking it. Haven't really bother to locate the exact error as it comes and goes. If I get some time I'll try see whats causing it.
installed Uniform and it's indeed much better and does not generate those horrible Orange error messages.

wSystem still gives; Namespace VideoLibrary does not exist in namespace root
And widgets aren't movable. Maybe ill run https://github.com/MediaFrontPage/mediafrontpage side by side gugahoi's one
drunkendragon Wrote:installed Uniform and it's indeed much better and does not generate those horrible Orange error messages.

wSystem still gives; Namespace VideoLibrary does not exist in namespace root
And widgets aren't movable. Maybe ill run https://github.com/MediaFrontPage/mediafrontpage side by side gugahoi's one

Once I've finished building and installing and configuring this new build PC, I'm going to clone all the repo's (Except mine as it's now Out of Date) available to see if I can replicate the problem. To try to help solve it. Wink
isn't wSystem that new System Info widget Gugahoi is working on?
drunkendragon Wrote:installed Uniform and it's indeed much better and does not generate those horrible Orange error messages.

wSystem still gives; Namespace VideoLibrary does not exist in namespace root
And widgets aren't movable. Maybe ill run https://github.com/MediaFrontPage/mediafrontpage side by side gugahoi's one

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.

SleepyP Wrote:isn't wSystem that new System Info widget Gugahoi is working on?
That's right. It is.
Hey guys, I just committed some stuff to my repo here https://github.com/DivinityCycle/mediafrontpage

My main focus this week has been on the "offline page" functionality and correcting some errors, particularly with wTransmission and the XBMC Library widgets. Since I FINALLY solved my dumb PHP ping issue, I was able to start making a useable page. I ended up using sudo, since I found you can grant apache non-passworded access to JUST the ping command, which enables functionality without causing any real security problems. Now I need to flesh out the ping part a bit, and then the next piece will probably take some help from you guys since you're better at JavaScripting than I am.

I want to make "ping", "wake-on-LAN" and "launch XBMC" buttons but I'm not sure what the best way to achieve a "click on this JavaScript object and it fires this PHP function" setup. We'll have to get that sorted out before I can put the "offline" piece into Now Playing, since at the moment the script automatically pings the XBMC host on load. If I'm not mistaken, Now Playing reloads itself pretty rapidly so that would cause major problems.
SleepyP Wrote:My main focus this week has been on the "offline page" functionality and correcting some errors, particularly with wTransmission and the XBMC Library widgets. Since I FINALLY solved my dumb PHP ping issue, I was able to start making a useable page. I ended up using sudo, since I found you can grant apache non-passworded access to JUST the ping command, which enables functionality without causing any real security problems. Now I need to flesh out the ping part a bit, and then the next piece will probably take some help from you guys since you're better at JavaScripting than I am.

I want to make "ping", "wake-on-LAN" and "launch XBMC" buttons but I'm not sure what the best way to achieve a "click on this JavaScript object and it fires this PHP function" setup. We'll have to get that sorted out before I can put the "offline" piece into Now Playing, since at the moment the script automatically pings the XBMC host on load. If I'm not mistaken, Now Playing reloads itself pretty rapidly so that would cause major problems.
Sorry but I'm confused. What is the point of pinging the computer xbmc is running on? Why can't we just assume xbmc is offline when the jsonrpc does not respond?

Current requirements for mfp are a php server with curl enabled. I don't think we should be increasing these.

Now Playing refreshes once per second so that the progress bar/time appears fluid.
Nick8888 Wrote:Sorry but I'm confused. What is the point of pinging the computer xbmc is running on? Why can't we just assume xbmc is offline when the jsonrpc does not respond?

Current requirements for mfp are a php server with curl enabled. I don't think we should be increasing these.

Now Playing refreshes once per second so that the progress bar/time appears fluid.

I think the point is checking if the computer is on at all. If the computer is on then XBMC is probably not, so we would be able to run a script to turn it on. If the computer does not respond to ping then there is not point in trying to run XBMC.
gugahoi Wrote:I think the point is checking if the computer is on at all. If the computer is on then XBMC is probably not, so we would be able to run a script to turn it on. If the computer does not respond to ping then there is not point in trying to run XBMC.

I still don't see the benefit of this over just using a jsonrpc call to see if it is running and provide the user with the option to Wake on Lan or Turn xbmc on or Run a script.

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

The way I think it should be done is in the lighthouse ticket.
The method I am using is just the standard PHP exec call and the ping functionality built into the host OS. For the majority of users (people running Windows and Ubuntu), this should work totally fine with zero extra configuration.

Use case: You are not at home but are accessing MFP from a remote location (like work or your cell phone for example). Your XBMC device isn't responding and you're not sure why, but you would like to get it up and running so you could run a library update, see recent items, whatever. This (in theory) will make it so you can tell why it isn't running and get it running with a few clicks of your mouse. Even outside of the context of XBMC, a remote ping / WOL widget would be really handy for some remote network administration tasks.
SleepyP Wrote:The method I am using is just the standard PHP exec call and the ping functionality built into the host OS. For the majority of users (people running Windows and Ubuntu), this should work totally fine with zero extra configuration.

Okay I'll wait and see what you've come up with.

This will only benefit people who have xbmc on a different computer to their web server? Is there a way to do this through curl or a php function?

If you look through this thread and see the number of times people have not installed curl and come here for support I think you'll understand why I am reluctant to support adding extra requirements.
Just on the wake on lan topic. When waking on lan over the internet you need to forward UDP port 7 or 9 depending which one you set it to use. This adds more to the set up. You also don't normally have control over which pc on the lan network you sending the magic packet to as it sends it to all pc's under the external ip. I searched for a couple days for a php script that would wake on lan. Only ever found 1 and then a couple variations of that. Wake on lan php scripts need php sockets open which means another thing users need to possibly enable and don't seem to run so nicely on locally hosted servers (possibly wamp playing up though)
_Mikie_ Wrote:Just on the wake on lan topic. When waking on lan over the internet you need to forward UDP port 7 or 9 depending which one you set it to use. This adds more to the set up. You also don't normally have control over which pc on the lan network you sending the magic packet to as it sends it to all pc's under the external ip. I searched for a couple days for a php script that would wake on lan. Only ever found 1 and then a couple variations of that. Wake on lan php scripts need php sockets open which means another thing users need to possibly enable and don't seem to run so nicely on locally hosted servers (possibly wamp playing up though)

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?