Author Topic: Serving Web Pages Using Forms (POST)  (Read 12957 times)

Twistit

  • Newbie
  • *
  • Posts: 19
Re: Serving Web Pages Using Forms (POST)
« Reply #15 on: October 24, 2014, 01:23:58 pm »
Got it! Running perfectly, already edited my spot and led's in!
Forgot to call setPins(); in setup, but figured that out fast enough when the relay didnt respond :)

Amus3d

  • Newbie
  • *
  • Posts: 31
Re: Serving Web Pages Using Forms (POST)
« Reply #16 on: October 24, 2014, 01:27:39 pm »
Sound :)

you got it running on you're own server??
if so i can stop access to the php test files

cheers

Twistit

  • Newbie
  • *
  • Posts: 19
Re: Serving Web Pages Using Forms (POST)
« Reply #17 on: October 25, 2014, 12:56:47 am »
Yup, Got it running on my own server!
However, the timestamp only gets updated twice or three times.. Did i break something already?
Modified the page to show last updated.

[edit] Okay, replaced the 0.5a power adapter with a 1a. seems to be running better.
[edit2] Right.. so.. when i pull the usb cord with serial console the digix freezes.. lights stay on but stops updating web, wont turn of lights.
[edit3] Well, seems the digix start without being hooked up to my laptop? Hooked it up to my adapter and a usb power adapter.. doesn't seem to be updating the web interface.
Cant check the lights till tomorrow, Tortoise doesn't like the disco I'm causing with resetting the digix ;)
[edit4] Watching serial after editing updatephp from the page.. Page reads 1, phpmyadmin the table reads 1.. However serial keeps getting old data? phpupdate = 5 and also not writing to updateData? I'm at loss.. Am i testing on a wonky server? Am i asking to much of the DigiX? After it boots it gets the correct values.. but after that it just does not update it from the database? It did work a few times.. But it's on and off.
« Last Edit: October 26, 2014, 02:24:51 am by Twistit »

Amus3d

  • Newbie
  • *
  • Posts: 31
Re: Serving Web Pages Using Forms (POST)
« Reply #18 on: October 26, 2014, 04:24:51 am »
ok, ill try it on my digiX using your server data. since your not use at the moment.

can you adda new line to digiXvariable table and let me know what the arduino number is. should be 2.

cheers.

Amus3d

  • Newbie
  • *
  • Posts: 31
Re: Serving Web Pages Using Forms (POST)
« Reply #19 on: October 26, 2014, 06:01:09 am »
you had a problem with updating. got it working on my side. ive created the php file in a seperate folder in the rar as not sure if you added some html code tothe file?? and there is a new tab xChanges to explain some stuff. do you have more than 1 digiX?
« Last Edit: October 26, 2014, 06:26:28 am by Amus3d »

Twistit

  • Newbie
  • *
  • Posts: 19
Re: Serving Web Pages Using Forms (POST)
« Reply #20 on: October 26, 2014, 11:15:41 am »
I only have one digiX, i guess my temp host is horrible (my current host was working on the sql server so was unavailable) hope i can get access again soon!
On yours it seems to run fine (so far, will test more later).

I do get the following a lot, just after i said it's running fine.. Guess i jinxed it:
get Data = <HTML><HEAD>
<TITLE>Request Timeout</TITLE>
</HEAD><BODY>
<H1>Request Timeout</H1>
The server timed out while waiting for the browser's request.<P>
Reference&#32;&#35;2&#46;7902655f&#46;1414347051&#46;0
</BODY></HTML>
« Last Edit: October 26, 2014, 11:19:31 am by Twistit »

Twistit

  • Newbie
  • *
  • Posts: 19
Re: Serving Web Pages Using Forms (POST)
« Reply #21 on: October 26, 2014, 11:29:29 am »
Pulled my serial cable and it hasn't updated for 10 minutes..
I'm powering my Arduino with a 12v 1000ma..
Connected to the 5v out on the Arduino is a 8port 220 relay, only 4 relays on the strip in use.
TCP timeout on the DigiX is set at 300 btw, is this right?
What kind of power supply do you run?

Back on serial, the script still runs.. Just getting the updatedata error's, returnvariabledata works fine even when spammed :P
« Last Edit: October 26, 2014, 11:44:25 am by Twistit »

Amus3d

  • Newbie
  • *
  • Posts: 31
Re: Serving Web Pages Using Forms (POST)
« Reply #22 on: October 26, 2014, 11:57:56 am »
5volt 1amp, or 1.5amp with 8 relays but only using 2. had no problems in months

Amus3d

  • Newbie
  • *
  • Posts: 31
Re: Serving Web Pages Using Forms (POST)
« Reply #23 on: October 26, 2014, 12:01:55 pm »
boot without Serial connected. then pulg in Serial after its booted.???

Twistit

  • Newbie
  • *
  • Posts: 19
Re: Serving Web Pages Using Forms (POST)
« Reply #24 on: October 26, 2014, 02:53:40 pm »
Same thing, pulled serial went out the door for 2 hours..
Came back no updates on the page, inserted serial and voila it updates the page.
Just once tho, after that it went back to server timing out.

I'm guessing it doesnt like my 12v 1a power adapter.
Still got a 5v 1a around, wondering if that would help..
Else i've got to order a 5v 2a

[Edit] Fun fact: Everytime i restart wifi from the Digix Setting page it runs the updateData fine.. once.. then goes back to server timed out.
Factory resetting wifi makes it updateData 5 times.. then goes back to server timed out.
However, i found a 12v 2a adapter and it seems to run more stable apart from the time outs.
« Last Edit: October 26, 2014, 04:19:34 pm by Twistit »

Amus3d

  • Newbie
  • *
  • Posts: 31
Re: Serving Web Pages Using Forms (POST)
« Reply #25 on: October 26, 2014, 04:57:10 pm »
get a raspberry PI B+  and install lamp. it will give you apache, php, phpmyadmin  and mysql.  i dont get any timeouts.
 
http://www.youtube.com/watch?v=CEji-qN-TEE

next project is to build this program using raspberry and touch screen,