![]() |
LocCommand
Hey there,
I had this idea while in the cinema, wouldnt it be cool, if within the theatres themselves, phones would turn off or, switch to silent automagically. This would be very handy for in school, as well. So if in school, turn on silent, if at home, turn off silent. I was relatively new to the the n900 in general, so I wrote some Python code on and off to try and get this desired behavior. I decided the best way would be to try something similar to crontab. So heres some code: loccommand-serv.py works as the server, which checks every so long for change in location, using the gps, and runs predefined commands based on this location. loccommand.xml is the XML file, which contains details of the commands, co-ordinates, and the radius around which the location should remain active. loccommand-gui.py is the GUI Editor (uses pyQT) which just parses the xml, displays it in a table for editing, and then parses it back to xml, and writes it back the file. I was at a loss on how to make the server part, run continually, something like a windows service, or a daemon process, I would think. Theres also the rather big problem of the inaccuracy of the GPS. At least for me, it rarely gets a location within half an hour, if not using a wifi or mobile connection. I'm posting this here, as I'm in my final year of secondary school here, so my time is quite scarce, as I have numerous projects to complete. So any ideas, on further implementations, or improvements? ~mc_teo |
Re: LocCommand
I can see this is a very good idea for those whom don't have strict schedules. Such as working overtime at a job when you normally set through alarmed to turn off silent mode at a specified time which was defined as your normal time but not your overtime which just happened to occur on that day.
In some ways I would prefer this to be somehow integrated into alarmed as part of a GPS event at a certain location. This can thereby minimise the amount of servers (or basically daemons) that needs to be running in the background. Then again if Shapeshifter (alarmed developer) isn't keen on integration I suppose portions of his idea can probably be copied (after obtaining appropriate permissions of course) for adaptations of his work. I am not a programmer so I cannot help much I'm afraid. I can definitely see the benefits and if it was integrated into alarmed it would be ideal as alarmed already has plenty of built-in functions that could potentially benefit if one uses GPS rather than setting specified times and hoping that everything would fall into place. |
Re: LocCommand
you might want to have a look at dwimd: http://maemo.org/packages/view/dwimd/
http://hg.alexanderweb.de/dwimd-main...aa9/README.txt Quote:
Keep on hacking, something like a location aware event trigger daemon is quite a useful and missing bit. cheers jOERG |
Re: LocCommand
Thanks for the feedback,
I am quite busy at the moment with last year of school stuff. (We base our university entry solely on one major three week exam, at the end of academic year), so I am currently studying for a mock exam. When I finish those exams, I will be keen to take up some projects like this in earnest. the DeSumE Nintendo DS Emulator is another project, I would like to work some more on, in C++. So thanks, for your feedback. ~mc_teo |
All times are GMT. The time now is 11:00. |
vBulletin® Version 3.8.8