Hi everyone... I have a quick question... could someone give me a quick 
example on how I could modify the app presented on instructables by 
willq44? 
http://www.instructables.com/id/Raspberry-Pi-GPIO-home-automation/?ALLSTEPS

I would like to change to a toggle the function so that triggering a button 
will set a GPIO pin to high and hitting it again will turn it to low with 
corresponding visual feedback (icon button on and off). It's rather simple 
but as a noob on web2py I need some help... I implemented 3 systems trying 
to get this simple task of triggering a relay via webui on a standalone 
(non internet connected) system. 

My experience so far to give you a bit of background context...

I've used BerryIO <http://frozenmist.co.uk/downloads/berryio/>, a great 
system and easy to install, but definitely an overkill not very flexible 
and with no user management for login (must login with machine account 
(root/admin) since it exposes also system level information. Unfortunately 
is not simple enough and requires a steep learning curve if wanting to 
change something, I found no support, groups, or documentation illustrating 
how to customize it. Not being readily customizable to turn it into 
something simple (like being able to allow multi user access to a set of 
triggers) made me almost immediately look elsewhere for my needs.

I have also used webIOPi, by Eric Ptak (aka trouch) he's been great and the 
system works OK... there are several issues, lacks of authentication which 
I worked around with a small php login script, but the way webIOPI is built 
required me to use ProxyPass directive and jumpt through hoops to have it 
all working. Problem though was that after all the hard work I ended up 
with an unreliable and too often unresponsive system. There could  be a 
sporadic delay in execution, but they are so frequent they became 
unacceptable to let it control anything. 
To try and fix responsiveness as it was happening in patterns that would 
lead to think it might have been due to dynamic overclocking kicking in and 
out depending on activity, I tried overclocking and keep the clock steady 
(at 900MHz), but that made no difference in responsiveness as commands 
triggered continue to get delayed and queued with delay. 
I also tried using new equipment (wireless N router, oversized 2A power 
adapter to make sure there would be no downclocking due to low power) to 
minimize possible slowdowns that could've been attributed to hardware. 
Nothing worked. WebIOPI is a promising system, but not ready for prime 
time, I also had to work using quo.js to make the UI compatible with touch 
events on mobile OSes, but all in all I hope it moves forward eventually 
since it's a nice system overall that only need more resources and love by 
more than just 1 dedicated person. Eric announced that will take some time 
off after diving in and supporting daily the community with his invaluable 
help.. I hope he'll get some funding and bring webIOPi to fruition for an 
affordable fee... but until then webIOPi won't do for me.

So out of frustration and need to get things done I went digging and found an 
old instructable 
<http://www.instructables.com/id/Web-Control-of-Raspberry-Pi-GPIO/>for 
"raspberrypi-gpio" - a web based interface for the Raspberry Pi GPIO pins 
with the project hosted on google 
code<https://code.google.com/p/raspberrypi-gpio/>

After a few road bumps I had it all working... the lag wasn't terrible and 
because values of pins are stored in database the reliability was pretty 
good. The problem that eventually led me to drop it was that starting the 
service as suggested in the help thread on the instructable page by Daniel 
Curzon (the author of the useful how-to), caused 2 problems 1) user is 
prompted by a refresh timing when the script launches and for a headless 
system this is a deal-breaker already, 2) even when connected to monitor 
and keyboard and setting the value, the script causes an endless loop that 
de-facto impedes a full startup and hence causes errors as php/mySQL aren't 
accessible. Not willing to deal with it all I had to drop it... besides the 
so-so responsiveness (at times about 4 sec to trigger a pin) wasn't a great 
motivator to troubleshoot.

So I landed on web2py which at first I didn't get into for lack of 
experience with python and because there were solutions I was more 
confident about as they were using LAMP setup basically with a python 
server pre-made (like webIOPi)...

Still not very straight forward for a noob on web2py and python... so I'll 
treasure any info anyone will take the time to send my way. 

Thanks for your time and help!

Cheers :)

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to