News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

Support for 1-Wire Sensors

Started by grind, March 14, 2010, 11:30:54 PM

Previous topic - Next topic

grind

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?

bongowongo

No, but can you elaborate? What is a 1 wire sensor?

grind

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/

nite_man

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.
Michael Stepanov,
My setup: [url="http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup"]http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup[/url]
Russian LinuxMCE community: [url="http://linuxmce.ru"]http://linuxmce.ru[/url]

grind

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 ;)

nite_man

It was 1-wire weather station. It worked with OWW but wasn't integrated with LinuxMCE.
Michael Stepanov,
My setup: [url="http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup"]http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup[/url]
Russian LinuxMCE community: [url="http://linuxmce.ru"]http://linuxmce.ru[/url]

grind

I see.

Would it be possible to get the 1-Wire data using owfs for example and push them into the LinuxMCE database?

nite_man

Yes, OWW daemon provides callback functionality. There is an option in the setup config file called  postupdate. You can specify there a shell command to insert measurement data into mysql table:
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 of using OWW together with PHP and Mysql.
Michael Stepanov,
My setup: [url="http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup"]http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup[/url]
Russian LinuxMCE community: [url="http://linuxmce.ru"]http://linuxmce.ru[/url]

grind

Great!
Looks like this is the easiest way for me...

Thank you very much nite_man!!!

Kooma

#9
Quote from: 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!!!


Hey grind. Please keep us updated how it's going!
I have bunch of 1-wire sensors, yet no integration with the lmce.
/kooma

tschak909

Guys, it wouldn't take much to make a proper C++ driver for this. Grind are you doing this approach?

-Thom

grind

My programming skills are very limited ;)

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