chaotux
Posts: 14
Joined: Tue Sep 18, 2012 4:44 am

Re: Raspcontrol - A Web Control Centre for the Pi

Tue Sep 18, 2012 4:40 pm

Okay so in the time it took to approve my post I was able to revise the code. this should work a little better

Code: Select all

apt-get install php5 php5-cgi php5-common php5-cli -y

cd /var/www/
rm -r raspcontrol
wget https://github.com/Bioshox/Raspcontrol/zipball/master
unzip master
mv Bioshox-Raspcontrol-* raspcontrol
rm master
chmod 755 start.sh

r0nnie
Posts: 49
Joined: Fri Aug 03, 2012 1:53 am

Re: Raspcontrol - A Web Control Centre for the Pi

Wed Sep 19, 2012 9:35 pm

do we need an update of this since the new 'Turbo' overclocking via raspi-config?

ive overclocked mine to the 1ghz option but showing 700mhz still

Image

but in terminal using - cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
its showing 1000000

Linus
Posts: 23
Joined: Sat Mar 03, 2012 9:49 am

Re: Raspcontrol - A Web Control Centre for the Pi

Thu Sep 20, 2012 5:32 am

I think Raspcontrol still uses

Code: Select all

cat /proc/cpuinfo 
to get the current arm-frequency so there will probably be an update.

It would also be cool if the new temperature-feature get's integrated into Raspcontrol as well :)

sjfaustino
Posts: 87
Joined: Tue Jun 12, 2012 5:21 pm

Re: Raspcontrol - A Web Control Centre for the Pi

Sun Sep 23, 2012 2:50 pm

Linus wrote:It would also be cool if the new temperature-feature get's integrated into Raspcontrol as well :)
You mean this :D :
Image

I _knew_ there was something I had forgotten to post :)

Files changed:
/var/www/raspcontrol/app/main.php - added call to display the current CPU temperature
/var/www/raspcontrol/app/_lib/classes/_pitem.php - gets the temperature and displays on the page
/var/www/raspcontrol/app/_lib/styles/style.css - adds the style needed for the cpu temperature (and fixes a bug)
/var/www/raspcontrol/app/_lib/images/cpu_temp.png - a nice image for the cpu temperature icon
/var/www/raspcontrol/app/_lib/images/danger.png - used when the temperature goes over 80% of maximum
Attachments
raspcontrol-changed.zip
(10.87 KiB) Downloaded 265 times

urfankhaliq
Posts: 63
Joined: Wed Apr 11, 2012 4:06 pm

Re: Raspcontrol - A Web Control Centre for the Pi

Sun Sep 23, 2012 11:10 pm

can this update be added on to github please so we can update straight from the script below?

sudo rm -r raspcontrol
sudo wget https://github.com/Bioshox/Raspcontrol/zipball/master
sudo unzip master
sudo mv Bioshox-Raspcontrol-* raspcontrol
sudo rm master

Thanks

r0nnie
Posts: 49
Joined: Fri Aug 03, 2012 1:53 am

Re: Raspcontrol - A Web Control Centre for the Pi

Mon Oct 01, 2012 1:05 pm

sjfaustino wrote:
Linus wrote:It would also be cool if the new temperature-feature get's integrated into Raspcontrol as well :)
You mean this :D :
Image

I _knew_ there was something I had forgotten to post :)

Files changed:
/var/www/raspcontrol/app/main.php - added call to display the current CPU temperature
/var/www/raspcontrol/app/_lib/classes/_pitem.php - gets the temperature and displays on the page
/var/www/raspcontrol/app/_lib/styles/style.css - adds the style needed for the cpu temperature (and fixes a bug)
/var/www/raspcontrol/app/_lib/images/cpu_temp.png - a nice image for the cpu temperature icon
/var/www/raspcontrol/app/_lib/images/danger.png - used when the temperature goes over 80% of maximum
have i updated this wrong?

i went in to /var/www/raspcontrol/app/_lib

removed the folders that are in the updated rar then copied the 3 new folders from the rar to that dir
then i removed main.php from /var/www/raspcontrol/app and added the one from the rar

restarted lighttpd and now getting error

Server error
The website encountered an error while retrieving http://192.168.1.137/raspcontrol/app/. It may be down for maintenance or configured incorrectly.

edit

ok i see what i did wrong. i wasnt suposed to remove the current folders but simply add these files to the folders

got it working but the temp % doesnt line up with the others % bars

Image

munklefish
Posts: 88
Joined: Tue Oct 02, 2012 5:35 pm
Location: Neumarkt in der Oberpfalz
Contact: Website

Re: Raspcontrol - A Web Control Centre for the Pi

Tue Oct 02, 2012 5:59 pm

I'm sure its down to my inexperience but I just can't unzip the raspcontrol zip on my pi. Ive downloaded it several times. When I click on the zip file and click to extract it comes up with an error about not being the correct file type or that the zip is part of a multi-part zip.

Any idea what I need to do to resolve this?

Im really keen to get this up and running but its getting a bit frustrating.

Thanks.
http://www.codeclinic.de

munklefish
Posts: 88
Joined: Tue Oct 02, 2012 5:35 pm
Location: Neumarkt in der Oberpfalz
Contact: Website

Re: Raspcontrol - A Web Control Centre for the Pi

Tue Oct 02, 2012 6:02 pm

Hi,

I suspect the only issue ive got is my newbness, but here goes...

Ive downloaded the raspcontrol zip file -several time- but cannot unzip it. If i go to it in file manager and try to extract it, the unzip programme just complains that its either an incorrect file type or that its part of a multipart zip.

Any ideas how I can resolve this? I just really want to get this installed on my Pi.

Thanks
http://www.codeclinic.de

urfankhaliq
Posts: 63
Joined: Wed Apr 11, 2012 4:06 pm

Re: Raspcontrol - A Web Control Centre for the Pi

Tue Oct 02, 2012 6:58 pm

hi just browse to /var/www and do the following


sudo wget https://github.com/Bioshox/Raspcontrol/zipball/master
sudo unzip master
sudo mv Bioshox-Raspcontrol-* raspcontrol
sudo rm master

that will install it for u

munklefish
Posts: 88
Joined: Tue Oct 02, 2012 5:35 pm
Location: Neumarkt in der Oberpfalz
Contact: Website

Re: Raspcontrol - A Web Control Centre for the Pi

Tue Oct 02, 2012 7:57 pm

urfankhaliq wrote:hi just browse to /var/www and do the following


sudo wget https://github.com/Bioshox/Raspcontrol/zipball/master
sudo unzip master
sudo mv Bioshox-Raspcontrol-* raspcontrol
sudo rm master

that will install it for u
Thanks for the response urfankhaliq. I did the above but the last two commands didnt return any response. Is this to be expected?

So I've manage to find raspcontrol by navigating to 127.0.0.1/raspcontrol/app/

But if i try to log-in with my defauly pi access OR try to create an account it goes to: 127.0.0.1/raspcontrol/app/index.php and just displayes the error message; "can't open file"

Any ideas???

Thanks!

urfankhaliq
Posts: 63
Joined: Wed Apr 11, 2012 4:06 pm

Re: Raspcontrol - A Web Control Centre for the Pi

Tue Oct 02, 2012 8:05 pm

you also need to add the following to the sudoers file..


www-data ALL=(ALL) NOPASSWD: ALL

instructions are found here

https://github.com/bioshox/Raspcontrol

sjfaustino
Posts: 87
Joined: Tue Jun 12, 2012 5:21 pm

Re: Raspcontrol - A Web Control Centre for the Pi

Thu Oct 04, 2012 9:02 pm

r0nnie wrote:
sjfaustino wrote:
Linus wrote:It would also be cool if the new temperature-feature get's integrated into Raspcontrol as well :)
You mean this :D :
Image

I _knew_ there was something I had forgotten to post :)

Files changed:
/var/www/raspcontrol/app/main.php - added call to display the current CPU temperature
/var/www/raspcontrol/app/_lib/classes/_pitem.php - gets the temperature and displays on the page
/var/www/raspcontrol/app/_lib/styles/style.css - adds the style needed for the cpu temperature (and fixes a bug)
/var/www/raspcontrol/app/_lib/images/cpu_temp.png - a nice image for the cpu temperature icon
/var/www/raspcontrol/app/_lib/images/danger.png - used when the temperature goes over 80% of maximum
have i updated this wrong?

i went in to /var/www/raspcontrol/app/_lib

removed the folders that are in the updated rar then copied the 3 new folders from the rar to that dir
then i removed main.php from /var/www/raspcontrol/app and added the one from the rar

restarted lighttpd and now getting error

Server error
The website encountered an error while retrieving http://192.168.1.137/raspcontrol/app/. It may be down for maintenance or configured incorrectly.

edit

ok i see what i did wrong. i wasnt suposed to remove the current folders but simply add these files to the folders

got it working but the temp % doesnt line up with the others % bars

Image
Since i can see a green demarcation line on the orange bar (a bug i noticed and corrected on the css) I can only assume you aren't using my .css file.

I'll fork the git repo and do a pull request, if aproved all you need to do is git clone and my changes will work "out of the box" :)

r0nnie
Posts: 49
Joined: Fri Aug 03, 2012 1:53 am

Re: Raspcontrol - A Web Control Centre for the Pi

Fri Oct 05, 2012 2:19 pm

sjfaustino wrote: Since i can see a green demarcation line on the orange bar (a bug i noticed and corrected on the css) I can only assume you aren't using my .css file.

I'll fork the git repo and do a pull request, if aproved all you need to do is git clone and my changes will work "out of the box" :)
hello sorry i forgot to reply!

the cpu heat % bar is now in line!

i didnt do or change nothing

Image

sjfaustino
Posts: 87
Joined: Tue Jun 12, 2012 5:21 pm

Re: Raspcontrol - A Web Control Centre for the Pi

Thu Oct 11, 2012 7:38 pm

r0nnie wrote:
sjfaustino wrote: Since i can see a green demarcation line on the orange bar (a bug i noticed and corrected on the css) I can only assume you aren't using my .css file.

I'll fork the git repo and do a pull request, if aproved all you need to do is git clone and my changes will work "out of the box" :)
hello sorry i forgot to reply!

the cpu heat % bar is now in line!

i didnt do or change nothing

Image
Your browser was probably caching the .css files.
Notice that you now no longer have the vertical green line at the end of the orange percentage bar, which means you are using my .css and not the original one.

Next change is showing the configuration on the CPU speed (Min: 700MHz Max: 1GHz ondemand) :)
Not sure if adding a word to define the speed (Fast, Turbo, etc..) is needed or useful since you can change the defined values to something a bit diferent and then we have to choose if 1000MHz is Turbo, what is 1.1GHz? Warp, Ludicrous or Plaid speed? :lol:

Is there anything else that anyone thinks should be added?

r0nnie
Posts: 49
Joined: Fri Aug 03, 2012 1:53 am

Re: Raspcontrol - A Web Control Centre for the Pi

Fri Oct 12, 2012 11:26 am

is it possible for a 'guest' page so you can show people the stats without a login, but have the reboot/update options removed

sjfaustino
Posts: 87
Joined: Tue Jun 12, 2012 5:21 pm

Re: Raspcontrol - A Web Control Centre for the Pi

Fri Oct 12, 2012 7:49 pm

You mean, if logged in show the admin options, if not just show everything else?
If so, it is very easy to do, but it ideally should be a setting that only the admin can toggle, not something active by default.
Security = Deny by default :)

r0nnie
Posts: 49
Joined: Fri Aug 03, 2012 1:53 am

Re: Raspcontrol - A Web Control Centre for the Pi

Sun Oct 14, 2012 12:09 pm

sjfaustino wrote:You mean, if logged in show the admin options, if not just show everything else?
If so, it is very easy to do, but it ideally should be a setting that only the admin can toggle, not something active by default.
Security = Deny by default :)
yeah no login = no admin options! how would one do this

sjfaustino
Posts: 87
Joined: Tue Jun 12, 2012 5:21 pm

Re: Raspcontrol - A Web Control Centre for the Pi

Sun Oct 14, 2012 5:43 pm

You can use raspcontrol/app/_lib/classes/_login.php and the $wrong variable or you can wait for me to do it as soon as I have a bit of free time.

The changes I made so far are:
- Added a bar for the SoC core temperature
- You don't need to have the www-data user with root permissions to save the settings file
- Cleaned up all the notices from PHP

The changes I plan on:
- get the CPU speed from /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq and not /proc/cpuinfo
- Show the configuration on the CPU speed (Min: 700MHz Max: 1GHz ondemand)
- show the warranty state by analysing the overvolt bit (anyone have a nice "warranty void in case of overvoltage" image? :))
- Show network info per device (eth0, wlan0, etc...)
- Use a real web framework since, no offense to the original developer, the current code is a bit hard to follow :)
- adding browser cookies
- allow a "guest mode" where sensitive info isn't shown and no admin functions exist
- remove all the Google analytics and twitter code since it makes no sense on a internal website.
- remove the "Sponsored by Fusion Strike." but keep "Powered by Raspcontrol".
- steal^H^H^H^H^H inspire myself on other monitoring solutions for more functions ;)
- detect the device based on browser agent and show a very lite, mobile version of the site if apropriate (same purpose as PiControl but using a browser, so no need to install another app).
- Show if services or apps defined on the config file are running

Because of all the changes, I can do a pull request if the original author wants, but since I'll probably scrap most of the code and "go my own way", I wouldn't recomend it.

If anyone wants to, they can get my fork at https://github.com/sjfaustino/Raspcontrol.git

sjfaustino
Posts: 87
Joined: Tue Jun 12, 2012 5:21 pm

Re: Raspcontrol - A Web Control Centre for the Pi

Sun Oct 14, 2012 6:40 pm

sjfaustino wrote: The changes I made so far are:
- Added a bar for the SoC core temperature
- You don't need to have the www-data user with root permissions to save the settings file
- Cleaned up all the notices from PHP
Just finished:
- Show the configuration on the CPU speed (Min: 700MHz Max: 1GHz ondemand)

sjfaustino
Posts: 87
Joined: Tue Jun 12, 2012 5:21 pm

Re: Raspcontrol - A Web Control Centre for the Pi

Sun Oct 14, 2012 8:31 pm

sjfaustino wrote: The changes I made so far are:
- Added a bar for the SoC core temperature
- You don't need to have the www-data user with root permissions to save the settings file
- Cleaned up all the notices from PHP
- Show the configuration on the CPU speed (Min: 700MHz Max: 1GHz ondemand)
Just finished:
- get the CPU speed from /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq and not /proc/cpuinfo

The forum won't allow me to edit my posts after some time has passed, so I'm posting the changes made but I'll probably stop since the mods might consider it SPAM.

Mr_Waffle
Posts: 11
Joined: Mon Oct 15, 2012 8:21 pm

Re: Raspcontrol - A Web Control Centre for the Pi

Mon Oct 15, 2012 8:26 pm

@sjfaustino, I forked your repo and added some dirty AJAX updating to it.

sjfaustino
Posts: 87
Joined: Tue Jun 12, 2012 5:21 pm

Re: Raspcontrol - A Web Control Centre for the Pi

Tue Oct 16, 2012 1:18 pm

Mr_Waffle wrote:@sjfaustino, I forked your repo and added some dirty AJAX updating to it.
Great! Are you planing on continuing development on any of the stuff I mentioned above?
If not, could you do a pull request so I get your updates and continue developing on top of them?

BTW, I'm currently modifying the "check for updates" to get the latest version from the Github repository.
My plan is to get the Atom feed of the repository and compare with the running version.

Mr_Waffle
Posts: 11
Joined: Mon Oct 15, 2012 8:21 pm

Re: Raspcontrol - A Web Control Centre for the Pi

Tue Oct 16, 2012 7:33 pm

sjfaustino wrote:
Mr_Waffle wrote:@sjfaustino, I forked your repo and added some dirty AJAX updating to it.
Great! Are you planing on continuing development on any of the stuff I mentioned above?
If not, could you do a pull request so I get your updates and continue developing on top of them?

BTW, I'm currently modifying the "check for updates" to get the latest version from the Github repository.
My plan is to get the Atom feed of the repository and compare with the running version.
I do plan on continuing development, I'll see what I can do of your list.
I also want to change the API, as it currently doesn't seem to do anything.

Do you still want me to make a pull request?

sjfaustino
Posts: 87
Joined: Tue Jun 12, 2012 5:21 pm

Re: Raspcontrol - A Web Control Centre for the Pi

Wed Oct 17, 2012 8:09 am

Mr_Waffle wrote:
sjfaustino wrote:
Mr_Waffle wrote:@sjfaustino, I forked your repo and added some dirty AJAX updating to it.
Great! Are you planing on continuing development on any of the stuff I mentioned above?
If not, could you do a pull request so I get your updates and continue developing on top of them?

BTW, I'm currently modifying the "check for updates" to get the latest version from the Github repository.
My plan is to get the Atom feed of the repository and compare with the running version.
I do plan on continuing development, I'll see what I can do of your list.
I also want to change the API, as it currently doesn't seem to do anything.

Do you still want me to make a pull request?
Yes, please.

Regarding the API, I was thinking of separating the code into code and display modules (to try to get something closer to MVC), with a class used to get the values and another used to display the results based on another file where you have the config.

Probably didn't explain myself very well :?

Mr_Waffle
Posts: 11
Joined: Mon Oct 15, 2012 8:21 pm

Re: Raspcontrol - A Web Control Centre for the Pi

Wed Oct 17, 2012 3:26 pm

sjfaustino wrote:Yes, please.

Regarding the API, I was thinking of separating the code into code and display modules (to try to get something closer to MVC), with a class used to get the values and another used to display the results based on another file where you have the config.

Probably didn't explain myself very well :?
I get your idea. I made a few small changes to the current classes, and put together a simple PHP script that puts all info into a nice JSON object.
Of course, it would be much better to rewrite it in your way.

Return to “Networking and servers”