Author Topic: Support for 1-Wire Sensors  (Read 2345 times)

grind

  • Veteran
  • ***
  • Posts: 54
    • View Profile
Support for 1-Wire Sensors
« 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?

bongowongo

  • wants to work for LinuxMCE
  • **
  • Posts: 826
    • View Profile
Re: Support for 1-Wire Sensors
« Reply #1 on: March 15, 2010, 12:13:05 am »
No, but can you elaborate? What is a 1 wire sensor?

grind

  • Veteran
  • ***
  • Posts: 54
    • View Profile
Re: Support for 1-Wire Sensors
« Reply #2 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/

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: Support for 1-Wire Sensors
« Reply #3 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.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

grind

  • Veteran
  • ***
  • Posts: 54
    • View Profile
Re: Support for 1-Wire Sensors
« Reply #4 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 ;)

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: Support for 1-Wire Sensors
« Reply #5 on: March 17, 2010, 09:01:28 am »
It was 1-wire weather station. It worked with OWW but wasn't integrated with LinuxMCE.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

grind

  • Veteran
  • ***
  • Posts: 54
    • View Profile
Re: Support for 1-Wire Sensors
« Reply #6 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?

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: Support for 1-Wire Sensors
« Reply #7 on: March 19, 2010, 12:06:30 pm »
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:
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 of using OWW together with PHP and Mysql.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

grind

  • Veteran
  • ***
  • Posts: 54
    • View Profile
Re: Support for 1-Wire Sensors
« Reply #8 on: March 19, 2010, 12:27:15 pm »
Great!
Looks like this is the easiest way for me...

Thank you very much nite_man!!!

Kooma

  • Veteran
  • ***
  • Posts: 102
    • View Profile
Re: Support for 1-Wire Sensors
« Reply #9 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
« Last Edit: March 19, 2010, 07:31:25 pm by Kooma »

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5498
  • DOES work for LinuxMCE.
    • View Profile
Re: Support for 1-Wire Sensors
« Reply #10 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

grind

  • Veteran
  • ***
  • Posts: 54
    • View Profile
Re: Support for 1-Wire Sensors
« Reply #11 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.