Ask Slashdot: Scripting-Friendly Smartphones?
An anonymous reader writes "I am choosing a smartphone for work, moving up from a long history of just-a-phone phones. This coincides with moving into an environment where I will have a desktop machine in my office, rather using my laptop — so I'll VPN in from home, and am looking forward to not trucking my laptop around everywhere. BUT ... this means I now won't have my laptop all the time. I have gotten used to scripting various little things that make my life easier, and would like to carry that over to the phone. For example, periodically check that a certain machine is online and backing things up the way it is supposed to; if the lab monitoring system sends me an email that the -80 freezer is up to -50, play a sound and run the vibrate system in a specific, arbitrarily chosen pattern; when I press this button, record an MP3, when I release it prep an email with it attached, that sort of thing. Does such a beast exist? Has anyone used one and if so what do you think? Bonus points if you know if I can use it with Rogers (Canadian wireless provider used by my workplace)." I've heard good things about (but never used) the payware Android app called Tasker; what other recommendations do you have for running the world from a smartphone?
Have you considered that perhaps the screen real estate, and perhaps the fact that most soft keyboards take up half of the screen, prevents mobile phones from being used as dev platforms?
Sometimes.
I'd argue this is part of the geek/hacker mindset, and while it's a valuable asset, we have to remember that this places us outside of the mass market in some fairly significant ways. As a direct result of this, we're no longer the "target market" for consumer electronics.
Any android phone that can be rooted + SL4A.
Nokia n900 would be my first choice for reasons that are obvious.
HTC HD2 would be my second choice. Laugh if you must, but the interface HTC slapped over WM 6.5 makes it halfway decent and the APIs are open for pretty much anything you want to put on it.
Don't forget about sl4a, it's still a legitimate project.
The Nokia's N900 (not the newer 900) is a full linux distro that happens to also function as a phone. It is the best computer I have ever purchased.
Exactly.
n900. it's open source and has a full slide out keyboard for when you have to write a script on it an emergency. normally i prefer to write such things on my desktop then use ssh to get them over to the phone, but it can be done on the phone itself too.
Maybe he's not allower t obring his personal laptop to his new job?
APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
Really any large screen high resolution smart phone will do the trick. Basically you want a phone (most of the time) and a terminal some of the time. On screen keyboards suck. high resolution makes them easier to pack into a small foot print but doesn't address the big issue of lack of real estate. For this, I recommend (as small as you can get it) a blue tooth keyboard. Personally I use an old iGo Stowaway Ultra-Slim Bluetooth Keyboard. Small enough to carry around in the car with me, or in my pocket, if I really really need to get serious work done. If that's not an option and it's on the fly well on screen keyboard has to do the trick. Good luck, the galaxy s3 is pretty slick, albeit big, Right now I use a razr and it's performance has been pretty solid (though much to be desired in the screen).
The N9 is a wonderful phone, can certainly be scripted (I ssh into mine all the time to do things), but lacks a physical keyboard. The onscreen one is great, but because it takes half the screen it makes the shell-window smaller. (really, you might want an N950, but those "don't exist" and getting one is difficult, plus the antenna issues make it less useful as a real phone).
The N900, now hard to locate, has a great screen, a great keyboard and is the predecessor to the N9. But they have a known issue with the USB port breaking over time, so if you do actually succeed in finding one to buy don't expect it to last forever and ever. But this is 2000+ where things aren't expected to last longer than a few years.
sigh
The next site to slashdot will be ready soon, but subscribers can beat the rush and start slashdotting it early!
My suggestion is Tasker, but unless there's a mail parser plugin I haven't come across (or unless you write one), it won't take actions based on the content of e-mail messages. It will, however, react to SMS message content. So one way to handle your custom notifications is to write a script that runs on another always-on, always-connected machine. Have it receive and parse the e-mails and when one of them meets your criteria, have it send you a text message with relevant content, then have Tasker do whatever is appropriate when that message arrives.
To make sure your script-running server is up, use something like Ping HostMonitor. You can also use that to monitor the status of any Internet-accessible hosts.
The biggest downside of this approach is that it relies on SMS to reliably notify you. You might also want to have Tasker send an e-mail acknowledgement when you get the SMS, and have your script keep re-sending the texts periodically until it receives the ACK.
Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
I've done similar things, where I want my phone to tell me if some external activity has happened or has changed beyond certain parameters.
I do the analysis elsewhere, such as on that desktop PC, and the alert consists of sending a text message to the phone (or multiple phone numbers). Google for the how, it's a common practice and easy (and free) to do. Depends on the carrier, altho some sites claim to figure that out for you, but I just figure each one out and avoid them. this does mean that if a phone number changes carrier, I have to change the script, but since so far I have only sent texts to my own phone, it's no biggie. Just have one central script to send the actual alert.
Infuriate left and right
You have a desktop sitting at work that can handle all of the scripting. Then use something like Growl or Growl for windows can then just notify you of events your desktop is taking care of. If youre in a pitch then SSH or VNC into the desktop and send commands.
Scripting on the phone is a waist of time if you have a full desktop and the scripts already setup. Unless your looking to play and learn something new.
If you're comfortable with scripting, you may want to write your own android app to do just what you need. Just make sure you buy an android phone that can install non-market applications. To test this in the store, ask to see a running phone of the model you're considering, and follow this procedure:
1. From the main screen, tap the menu button.
2. Tap Settings.
3. Tap Applications.
4. Look for a checkbox that says "Unknown sources - Allow installation of non-Market applications", and make sure you can enable it.
I realize this solution isn't for everyone. You would have to learn Java if you don't know it and learn Android programming, which isn't that hard. Otherwise, you could set up a special server with a regular OS and run your scripts there. If there are exceptional conditions, your server scripts could send an email to a special email address. You can quite easily configure your android phone to play a special ringtone when your "exceptional condition" email account has new mail.
As far as easily attaching sounds to an email, you may have to roll your own app for that. Someone more knowledgeable than me may know of an app to do this, though.
No.
The vast majority of the people is used to under thinking about everything.
Lisias@Earth.SolarSystem.OrionArm.MilkyWay.Local.Virgo.Universe.org
Nokia N9 is what you need. Doing stuff on it is simple (everything can be accessed throught built-in bash shell) and it gets the job done unless you need bazillion of apps outside of the usual Twitter/Email/Facebook/etc. scenario. -- Sent from my Nokia N9
You probably won't get many recommendations for BlackBerry but a BlackBerry combined with a PlayBook may just be what you are looking for.
"A person is smart. People are dumb, panicky dangerous animals and you know it." - K
Android Scripting Environment is a layer that allows various scripting languages interact with the Android API. It supports a bunch of languages and allows for a decent level of control over the Android device. http://code.google.com/p/android-scripting/
I'd recommend a two-pronged approach, if you're looking for something user friendly and not requiring building an intermediate server.
First, check out the unbridled awesomeness that is If This Then That: http://ifttt.com/ It allows you to create simple (or complex) triggers based on all manner of inputs with all manner of outputs. Email, SMS, Social Networking, etc. I use it with a "private"(read: used only for this, and nothing actually private is tweeted) twitter account to pass data about. I originally used SMS, but I moved to twitter later as it's remarkably convenient and can be adapted easily to a number of different devices, whereas SMS is limited to phones (for the most part).
Then, on your sexy Android phone - I'm using a Note, personally, it's the closest I can get to a tablet but still be able to comfortably put it in a pocket - use Tasker to intercept and act.
Really, though, the first thing I'd do in your shoes is seriously investigate IFTTT. It's very easy to use and flat out awesome.
Meh.
How the hell did you get by the lameness filter?
You should check out Scripting Layer for Android (SL4A).
Why would you want to run the script on your phone?
Of course there are apps for that.... but then why? Here is what I do. I use VPN (Cisco VPN is the one supported in most corporate environments, and is available on linux), and then just ssh to any machine I want.
There is talk of even remote desktop kind of client coming to android.
Alternatively, you could just ssh to the machine you want to access, and then do as you please.
I use a Galaxy note, and since the screen is 5", its very usable. However, on smaller phones(like my older optimus one from LG), such stuff was a pain.
So all your scripts will run on the server, in your lab, and email will be sent to you. Its far more easy to set up these scripts on the computer in your lab. Heck, you could write the scripts locally, and then ssh to your server and put them there.
But if you still want to do stuff like access email, parse through it, and then do something(ssh to server blah blah), you may as well write your own app. On the market, most such apps will do only a part of what you want.
Somebody has suggest N900(linux), and if you want everything on your phone, a linux phone is what you are looking for.
My Aurora : http://www.youtube.com/watch?v=o91ZsGwJYyg
FB : https://www.facebook.com/TanveersPhotography
Amidst the incoherent rambling I suspect, and look up to confirm yet again, that it is Timothy who has posted this trash. Is this the boss's son or something?
I object to power without constructive purpose. --Spock
Quite.
Windows Phone has TouchDevelop from MS Research, not sure how comprehensive it is but it does give you on-device scripting of functionality.
Since you're on rogers: http://www.rogers.com/web/content/iphone4s
I suggest:
Prowl: For push notifications. It's free and you will find the perl script handy. There are some powershell ones floating around somewhere too. http://www.prowlapp.com/
Prompt: CLI. If you jailbreak (highly recommended) you can ssh to localhost, it's better than any Terminal app in cydia. http://itun.es/i624Jj
There are others but I never use them. My coworker and i opted for a home brewed app that handled a lot of our needs by phone in the event we had to be called about something off-hours.
Well, it depends on your personality :
- Some people are action oriented, and will act before thinking ( under thinking)
- Some people are emotionally oriented, and their actions are driven by their emotions
- Some people are mind oriented, and they overthink everything, avoiding action until the last moment.
Everyone is useful in their own way.
Seems better to have a separate dedicated machine that runs the scripts and monitors everything and send email alerts that you can receive on your phone.
There's no place like ~/
Pay? Android? Surely you jest.
FTFY.
Your mom.
How about a native (ARM) linux distribution. To name some (semi-)automated installation tools
Linux Installer
https://play.google.com/store/apps/details?id=com.galoula.LinuxInstall
Debian Kit
https://play.google.com/store/apps/details?id=org.dyndns.sven_ola.debian_kit
Complete Linux Installer (NEW)
https://play.google.com/store/apps/details?id=com.zpwebsites.linuxonandroid
Microsoft has something called on{X} for Android that allows you to use Javascript for scripting. It's not clear how extensive it is, but it might allow you to do some of the things you're thinking of. See here:
(doc) https://www.onx.ms
(app) http://aka.ms/onxapp
Though I don't use it myself, notify my android looks very good. https://play.google.com/store/apps/details?id=com.usk.app.notifymyandroid&feature=search_result
Also, it integrates with tasker. And once you get tasker into the game, there's not much you can't do.
sure beats OVERpaying for stupid functionality that should be in the os in the first place, like with winphone and ios.
Telit has nice GSM modules with Python scripting built-in.
http://www.telit.com/en/products/gsm-gprs.php?p_id=12&p_ac=show&p=3
Jacek Artymiak
freelance consultant and writer
master of many a page
You can get Debian running under chorrot very easily on Android. However I am not sure if this is what you want. I actually got Debian running in a chroot environment on my old Archos 101 tablet. I can tell you that the main problem I experienced was typing the commands. Typing on a glass screen felt very different to typing on a keyboard. Somehow I lost the ability to touch type... That was no fun when you try to issue command in bash. Then I got a USB keyboard for the tablet, but it looked even more awkward than a netbook. I think if you are serious about scripting, get a netbook with 3G connection. The bottom line is that your new phone have to have a keyboard.
Symbian smartphones are the best I've found for scripting.
They work great on Rogers, Rogers even sells some in bundles.
A business phone with full side slide QWERTY keyboard like the E7 would be your best bet.
Rogers or Tbooth might get you a '$0' bundle on a multimedia phone like the N8. You can always use a bluetooth keyboard for the serious typing.
Well, it depends on your personality :
- Some people are action oriented, and will act before thinking ( under thinking)
- Some people are emotionally oriented, and their actions are driven by their emotions
- Some people are mind oriented, and they overthink everything, avoiding action until the last moment.
Everyone is useful in their own way.
-Jocks
-Women
-Nerds
Yes, but this isn't an example of overthinking - he wants to invest a few hours of his time into saving hundreds of hours later down the line - that's a good thing. :)
If you are concerned about monitoring setup a server with Nagios. Hook up an SMS modem or use an email-to-SMS gateway so that you can get email and/or SMS alerts. If you want to keep all of your scripts handy then install them on said server and access it remotely using SSH, UltraVNC or dare-I-say-it-on-slashdot RDP (if you're worried about security put it behind a VPN). That way when you drop your smart phone in the toilet you can just login to any internet-connected computer and everything's there. Welcome to the private cloud!
I have no clue why everyone is rushing to have you put scripts on a smartphone, which can be lost, stolen, run out of battery...
You do your scripting on a PC at work, and only receive reports on, or do *emergency* remoting from, your phone. At most you tweak your phone so that if it receives an email/text with keyword "ALERT" from sender my.scripts.at.work, it does something noisy.
Any phone can do that, it's a matter of finding the right size/features balance. I'd go for a big screen, and maybe a hardware keyboard if you think you'll be doing a lot of remote editing, though the best phone keyboard is a lot worse than any laptop's, so don't plan on using it too much.
The Cloud - because you don't care if your apps and data are up in the air.
Rather than using the Phone to do the monitoring and polling, I'd consider using a service on the network at work and then make your phone a client of this service.
An example would be to use Nagios to do the monitoring and then use one of the countless Nagios Clients available to read the monitoring state from the service. You'll get the added bonus of knowing what happens if your Network coverage goes away to fill in the blanks after the event and be able to escalate to someone else if you're not available.
When people ask if I'm an optimist, I say "I hope so". --Bill Bailey
I always figured that anyone who buys a phone that needs scripting to do what they want is the one who under thought their purchase. It's like being proud that you need to install your own shocks in your brand new car.
This would be the right question, in my humble opinion.
Sent as ripples into the electromagnetic field. No single photon has been harmed in the process.
Go for an Android + on{X} http://www.onx.ms
some people over think everything, don't they?
There are indeed some Ask Slashdots (for example those that go on building some kind of datacenter at home) that overthink the problem, but I don't think this is one. The guy is just asking for some niceties to get alerts from the server room and extras for e-mail. A little bit of automation like that might actually make things smoother for him.
Oh yes. We at slashdot are so much smarter than the common pleb.
Give me a break. The only thing greater is the undeserved ego.
Nah. If you don't get too cocky about it, I think it's fine to be slightly proud to be a professional IT dude. ;)
Probably the stuff he needs is so specialized that it is not available out of the box in any phone. So it would be more like installing a bunch of James Bond gizmos in your brand new car.
Ruboto IRB (in Google play)
tuProlog (from their site)
BASIC ( in Google play)
Not so bad. Need no root.
Name me one professional rally racing team that doesn't install their own shocks on their brand new car.
If your needs are specific enough, no standard solution will suffice.
Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
Both the older Nokia N900 and the more recent Nokia N9 provide excellent support for Python, including support for the native toolkit (PyGTK with Hildon in case of the N900 and PySide/Qt in case of the N9). Other interpreters can also be installed from the repos or compiled from Debian sources, one advantage of the N900 is its hardware keyboard, but the N9's virtual keyboard is also quite good (for a virtual keyboard).
It has native Terminal app with busybox, SSH client/server, tar, openssl, nano, etc, and an easy to install Debian chroot for everything else... My only scripting experience was creating a chroot.sh to get to the debian programs for network monitoring and routing.
My goal was to find a cheap, linux-based, touchscreen phone with 3G and WiFi, that tethers well. The cheap, Chinese Androids were >$120, and this one only costs $70 for the Rogers/ATT version or $45 for the other carrier type.
In case this interests you... fyi, WebOS 1.4.5 (latest firmware) is ~99%(??) open source, and it was well-maintained by a dedicated community for a couple years after it was discontinued. They rounded out os/kernel/ui stablization, optimization, and fixes, which are available as patches in Preware. (I use just under 100, and installed OpenStreetMaps, a better Music player, File Manager, Calculator, System Managers, and a few good puzzle games).
http://code.google.com/p/android-scripting/
i have used tasker and i am pretty sure that it does all that you want. i run it on my galaxy note and its pretty easy to use.
Speak for yourself. I know I have something much greater than most men out there.
Amidst the incoherent rambling I suspect, and look up to confirm yet again, that it is Timothy who has posted this trash. Is this the boss's son or something?
I am am a complete noob when it comes to posting here but I have been lurking for a longtime and recently I have thought I was reading a yahoo "article" and worse, yahoo comments section!?
That seems to be the painless alternative to check their status on any phone regardless of brand. If you're thinking Apple, there are apps that that enable generating update emails/SMS from the client (phone). This would save you the need to configure each of your machines to send the updates. You would only need to set up SSH. Check http://www.hiteksoftware.com/sshmobile/ssh.htm for an example.
check the API's first to see if it has everything you need.
I don't know who has been modding down the sl4a posts, but whoever it is, he knows what he is doing.
I have been working with sl4a lately because my son has an Android phone, and I can tell you that it is half baked. There is much functionality that is missing regardless of the language that you choose. Much of it just does not work. I made a python script to send an SMS message every 4 minutes. In the script I have a time.sleep(240). Ten minutes later... still no SMS message.
If you want real script programming, get an N900. Almost anything you can do on a Linux box, it can do. My N900 scripts grab data, send data, plot them using R or matplotlib, you name it.
1) Docked to power, it automaticly starts Bluetooth.
When bluetooth gets paired, it assumes (most of time) I'm in my car ad starts up GPS, Increases the Display brightness and launches WIKANGO (Community Based Radar appliance)
2) Putting in my earphones launches the radio application
3) Receiving a call will also launches bluetooth and tries to pair with may Car Hansfree set. (Usefull when driving with the phone somewhere in you're pocket)
4) Removing the power will put the device in a low consumption mode. (no GPS, no Bluetooth, no WIFI and decreased brightness)
These are some of the things you can do with tasker.
no text
ie, run an Android SQL client and connect to an instance of MySQL running on the remote host that only accepted incoming connections from localhost
The workaround I've always used for lack of remote database connections has been phpMyAdmin, but I have no idea how well phpMyAdmin's UI would fit on a phone.
You're doing it wrong IMHO.
The monitoring portion should be on platforms near the servers, not on your own device (mobile or desktop). Plus something to monitor the monitor, located farther away, preferably at another site. There are no good monitoring packages IMO, but many reasonable and usable ones. All of them should be as scriptable as you need.
You need one device on your person to receive alerts; a cell phone with SMS is good. My current job requires two devices on different networks, but that may be overkill for your situation. Don't do scripting here! All of the scripting should be on the monitoring server. If you're in an area where your cell phone doesn't work, you want to be able to see the alerts elsewhere. (When I'm in another country, I get a sim card for that country and forward alerts there, for example).
You then need something which can connect remotely so you can fix the problem. This could be the same as your alerting device, or it could be a tablet or laptop you keep in the car.
N
Nine
Hundred
Question answered.
"When information is power, privacy is freedom" - Jah-Wren Ryel
No need to rebuild the wheel, most data centers have various monitoring capabilities ranging from WebServer enabled monitoring systems (personally I like the units from ITWatchDogs), SNMP trapping to hand written scripting. Just borrow that functionality for your lab equipment. Here's what I do to monitor temp, security, water leaks, fire etc: Purchase a sensor unit that supports SNMP trapping or is able to push email alerts (WeatherGoose II ITWatchDogs was about the cheapest I could find for DC rack monitoring needs I had that supported lots of external devices, dialers etc). Since it supports various external sensors, you can make your own and tie it into the monitoring system (temp, humidity etc are built in, but smoke alarms etc are extra add-ons that either you buy or you can make as long as it's the right voltage). If using SNMP, have a monitoring server that can react any number of given ways, mine sends screen shots of the room from the security camera as well as and various alerts for too high temp, water leaks etc. If it's fire, it CC's our emergency fire system. I also use other things like "Site Uptime" monitors and such from 3rd parties on the email front, but that's more targeted at mail servers. For email alerts, I have a couple rules in Exchange (on the server level) to distribute it accordingly. I do use Tasker heavily to automate my phone, but really I don't rely on it as being mission critical as you never know when you'll be out of reception. Instead I try to use the servers to handle responses to the rest of my team and use Tasker to control when and when not to wake me up in the middle of the night.
He's not asking anything about "dev platform" stuff; he's talking about a simple feature that every PC since the 1980s has had. Whether you call it an ARexx port or D-Bus event handling or even DDE, any modern (or even decades-archaic) GUI will likely be scriptable, so that you can make the machine get things done without requiring a human "operator" to be there to mindlessly clicking distracting intermediate things.
I think he's trying to find out what's the name (or names) of the damn thing on the popular mobile OSes (since the same idea has a different name on every platform), and then he'll have a Google search term to use from there, whether it's to go find python bindings or whatever.
BTW, back the "dev platform" thing; you might want to look at modern mobiles again. Many of them have USB ports and HDMI or DVI outputs, so that you can use the finest keyboards and monitors that money can buy (though the device would hardly be "mobile" while you have all that stuff plugged in ;-). Also, most of them can run sshd. Not that the (relatively) crippled software environment would be pleasant to use for a large (a.k.a. "serious") project, but as for actually running an editor on the mobile (rather than your desktop) as you write/debug your script, it's not totally crazy anymore. It's merely less than ideal.
(Think back to the first time you saw a Mac Mini. Your first thought was "That's not a whole computer." Then you plug stuff into it, and it becomes one. Today's phones are physically smaller versions of the same thing, just with less-friendly OSes (iOS or Android), but also with a built-in touchscreen, so unlike a Mac Mini, you actually can use them out-of-the-box without plugging in more stuff).
And even if you don't want to do that (and I would understand if you don't), it's very viable to edit your scripts on your very-capable desktop and then save/copy them to the mobile. So the comment about scriping not happening on mobiles because of form factor limitation, just doesn't make any sense at all.
Others have covered the Nokia N800, N810, N900 options well. I have and still use my N800 almost every day.
On Android, Terminial-IDE comes with most of the commonly desired tools and doesn't require rooting the phone to be useful. With a BT keyboard, you can easily ssh into your servers and runs whatever scripts you want. There is a full bash for android too, so complicated bash scripts are possible, but if it were me, I'd want nothing more than a remote script that can check on the real monitoring happening on a monitoring server elsewhere.
I have an 1-inch android tablet with a keyboard and a Galaxy-S phone. Phones and portable devices aren't good for monitoring, they are best for notifications and remote access to servers when you aren't near a real computer with a keyboard and screen. Android is too limited still.
Terminal IDE rocks.
I love my android and N800 devices - LOVE them, but they aren't ready for monitoring of production systems primarily due to network connectivity issues and how easily they can be lost or stolen.
Few if any of them install their own shocks. Most of them are off the shelf... Koni, Ohlins, Sachs, etc. I'm not aware of any brand of automobile much less rally team that builds their own.
Manufactured by a specialist company perhaps, but a lot of racing teams design their own shocks. Particularly in the high-end racing leagues.
Some do infact manufacture them themselves.
Besides, you're just being pendantic.
When talking about running a scripting language on a phone, do you think we're talking about developing the scripting language itself too? Probably not.
Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
Got it. Pedantic is less desirable than wrong. Noted.
No, wrong is still less desirable. But being both wrong and pedantic is even worse.
Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
I've been using Tasker for a couple years now, and it's awesome. It's well worth the $7 or whatever it is now, and the new AppFactory feature even lets you export .apk's based on scripts you generate (perfect for an IT group that uses Android, configure once and give it to your coworkers to install as an app).