The Lego MachineCloud project has received a massive boost in the form of two great technologies from Lego and Salesforce! I’m so pleased to confirm that my test to get the Salesforce Streaming API working on the EV3 has been a raving success! This technology allows the robot to be highly responsive to commands from Salesforce, including the hugely exciting brand new Salesforce1 mobile app.
Having uploaded the required Java libraries to the brick and adapted some Java code from a previous project. I then extended the Force.com objects I created for the previous robot to create a more “declarative” programming approach. That can be driven by Command records created by the user in the latest Salesforce user web and mobile interfaces!
Streaming Commands from the Force.com Machine Cloud
Here you can see a screenshot of the Robot record showing a list of commands that it has executed, note the New Command button! Simply click this button and select the type of command you want, hit Save and often before the screen can even refresh the EV3 will get the streaming API event notification and perform the command! I literally lept up from my chair the first time it did this. I’ve uploaded the source code to the project to GitHub, feel free to take a look and see how its all done!
Declarative Robot Programming via your Mobile!
I have extended the Robot and Command objects with another object called Program. This is a container for multiple Command records, allowing you to design a program in the Salesforce UI and then create a single Command record to execute that Program!
Having updated my version of the Salesforce mobile app, now known as Salesforce1, i quickly found that my Command object is now also available in this application. Within a few taps my EV3 was now also responding to commands sent via my phone! Now that is a true “No Software” reality! Amazing stuff Salesforce!
I’ll be bringing the robot you see in the video to Dreamforce with me next week, where I cannot wait to see what people think of this approach to programming the EV3 in the “Internet of Things Lab” session. Its a basic framework at this stage but the potential is huge for having Robot’s socialise (from all over the world!) on the Salesforce “Machine Cloud” platform. See you at Dreamforce next week!
Brief Demo Video
Pingback: Dreamforce1? | FinancialForce.com Blog
Pingback: Arcsona » Blog Archive » 2013 Salesforce.com Year In Review
Pingback: Video Interview with CTO Andy Fawcett | FinancialForce.com Blog
November 16, 2014 at 4:38 pm
Hi Andrew, seeing your successful activities with EV3 and SFDC I am wondering if you have an idea regarding this: I have set up my EV3 with leJOS. Then created a sample project in eclipse which worked just fine. Next step, I created a simple connection to SFDC using the wsc. Running locally as java also works just fine. But then uploading to the brick, I get an “unknown class” exception. … Do you have any ideas? Can you give me a hint on how you build your workspace? I suppose the lib’s might not get across. I see that you are using Ant. I am using the built in “run As” configuration.
November 16, 2014 at 7:31 pm
Yep the EV3 IDE plugin does not currently include the project external jars in the jar it deploys, i asked this on the forum and got that confirmed, http://www.lejos.org/forum/viewtopic.php?f=18&t=7302. My approach has been to continue using an Ant script and invoking that from Eclipse (which is pretty much just as easy). Hopefully this week i will upload all the code from my Dreamforce 2014 session with build scripts etc. In the meantime I’ve shared as Gist my build.xml for you to take a look at. https://gist.github.com/afawcett/021f94e28cddf632aae5. I’d like to get a community of EV3 builders and Salesforce going if your interested?
Pingback: Dreamforce1? - FinancialForce