Community mailing list archives

community@mail.odoo.com

Re: Arduino connectivity with OpenERP 7

by
Chris Jones
- 08/28/2014 18:29:05
First question is what device(s) to support. My first test was on the Arduino Yun but the Pcduino looks very promising. I ordered a few and will have them this weekend. The Pcduino Wifi Lite is $39 right now, almost half the price of the Yun and is Arduino shield compatible and has MUCH faster hardware. It also has HDMI out and runs full blown Ubuntu 12.04 instead of OpenWRT. http://www.cutedigi.com/development-tools/pcduino/pcduino-lite-wif.html

A traditional Arduino like the Mega or Uno with a Wifi shield is not a good idea for a few reasons. It would require OpenERP to poll the device because I don't know of an xml-rpc client for Arduino. That also means that the router would have to setup port forwarding for the Arduino. I think it's better that the data is pushed to OpenERP. 

With the Yun I'm using the bridge library and displaying the data on a page that is accessed with REST style API like this. http://192.168.0.115/arduino/temperature/0
It displays standard json output 
{
	"status": "OK",
	"humidity": 48.7, 
	"temperature": 81.1
}
I'm not using a json library. I'm manually formatting it. That's something we'll want to improve on. 
A python script running in OpenWRT connects to that url and does an xml-rpc connection to OpenERP and pushes the data into a basic table I have with a date/time stamp and the humidity and temperature. The REST API is an unnecessary step but one that was required with the Yun. With the Pcduino I'm hoping I can more directly access the analog signal and push to OpenERP. 





On Thu, Aug 28, 2014 at 1:59 PM, Taimoor Yousaf <tyousaf@gmail.com> wrote:
Hi

I have some experience with Arduino and external displays. I think another aspect that could be explored is using data from OpenERP to feed external LCD/LED displays.

Regards
Taimoor Yousaf


On Thu, Aug 28, 2014 at 8:29 PM, Chris Jones <chris.jones@saasier.com> wrote:
I'm working with a couple of nutritional supplement manufacturers that want to be able to monitor environmental conditions like temperature, humidity and dust levels. Separately they also want to have a fingerprint scanner that employees will use to clock in and out for attendance. 

I've taken an Arduino Yun, connected a temperature/humidity sensor to it and have that data feeding real-time into a table in OpenERP via XML-RPC. The next part is to setup the fingerprint scanner to connect to the attendance feature in the HR module.

I'm curious if there's interest for a larger community project to generically connect an Arduino to Odoo/OpenERP. Maybe a configuration screen where we can make the associations between pins on the Arduino and fields in ERP. 

There's an endless amount of scanners, sensors, motors, cameras, etc. Modules could alert in ERP when data from sensors moves outside of specified thresholds. 

--
Chris Jones
SaaSier.com
Open Source ERP Solutions

_______________________________________________


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
Chris Jones
SaaSier.com
Open Source ERP Solutions
310-400-0256