Search code examples
javascripthtmlraspberry-pigpiowebiopi

Can't manage to update raspberry pi, gpio-header html file


I'm very new to programming with webiopi and very new to the raspberry pi in general. Me and my brother are planning to build a robot running on a raspbery pi. We're planning to build a camera on the robot. We would stream the camera through our raspberry pi and controll the robot, both through the same website.

However, here's my problem: I downloaded and installed webiopi for my raspberry pi. And with that webiopi comes an example code which he will execute. These are simple html files. If i make any change to them the raspberry pi just shows the original file.

Here's the first original:

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <meta name="viewport" content = "width = 420, user-scalable = no" />
            <title>Webiopi</title>
            <script type="text/javascript" src="/webiopi.js"></script>
            <script type="text/javascript">
            webiopi().ready(function() {
                    webiopi().RPiHeader().createTable("content");
                    w().refreshGPIO(true);
            });
            </script> 
</head> 
<body>
<div id="content" align="center"></div> 
    </body>
    </html>

Here is the version I want to upload(for a test):

              <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
     <html>  
     <head>
             <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
             <meta name="viewport" content = "width = 420, user-scalable = no" />
             <title>Webiopi</title>
             <script type="text/javascript" src="/webiopi.js"></script>
             <script type="text/javascript">
             webiopi().ready(function() {
                     webiopi().RPiHeader().createTable("content");
                     w().refreshGPIO(true);
             });
             </script> 
     </head> 
     <body>

     <P>Testesttestest</p> 
     <div id="content" align="center">   
     <img width="300" height="240" src="http://raspberrypi:8080/?action=strem"><br/>

     </div> 
     </body>
     </html>

I don't know if any of you guys ever had this problem. But I can't continue my project if i can't update my webpage.

Thanks for u're help

Justin


Solution

  • I think you're not editing the right files.
    Webiopi installs a server on your Raspi. From a fresh install, files are stored in /usr/share/webiopi/htdocs/.
    Also, you should check this page about configuration file in order to modify the default folder the files are stored in, and other usefull config features.