serial communications
Moderator: Martin
serial communications
Every arduino in existence has a usb serial port. I can talk to an arduino from an android phone with an OTG cable and one of the numerous serial apps in play market. I believe at some point android baked in support for common usb serial chips, like the FTDI ft232rl.
how awesome would it be if automagic made it easy to interface with the physical world via serial? Other methods involve extra (expensive) hardware like Bluetooth or WiFi shields and are difficult to program both on the arduino side and android for a beginner.
At first, being able to send a serial string based on a trigger would be so cool. If possible it would be even better to have the serial as a trigger, to do certain things when it sees certain strings (a command parser of sorts)
Possible things that are EASY and cheap and awesome:
Turn on coffee machine from sms message
Water plants remotely, retrive sensor data via sms or email
Start my car via sms, since my remote start has aux triggers
The possibilities are endless!! With how many arduinos and old android phones there are in existence, this could blow up into something big. Nobody does this yet!
how awesome would it be if automagic made it easy to interface with the physical world via serial? Other methods involve extra (expensive) hardware like Bluetooth or WiFi shields and are difficult to program both on the arduino side and android for a beginner.
At first, being able to send a serial string based on a trigger would be so cool. If possible it would be even better to have the serial as a trigger, to do certain things when it sees certain strings (a command parser of sorts)
Possible things that are EASY and cheap and awesome:
Turn on coffee machine from sms message
Water plants remotely, retrive sensor data via sms or email
Start my car via sms, since my remote start has aux triggers
The possibilities are endless!! With how many arduinos and old android phones there are in existence, this could blow up into something big. Nobody does this yet!
Re: serial communications
I've done a lot of research on this and know where to find info about serial support in android. I'm a competant microcontroller programmer and have EE skills to do fun stuff. My goal is to get on hackaday.com with something rad that nobody has done yet....

I forgot this app can do widgets! You could even build simple GUI's using widgets as buttons, and complex stuff with notifications and global vars!
Hvac control
Door opener
It's endless! All that's needed is to be able to send serial data.. seems trivial to me when I looked at it, but you have an awesome base to go off of. Prototyping would be easier, as it's cheaper and easier to use a phone and $2 otg cable than to wire switches and such..


I forgot this app can do widgets! You could even build simple GUI's using widgets as buttons, and complex stuff with notifications and global vars!
Hvac control
Door opener
It's endless! All that's needed is to be able to send serial data.. seems trivial to me when I looked at it, but you have an awesome base to go off of. Prototyping would be easier, as it's cheaper and easier to use a phone and $2 otg cable than to wire switches and such..
Re: serial communications
http://www.basic4ppc.com/android/forum/ ... ces.28176/
USB library for android, that supports almost all usb-serial devices that would be used for this application
USB library for android, that supports almost all usb-serial devices that would be used for this application
Re: serial communications
This sounds very interesting, thanks for the links. I'm tempted to make some tests and see if this works with my old serial servo controller.
I don't promise anything yet and it will probably take some months until I can take a look since my todo-list is very long already.
If you are familiar with Java and Android development, you could implement some functions in an action plugin (plugin protocol: http://www.twofortyfouram.com/developer). Such a plugin would also work with other automation tools.
I don't promise anything yet and it will probably take some months until I can take a look since my todo-list is very long already.
If you are familiar with Java and Android development, you could implement some functions in an action plugin (plugin protocol: http://www.twofortyfouram.com/developer). Such a plugin would also work with other automation tools.
Re: serial communications
If there is anything I can do to help speed this up, let me know. I am a competent C\C++ guy, I can get the android side of things sorted quickly, and even make a custom arduino library for Automagic (to make it even easier for noobs)
The reason why I want this, is because I don't know any other programming language other than C\C++ and g-code for programming CNC machines. I started making arduino things a couple years ago, and got pretty good with it. But every time I make something talk to the internet, I can't help but feel a little burned that I had to buy extra expensive hardware, and TONS of code to get even simple things to work, when I have oodles of old android phones laying around doing nothing.
I realize that one of the hardest parts would be getting both devices 'on the same page'. That is why I would make a library for arduino, to standardize the messages and responses. Examples:
- Arduino wants to know what time it is. It sends a preconfigured string to android, Automagic sees this and responds back with the time, library handles putting time in vars nice and easy for user. Apply same strategy to location data.
- Automagic gets text message from certain number. Automagic see's this, and sends a (SMS RxD)command and a string (containing SMS contents) to arduino, library puts string in an array for you
I dunno... things like that to make it as EASY as possible for the user.
I look at it like this: Automagic is a PAID app. You do a lot of things tasker does, in a way that it is easier for beginners to understand (because flowchart) However, you maybe get 5% of the mentions that tasker gets, right? WHY? Is there an automagic subreddit that I can go to and see everyone talking about flows? Nope. I think your app is superior, simply because I can actually make it useful without having to read for several hours. If we could build on this awesome platform you have created, you would reach an exponentially larger audience of people than what you currently have. When it comes down to it, your app is cheaper than the absolute cheapest bluetooth UART on ebay. Your app is cheaper than all shields that do wifi \ gps \ gprs \ RTC, etc etc.
I look at some of the other requests in this forum, and none of them have even close to the money making potential this idea does. That is the selling point for my feature request... I would make a cool project out of this, get it on hackaday.com and let it spread like wildfire from there.. adafruit, sparkfun, dangerous prototypes, EVERYONE will be talking about how easy Automagic just made it to get Android and Arduino together. You would be the first to do this... suddenly tens of thousands of people across the web will be paying you money, because at the end of the day your way is a LOT cheaper and easier than existing methods. The potential here is so big, I'd almost say make this a separate app, but I dont wanna say that because I think you can get it done faster with automagic
Thank You!
The reason why I want this, is because I don't know any other programming language other than C\C++ and g-code for programming CNC machines. I started making arduino things a couple years ago, and got pretty good with it. But every time I make something talk to the internet, I can't help but feel a little burned that I had to buy extra expensive hardware, and TONS of code to get even simple things to work, when I have oodles of old android phones laying around doing nothing.
I realize that one of the hardest parts would be getting both devices 'on the same page'. That is why I would make a library for arduino, to standardize the messages and responses. Examples:
- Arduino wants to know what time it is. It sends a preconfigured string to android, Automagic sees this and responds back with the time, library handles putting time in vars nice and easy for user. Apply same strategy to location data.
- Automagic gets text message from certain number. Automagic see's this, and sends a (SMS RxD)command and a string (containing SMS contents) to arduino, library puts string in an array for you
I dunno... things like that to make it as EASY as possible for the user.
I look at it like this: Automagic is a PAID app. You do a lot of things tasker does, in a way that it is easier for beginners to understand (because flowchart) However, you maybe get 5% of the mentions that tasker gets, right? WHY? Is there an automagic subreddit that I can go to and see everyone talking about flows? Nope. I think your app is superior, simply because I can actually make it useful without having to read for several hours. If we could build on this awesome platform you have created, you would reach an exponentially larger audience of people than what you currently have. When it comes down to it, your app is cheaper than the absolute cheapest bluetooth UART on ebay. Your app is cheaper than all shields that do wifi \ gps \ gprs \ RTC, etc etc.
I look at some of the other requests in this forum, and none of them have even close to the money making potential this idea does. That is the selling point for my feature request... I would make a cool project out of this, get it on hackaday.com and let it spread like wildfire from there.. adafruit, sparkfun, dangerous prototypes, EVERYONE will be talking about how easy Automagic just made it to get Android and Arduino together. You would be the first to do this... suddenly tens of thousands of people across the web will be paying you money, because at the end of the day your way is a LOT cheaper and easier than existing methods. The potential here is so big, I'd almost say make this a separate app, but I dont wanna say that because I think you can get it done faster with automagic

Thank You!
Re: serial communications
In thinking about it, making a seperate app might make a couple things easier on you.. Automagic runs all the time in the background, whereas an app that uses the serial might not want that, because you have to open and close the connection all the time.
Maybe a separate app that opened automatically when a serial device is connected would be better. Or maybe a special condition for serial flows, that doesn't run them unless a serial device is connected? I dunno, you're the android guy here
Maybe a separate app that opened automatically when a serial device is connected would be better. Or maybe a special condition for serial flows, that doesn't run them unless a serial device is connected? I dunno, you're the android guy here

-
- Posts: 3
- Joined: 11 Jan 2015 23:51
Re: serial communications
This idea should be a prio as the OP stated right!Martin wrote:This sounds very interesting, thanks for the links. I'm tempted to make some tests and see if this works with my old serial servo controller.
I don't promise anything yet and it will probably take some months until I can take a look since my todo-list is very long already.

Any chance?
-
- Posts: 3
- Joined: 11 Jan 2015 23:51
Yoctopuce USB devices
It would be really great if a flow could use an input from a Yoctopuce USB device:
http://www.yoctopuce.com/EN/libraries.php
http://www.yoctopuce.com/EN/libraries.php
Re: serial communications
Excellent idea. If the plugin gets traction its features could be integrated into AM later. And as stated, the plugin would work with AM 'competitors' so would have an even wider audienceMartin wrote:This sounds very interesting, thanks for the links. I'm tempted to make some tests and see if this works with my old serial servo controller.
I don't promise anything yet and it will probably take some months until I can take a look since my todo-list is very long already.
If you are familiar with Java and Android development, you could implement some functions in an action plugin (plugin protocol: http://www.twofortyfouram.com/developer). Such a plugin would also work with other automation tools.

-
- Posts: 3
- Joined: 11 Jan 2015 23:51
Re: serial communications
VAlarm has the features that such an plugin should have. http://www.valarm.net/Wibbly wrote:Excellent idea. If the plugin gets traction its features could be integrated into AM later. And as stated, the plugin would work with AM 'competitors' so would have an even wider audienceMartin wrote:you could implement some functions in an action plugin (plugin protocol: http://www.twofortyfouram.com/developer). Such a plugin would also work with other automation tools.