View previous topic :: View next topic |
Author |
Message |
bzijlstra
Joined: 30 Dec 2004 Posts: 1179 Location: Tilburg - Netherlands
|
Posted: Mon Nov 10, 2014 12:34 pm Post subject: creating html-pages |
|
|
Thanks Paul for all your work.
About creating webpages:
I stumbled on Python's Sphinx to create and manage webpages. It is to generate documentation for projects (html/latex/pdf/txt) on the click of the mouse and it works very nice. Refreshed my homepage with this tool. From your txt-code it generates menu's just by typing plain text. Nothing to do with Bascom but all to do with generating webpages for the webserver.
Have fun
Ben Zijlstra |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Tue Nov 11, 2014 4:43 am Post subject: |
|
|
Thanks Ben
The problem is that you have to edit the pages in a text editor to put in the ~025 hex numbers to be replaced when the AVR parses the file as the helpful web page editors keep trying to fix what it thinks is a mistake.
I build the pages with Kompozer with its cut and paste but then need to add the hex so things like check boxes come up checked if a bit is set in say a byte of eeprom.
>Here the logic in my web pages
The other part of it is to try and get some sort of logic into what the browser sends when the button is clicked so that I can use the case statement to work out what to do then another case statement to find its number so that some of the code is in the page. eg we get sent button&1=dog so we know a button was pressed it was button one and the value was dog.
Also I use the split command to divide it up on the & and =
Regards Paul |
|
Back to top |
|
|
teccs
Joined: 14 Oct 2006 Posts: 69
|
Posted: Fri Feb 20, 2015 10:44 am Post subject: A little more help for a newbie |
|
|
Hi Paulvk,
I downloaded and tried most of your zip files. Copied the sd card contents to the sd card. Changed the IP address, etc. in W5100_SDcard.bas to match my network. None gave me anything except a blank page in firefox.
I tried 26_7_14.zip. Finally got something - an error about the page not being found.
I looked through the files on the sd card and found that index.htm is mentioned. So, I put in an index.htm file of my own onto the sd card and it displayed in firefox when I opened the IP address. That was a huge success after 3 hours work trying everything I could think of.
I was hopeful that the meters page would work, but it did not. So, now that I see a basic web page working, can you please tell me how to make a variable such as the adc 1 port value show on the web page?
Thank you very much for the fine work. This will be a huge help. |
|
Back to top |
|
|
teccs
Joined: 14 Oct 2006 Posts: 69
|
Posted: Mon Feb 23, 2015 6:16 am Post subject: Missing index.htm file |
|
|
Hi Paulvk,
After 3 more days of working on this, I set cdebug to 1 in the code. The info sent from the arduino to the serial port said that index.htm is missing.
I searched all the zip files I downloaded and none had an index.htm file. Can you please provide that?
I would be most grateful. |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Mon Feb 23, 2015 12:16 pm Post subject: |
|
|
Hello teccs
The meters require support for flash to be loaded on to your computer.
I have been busy for a few months getting and installing two solar systems so have had no time to work on the server.
You can change settings via the rs232 port with a terminal program like Realterm by typing Help then enter you will get instructions on commands.
You will need to load the eeprom with data and set the fuse bits on the AVR not to clear the eeprom when writing to clearing flash this is a draw back with the Arduino boards you need to connect to the board with an ISP programmer to change the fuse bits and write to eeprom but you do not need it after that.
You can use the rs232 command line to write to the eeprom and enter the IP values the ones in the code are only defaults.
It also reads the settings file and changes the values to that if they differ.
I am not at where the project is at present so it will take a few days.
What do you want to do with the project?
I have been building functions for it not all will be used in the various purposes I want to put it to so you may not need all of them.
Regards Paul |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Fri Mar 06, 2015 9:38 am Post subject: |
|
|
I have not forgot
I am busy walking all over the roof putting up solar panels.
Will get to it as soon as I can
Regards Paul |
|
Back to top |
|
|
teccs
Joined: 14 Oct 2006 Posts: 69
|
Posted: Tue Mar 10, 2015 8:25 am Post subject: I got it working |
|
|
Just wanted everyone to know that I got the web pages to show. I had to put in http://192.168.1.102/meters.cgi for the page to load. Did not know how to do cgi before.
I have not modified the pages to make them show actual ADC data, but that will be a little later.
This was all with the 18_6_14.zip file.
Thank you everyone for your assistance. |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Tue Mar 10, 2015 11:07 am Post subject: |
|
|
Hello teccs
The .cgi was chosen as the server modifies the pages to suit the values and the CGI on a web server is the closest to this
>>>>Common Gateway Interface (CGI) is a standard method used to generate dynamic content on Web pages<<<<
Even the web pages it creates from data in the flash which are put together as needed fall into this category.
You will see in the code that the cgi file is parsed for the special character ~ after which the hex value tells it what data has to sent instead of the hex value.
It does not parse the other types of files.
I started with CHANGEXX but soon had so many variables I had to go to 3 digit hex to make things smaller and easier to write code for.
Regards Paul |
|
Back to top |
|
|
snow
Joined: 28 Jun 2005 Posts: 200 Location: Ashburton / Mid Canterbury / New Zealand
|
Posted: Tue Nov 24, 2015 4:18 am Post subject: |
|
|
Hi Paulvk
I'm trying to run up your project. it won't compile as i dont have the bigstring.ibx file. I do have the bigstring.lib file.
Can you upload a copy of bigstrings.lbx or am i overlooking something?
Cheers
Snow
PS Great work!!! |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Tue Nov 24, 2015 8:25 am Post subject: |
|
|
Hello Snow
You should have it in the normal bascom
I am still working on the server its the basis of a much bigger overall plan to monitor my houses and now solar off grid systems
The things is has to do keeps growing I am working with 1 wire temperature sensors at present.
So the next include file will be for getting temperature data from another AVR as you can not have interrupts on with 1 wire.
I need to monitor inverters and 44 batteries so as the pre-made sensors with 3m cables are less than $2 I will have a buss with 15 to 20 on it.
I am up to 320 on the spread sheet that tells me what each HEX number will be replaced with.
Regards Paul |
|
Back to top |
|
|
snow
Joined: 28 Jun 2005 Posts: 200 Location: Ashburton / Mid Canterbury / New Zealand
|
Posted: Tue Nov 24, 2015 8:35 am Post subject: |
|
|
Yea i thought so too. I've searches high and low on my machine but can't locate the file anywhere. Could you zip it up and post it on this discussion please? .I'm real keen to run your program up. My kit should be here in a few days.
It looks like you have an awesome project on the go. Great work!!!!!!!!!
Snow |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Tue Nov 24, 2015 9:13 am Post subject: |
|
|
Have you tried an update of bascom.
There may be more files missing.
What version are you using.
Regards Paul |
|
Back to top |
|
|
snow
Joined: 28 Jun 2005 Posts: 200 Location: Ashburton / Mid Canterbury / New Zealand
|
Posted: Tue Nov 24, 2015 9:17 am Post subject: |
|
|
Ill try an update
my current version is
Compiler version :2.0.7.5
Compiler build :2.0.7.5.003
IDE version :2.0.7.5.003
Cheers
Snow |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Tue Nov 24, 2015 9:25 am Post subject: |
|
|
We are nearly at 2.0.7.9
2.0.7.8 is current version a lot of changes and a few bugs fixed since 2.0.7.5! |
|
Back to top |
|
|
snow
Joined: 28 Jun 2005 Posts: 200 Location: Ashburton / Mid Canterbury / New Zealand
|
Posted: Tue Nov 24, 2015 9:56 am Post subject: |
|
|
Yea man that fixed it!!!!!!!!!!!!!!!!
Thanks fer your help...... Hurry up parts |
|
Back to top |
|
|
|