Operate from Blackberry/Android/Iphone-Ipad/Nokia/PC/Mac across the Globe W/O PC

Thank you Capper.

Hi Capper,

nice UI. I've developed an Ajax web interface where the page wasn't loaded from the webserver but straight from the mobile device.
In practise, the page is stored on the mobile device, when loaded it start to send JSONP requestes to the server, that is no longer a webserver but a Json server.
In that way the functionality is preatty the same, but the poor Arduino board isn't overloaded in RAM and can react much faster.

The post where I've placed the code is there, unfortunately is only in Italian. The webpage is the same of the TinyWebServer.

I've used this library in the Souliss project to build easily an universal interface. The interface was working but not nice enough on the UI side, if you are interested in, you can use your UI for that project.

Regards,
Dario.

Dear Veseo,

Thank you for being Torch-Bearer,

I must confess that I am not a good coder, but I am good at adaptation.

I was thinking to offload webpage from Arduino to any damn web-server as Arduino is not suitable for this kind of workload.

the Arduino sketch remains same for IDE 1.01 other than you have to substitute "Server" to "Ethernetserver" and "Client" to "EthernetClient".
Attached below Arduino sketch and Htmlpart.zip.

  1. Upload AjaxUI.ino to arduino
  2. Extract htmlpart.zip to your Pc/Mac/Phone/Tablet
  3. Open Index.htm in your browser give password 4587 and hit submit. (don't press enter/return)
  4. connect LED on pin 9 and GND
  5. Have Fun

Warm Regards

Capper

AjaxUI.ino (3.64 KB)

HtmlPart.zip (60.3 KB)

Out of the example in the post that I've linked, there is a full UI for the Souliss Home Automation that I've developed for the past releases. This UI is no longer maintained for time reason, bacause the project is focusing the time on others UIs (Android and Java).

If you are interested in reworking the UI, you can use the Souliss A2.1 release and figure out how was worked. Is working but not nice enough :slight_smile:

Behind the UI there is a full home automation framework that runs over the ATmega.

Regards,
Dario.

wow Dario that's very impressive BRAVO!

what did you use to build the android application ?

Isn't me :slight_smile:

Turkeybaster:
what did you use to build the android application ?

We used standard Android SDK on Eclipse. App supports VPN communications, private and/or public address, so that network latency is tuned to connection speed. Much work is still to be done, but the app is working properly so far.

Hi guys:
I see you have also problems with latency
I was testing very ways to do a Arduino Web Sever
with the library Tinywebserver ist actually very good.....but i would like to build other kind of controls like real time sliders and not only on/of buttons.

My issue is:

Is it posible to send UDP messages between arduino and the web based user interface with the Tinywebserver library??

I comunicate the arduino board with Internet in two ways:

The software tool VVVV: is there a node which made all the hard job for you and works great....but
VVVV works just for rapid prototyping but im not sure that a "vvvv based user interface" could be a" end user" solution.

The other way is a PHP based web server. it works very nice and fast when you use UPD messages..but the problem the server is my PC not the Arduino Board....

anybody is working in the same Problem?
thanks

Hi,

the web browser user HTTP to access the webpage, so there is no way to drive HTTP over UDP with a standard browser. Maybe browser like Firefox has plugins that allow this mode.

Regards,
Dario.

Hi.
Thank you really much for your answer!
Im playing with your Soullis Proyect..Hey guys you are really "Other stuff"
I wanted to make an Arduino Stepper Motor Server..but obviusly with a friendly UI.. and Voila here came Souliss
I was testing all posible and existent tutorials and documentation but your proyect is the best example in Internet..
I really appreciate your input..
Edy

Hi all,

I'm currently using tinywebserver with some relays to turn on & off stuff in my office.

I'm wondering how to input code to read sensors like LM35 and output it onto the html files used in tinywebserver.

I'm using this as reference:

/*
  Web  Server
 
 A simple web server that shows the value of the analog input pins.
 using an Arduino Wiznet Ethernet shield. 
 
 Circuit:
 * Ethernet shield attached to pins 10, 11, 12, 13
 * Analog inputs attached to pins A0 through A5 (optional)
 
 created 18 Dec 2009
 by David A. Mellis
 modified 4 Sep 2010
 by Tom Igoe
 
 */

#include <SPI.h>
#include <Ethernet.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192,168,1, 177 };

// Initialize the Ethernet server library
// with the IP address and port you want to use 
// (port 80 is default for HTTP):
Server server(80);

void setup()
{
  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);
  server.begin();
}

void loop()
{
  // listen for incoming clients
  Client client = server.available();
  if (client) {
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        // if you've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println();

          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            client.print("analog input ");
            client.print(analogChannel);
            client.print(" is ");
            client.print(analogRead(analogChannel));
            client.println("
");
          }
          break;
        }
        if (c == '\n') {
          // you're starting a new line
          currentLineIsBlank = true;
        } 
        else if (c != '\r') {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
        }
      }
    }
    // give the web browser time to receive the data
    delay(1);
    // close the connection:
    client.stop();
  }
}

But it uses client.println to display the data.

I need some help on this.

Nic

hi Capper

I want to intergrate XBEE communications through the webserver. Just one xbee to remote control 4 relays.

I have a working sketech that can remotely control the XBEEs using API commands but I want to know what section of the webserver would be appropriate to insert the xbee controls in.

I was thinking in place of having the buttons control pins on the arduino, the webserver directly dispatches the appropriate API commands to remotely control the relays. the code I have pasted below just toggles pin D1 on the remote xbee on and off. I want to be able to do that with this webserver.

//#include <Wire.h>

//frame for router D1 on
byte Router_on[] = {0x7E,0x00,0x10,0x17,0x01,0x00,0x13,0xA2,0x00,0x40,0x79,0x5F,0x90,0xFF,0xFE,0x02,0x44,0x31,0x05,0x11};
//Frame for router D1 off
byte Router_off[] ={0x7E,0x00,0x10,0x17,0x01,0x00,0x13,0xA2,0x00,0x40,0x79,0x5F,0x90,0xFF,0xFE,0x02,0x44,0x31,0x04,0x12};

void setup()
{
Serial.begin(9600);
delay(5000);//delay of 5 seconds to ensure router and coordinator are joined to each other
//delay not entirely necessary
}

void loop(){
//after various trials serial.print(Router_on,20); kept causing the overloaded ambiguous error
//Serial.write(Router_on,20); does it with no problems
//the 20 tells the compiler how long the array is
//Thank you PaulS from the Arduino forum for helping with this

Serial.write(Router_on, 20);
delay(2000);
Serial.write(Router_off, 20);
delay(2000);

}

also do you have any tips on how to reduce the latency with the buttons on the web app and actually controlling the pins on the arduino? what is causing the latency?

Thank you.

hey everyone.

I integrated my XBEE API commands into Cappers webserver. it works like a charm on my Etherten.

There is still an issue with the buttons taking awhile to load on regardless of the browser. I was wondering if using Data URI in place of CSS sprites will improve that latency. any suggestions will be great.

HomeAutomation_V_1_7.ino (13.4 KB)

Great Work,

where to download the code ?

capper:
dear guys
Actual Password is 4587
and its encrypted!!!! 8)

Check this out for more explanation
Dynamic Drive DHTML Scripts- Encrypted Password script

this is just hyperlink to actual 4587.htm file in the programme, you can substitute your password and calculate the encrypted value from above link. ( you must change destination html file name with your password)

Isn't this Cool? 8)

I'm not that good with HTML but isn't this extremely easy to hack? If you can see the root dir of the site you will see the html file in plain txt? how secure is this.

Anyone?

foolix:

capper:
dear guys
Actual Password is 4587
and its encrypted!!!! 8)

Check this out for more explanation
Dynamic Drive DHTML Scripts- Encrypted Password script

this is just hyperlink to actual 4587.htm file in the programme, you can substitute your password and calculate the encrypted value from above link. ( you must change destination html file name with your password)

Isn't this Cool? 8)

I'm not that good with HTML but isn't this extremely easy to hack? If you can see the root dir of the site you will see the html file in plain txt? how secure is this.

Hi Foolix,

You can try "http basic authentication".

Regards,
Nic

Any ideas about how to display analogue values or variables in this platform?

hi Capper
Please help me i am not able to download the attached files of #4 and #34 which is attached by you it says "url not found".

I have same problem, can´t download any file.