LinuxMCE Forums

General => Feature requests & roadmap => Topic started by: grind on March 14, 2010, 11:30:54 pm

Title: Support for 1-Wire Sensors
Post by: grind on March 14, 2010, 11:30:54 pm
I was not able to find anything about LinuxMCE and 1-Wire but in my opinion those are the best, simpliest and cheapest sensores you can have!
Is there something on the roadmap?
Title: Re: Support for 1-Wire Sensors
Post by: bongowongo on March 15, 2010, 12:13:05 am
No, but can you elaborate? What is a 1 wire sensor?
Title: Re: Support for 1-Wire Sensors
Post by: grind on March 15, 2010, 06:07:51 pm
1-Wire is a bus which works with only three cables and using very cheap cables.
A temperature sensor for example is costs about 1,90 Euro.

For more information have a look at http://www.maxim-ic.com/products/1-wire/
Title: Re: Support for 1-Wire Sensors
Post by: nite_man on March 16, 2010, 06:57:34 pm
Hi,

There is a basic GSD interface for 1-wire devices called Link45i. Not sure that it works but at least it can give a good start point to implement a full featured 1-wire interface.
Title: Re: Support for 1-Wire Sensors
Post by: grind on March 16, 2010, 09:33:19 pm
Nite_man i just had a look at your setup and there you have several 1-Wire sensors in your old setup.
What did you do to get those working? My 1-Wire order did not arrive so far but i want to be prepaired ;)
Title: Re: Support for 1-Wire Sensors
Post by: nite_man on March 17, 2010, 09:01:28 am
It was 1-wire weather station. It worked with OWW (http://oww.sourceforge.net/) but wasn't integrated with LinuxMCE.
Title: Re: Support for 1-Wire Sensors
Post by: grind on March 18, 2010, 12:36:02 am
I see.

Would it be possible to get the 1-Wire data using owfs for example and push them into the LinuxMCE database?
Title: Re: Support for 1-Wire Sensors
Post by: nite_man on March 19, 2010, 12:06:30 pm
Yes, OWW daemon provides callback functionality. There is an option in the setup (http://oww.sourceforge.net/oww_setup.html#setup) config file called  postupdate. You can specify there a shell command to insert measurement data into mysql table:
Code: [Select]
postupdate mysql -u[user] -p[password] vader -e "INSERT INTO station (datum,tid,temp1,wspeed,wdeg,wdrpoint,wchill,press,hum,temp2,temp3,heatindex,tdew1)  VALUES (NOW(),NOW(),$t1$,$wspkph$,$wdrdeg$,$wdrpoint$,$wchillc$,$barmbar1$,$rh1$,$trhc1$,$tb1$,$heatindexc$,$dpc1$)" See more info in the OWW docs. Also have a look that example (http://deanostoybox.com/code/OwwPHPmySQL.html) of using OWW together with PHP and Mysql.
Title: Re: Support for 1-Wire Sensors
Post by: grind on March 19, 2010, 12:27:15 pm
Great!
Looks like this is the easiest way for me...

Thank you very much nite_man!!!
Title: Re: Support for 1-Wire Sensors
Post by: Kooma on March 19, 2010, 06:59:09 pm
Great!
Looks like this is the easiest way for me...

Thank you very much nite_man!!!


Hey grind. Please keep us updated how it's going!
I have bunch of 1-wire sensors, yet no integration with the lmce.
/kooma
Title: Re: Support for 1-Wire Sensors
Post by: tschak909 on March 19, 2010, 07:21:52 pm
Guys, it wouldn't take much to make a proper C++ driver for this. Grind are you doing this approach?

-Thom
Title: Re: Support for 1-Wire Sensors
Post by: grind on March 19, 2010, 09:41:56 pm
My programming skills are very limited ;)

I will try the approach to inser the data directly into the DB.