Yun Server setup with lighttpd, php, sqlite possible?

I have been studying the best way to make a versatile server on the Yun. My arduino Yun project is to keep household utility usage records, water & power. The 64MD Flash might pose some program limitations, but I can use the 8GB SD and off-load stuff there and have an overlay.

Please advise do's or don'ts on lighttpd, php, sql from this forum before I crash the firmware again as I did installing php with a sketch running. ugh. Anyway with help from the Gods ( ffissore and sonnyyu ) I managed to restore the bootloader and I'm now running firmware 1.5.3. So on to =>

http://wiki.openwrt.org/doc/howto/lamp

I just got a minimal lighttpd working on the Yun. I installed lighttpd on OpenWrt but I only recently learned how to disable uhttpd. Now I can see that lighttpd works. Right now i am editting the lighttpd.conf file in /etc . I know luci isn't recognized yet because the Yun logon is broke, but I can restart uhttpd to fix it.

Will php and/or mysql or sqlite run on OpenWrt-Yun with just uhttpd?

I would like to open a web page on the Yun with the readings from the sensors in a respectable looking dashboard. This works : http://192.168.1.217/index.htm (or yun.local/index.htm)

I can open my model index page (as index.htm) snapshot attached, and I have a link in it that goes no where yet. I would have the link refresh the dashboard. I have sketches working for water flow, and electricity, etc running on different Yuns. I can write the data stream to SD, so I'd like to see the SD data displayed as shown and have that activity running on the openwrt/linux side. This requirement has led me to php.

Since Arduino can write data strings to the Yun SD in the loop (could be sql or anything) I want to refresh the dashboard(s) data when the server brings up the index page. Right now I can use temboo on the arduino side to write data to Google sheets and that is ok for daily writes, just not every ten minutes. If i want up-to-the-minute readings i want to see them on the Yun.

If I can get the system working in my home network, I'll get a DNS so i can monitor from the internet.

I know this is a big subject, but i find little mention of server and YUN or lighttpd on the forum. I've read link after link about configuring openwrt, but the yun is special.

I am still a novice in the coding arena, though I've built and tested everything from CK722 to aerospace electronics, RF and digital.

Any advice? Thank you.

Backup_lighttpd.conf.txt (5.84 KB)

BackupConfig_uhttpd.txt (2.64 KB)

Found these for implementation. Nice to know which fork in the road to take. Pun intended. Thanks.

http://forum.arduino.cc/index.php?topic=297259.0

http://forum.arduino.cc/index.php?topic=194799.0

WhidbeyBill:
I have been studying the best way to make a versatile server on the Yun. My arduino Yun project is to keep household utility usage records, water & power. The 64MD Flash might pose some program limitations, but I can use the 8GB SD and off-load stuff there and have an overlay.

::::SNIP::::
Any advice? Thank you.

@WhidbeyBill, just a quick note while I read you post. We just went over this a few days ago. 32GB is the largest SD you can use with the Yun. There might be a limitation with the USB drive as well.
Jesse

@WhidbeyBill,
you are all over the board with your questions. I can't help but comment that you should take some smaller pieces and then hit your bigger target. It appears you have a goal, but are confused by the presentation of the Yun.

Well, as well designed as the Yun is, there are huge holes in the documentation - mostly because this is an open source project that depends on the users to do some of the lifting. Part of the social contract between us and the Arduino company.

As to your biggest question - unasked question. You stated

"""
I just got a minimal lighttpd working on the Yun. I installed lighttpd on OpenWrt but I only recently learned how to disable uhttpd. Now I can see that lighttpd works.  Right now i am editting the lighttpd.conf file in /etc . I know luci isn't recognized yet because the Yun logon is broke, but I can restart uhttpd to fix it.
"""

Can you clarify this? I'm unsure of your goal here.

But first let me state, I think you are going about this the long way. First uhttpd does just about everything you need. Together with Lua you can do it.

On the next question of data storage.

MySQL and SQLite are both working on the Yun, and they both have lots of support libraries in various languages. Yun can look at a summary list of 2300+ packages here.

Lastly, I would not worry too much about your webpages at this stage. Get your webserver up and then get your dataserver up. After that, it's easy as pie - depending your requirements. :wink:

Jesse