HI, I'm not totally sure what the gpio file is about, but an easy way to do it is to have while loop in a python file. Each time it goes through the loop it can do things like check the serial line for sensor data, run any automated items like turning on the lights in the evening, and read for messages that where sent to the server from the internal network. I used ampy back in the day: https://launchpad.net/ampy with that system running, you can check for data from the network and send it as a command to your device. It's not web2py at this point. web2py only assembles the ampy messages that are clicked on and sends them to your service running the the backend. I'd be happy to help you there if you like. But it's not very web2py related, so I think it should be off list. Time is limited for me, but we could do something. :) BR, Jason Brower
On Thu, Jun 6, 2013 at 9:50 AM, freäk qnc <freak...@gmail.com> wrote: > Hi Jason, > > Thanks for your reply. You're right it's a group of about 5k users, > although I must say that while on webiopi group with less than 150 users I > would get an answer on the same day, which I thought was amazing given the > few users and just one developer. I guess the more users the more difficult > to get answers as many ask and few can provide an answer. > > Regarding the verbosity of my post you may notice that my original post > had a mere 5 lines (well on my large screen it is at least ;D), before I > stated "My experience so far to give you a bit of background context..." > which was only a recount to give those interested in reading further, an > idea about what I had tried before landing on web2py, but was not to needed > to understand what I was asking in the prior paragraph. > > About the bump, mine didn't mean to be one (which was also about 4 lines > long going by my screen). In all honesty I was just thanking everyone on my > way out. > I had spent several sleepless nights digging for info and reading docs to > make this work and that got me nowhere. In the meantime the author of the > referenced instructable was nice enough to get back to me, but > unfortunately it was (in short) with a "sorry can't be of more help" reply. > So I figured it wasn't meant for me to go down the web2py path. > > I didn't look at what I was asking in terms of percentages, I thought > web2py on raspberry isn't much different than web2py on linux, so I thought > I was asking 100% about python programming in web2py, while referencing the > small application in the linked instructable tutorial, my bad. Anyone > curious or wanting to help would have only needed to install that same app > on a raspberrypi to replicate understand what was being asked. > > Thank you for the generic info which validate what I already knew. Indeed > there is the need of a "deamon" or service running on the same host where > web2py is installed to have a permanent listener to events (whether > triggered by webUI or a sensor change). In the case of the > referenced instructable, that'd be the "GPIOServer.py", which once launched > (by rooting into the raspberrypi), it will stop for unknown reasons after > an unmetered amount of time but surely more than a couple hours. That's > already a deal breaker if I can't manage to have that script running > reliably and continuously upon each reboot. I haven't tried an > /etc/init.d/GPIOServer.py defaults perhaps will do that just before I drop > the web2py option. > > Concluding, the help I was asking for was by a fellow tinkerer who had > followed the same instructable, was about to, or was willing to follow and > replicate the same steps. Without doing that, I am aware that the reply > would most likely have been "I don't quite know what your wanting." ;D > > To know what I am trying to achieve and the issues I'm experiencing, all > that's needed it's simply to upload the application in the instructable on > a web2py installation running on a raspberrypi. At that point after > following the same steps, it would be clear what I'm asking and, for those > with more experience and knowledge than I, it would probably be relatively > easy to spot what's needed to be done in order to: > 1) have the GPIOServer.py running without stopping, > 2) have the UI buttons change from simulating button presses on a remote, > to a simple click/ON (to set GPIO pin high) and click/OFF (to set the same > GPIO pin low) > > Thanks once again for the much appreciated reply and for your suggestions > to help with this project. > > Cheers! :) > > > > > > > > > > > On Wednesday, June 5, 2013 11:48:43 PM UTC-4, encompass wrote: > >> Hi there, I wouldn't say we are a small community. But BIG questions >> take BIG answers. So it's a pain to answer some of these questions. >> Infact, your "bump" was even wordy. >> I have done projects with arduino and raspberry pi many times. Even as >> part of my business. >> You question is 60% raspberry and 10% web2py and 30% programming. >> I didn't read the entire instructables. But in doing robotics with >> web2py, the best route if you want the best control is as follows. >> You create 2 basic objects, the web frontend, and a small service in the >> backend. >> I don't deal with the GPIO's much, but if you need an application to keep >> it "on" in a particular pin, you will need an app to do that. Also helps if >> you want to further automate and not just have it reacte to web events. >> (like reacting to a sensor) >> So it's a pretty vague response. But still, I don't quite know what your >> wanting. We can have the conversation here, or you can contact me directly >> and I can help you out there too. >> Your lucky, this list is so busy I am usually not subscribed. >> BR, >> Jason Brower >> >> >> On Thu, Jun 6, 2013 at 1:13 AM, freäk qnc <frea...@gmail.com> wrote: >> >>> Apparently nobody is interested in this project or similar. I haven't >>> seen so little activity on a group as I've seen here. So I guess web2py >>> doesn't have a huge user base/following. Was worth a try though. Looks like >>> a very well made system, but apparently isn't something that could do for >>> me. Major deal breaker was to have the GPIOServer.py stopping on its own >>> with no apparent reason or user interaction. As that is the event listening >>> script, having it to stop means the whole system becomes unusable. Also >>> looks like there is nobody available to help others figure out >>> web2py-related issues... so I guess I'll have to go back to the drawing >>> board and look elsewhere. >>> >>> Thanks to anyone who looked... >>> >>> Cheers. >>> >>> PS: Advise to others who like ma may be looking for home automation >>> solutions... web2py didn't do for me so you may want o avoid wasting your >>> time and skip it. If it did work for you and disagree with me... please do >>> contact me. I'd love to be proven wrong and get a working system. Thanks >>> >>> >>> >>> On Thursday, May 30, 2013 2:55:39 AM UTC-4, freäk qnc wrote: >>>> >>>> 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/**i**d/Raspberry-Pi-GPIO-home-** >>>> autom**ation/?ALLSTEPS<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+un...@**googlegroups.com. >>> >>> For more options, visit >>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >>> . >>> >>> >>> >> >> -- > > --- > 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. > > > -- --- 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.