Author Topic: 1wire support  (Read 26346 times)

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: 1wire support
« Reply #60 on: February 27, 2011, 07:06:21 pm »
please compile the latest svn revision and try again
rock your home - http://www.agocontrol.com home automation

_if_

  • Guru
  • ****
  • Posts: 241
    • View Profile
Re: 1wire support
« Reply #61 on: February 27, 2011, 07:40:28 pm »
no luck, I now have tons of:

[  144.111538] OneWire[20112]: segfault at 0 ip b721d323 sp b7097e4c error 4 in libc-2.8.90.so[b71a6000+158000]
[  155.417211] OneWire[21861]: segfault at 0 ip b72bd323 sp b7137e4c error 4 in libc-2.8.90.so[b7246000+158000]
[  166.583748] OneWire[22192]: segfault at 0 ip b719d323 sp b7017e4c error 4 in libc-2.8.90.so[b7126000+158000]
[  177.736162] OneWire[22794]: segfault at 0 ip b71de323 sp b7058e4c error 4 in libc-2.8.90.so[b7167000+158000]
[  188.896788] OneWire[22964]: segfault at 0 ip b724c323 sp b70c6e4c error 4 in libc-2.8.90.so[b71d5000+158000]
[  200.015275] OneWire[23148]: segfault at 0 ip b7208323 sp b7082e4c error 4 in libc-2.8.90.so[b7191000+158000]
[  211.115800] OneWire[23354]: segfault at 0 ip b72bb323 sp b7135e4c error 4 in libc-2.8.90.so[b7244000+158000]
[  222.264434] OneWire[23530]: segfault at 0 ip b72d6323 sp b7150e4c error 4 in libc-2.8.90.so[b725f000+158000]
[  233.422038] OneWire[24353]: segfault at 0 ip b72d3323 sp b714de4c error 4 in libc-2.8.90.so[b725c000+158000]
[  244.654483] OneWire[25316]: segfault at 0 ip b72e6323 sp b7160e4c error 4 in libc-2.8.90.so[b726f000+158000]
[  255.767390] OneWire[25557]: segfault at 0 ip b71c2323 sp b703ce4c error 4 in libc-2.8.90.so[b714b000+158000]
[  266.864594] OneWire[25742]: segfault at 0 ip b71cc323 sp b7046e4c error 4 in libc-2.8.90.so[b7155000+158000]
[  277.979072] OneWire[25929]: segfault at 0 ip b7253323 sp b70cde4c error 4 in libc-2.8.90.so[b71dc000+158000]
[  289.080605] OneWire[26137]: segfault at 0 ip b72fb323 sp b7175e4c error 4 in libc-2.8.90.so[b7284000+158000]
[  300.169165] OneWire[26297]: segfault at 0 ip b7300323 sp b717ae4c error 4 in libc-2.8.90.so[b7289000+158000]
[  311.268674] OneWire[26475]: segfault at 0 ip b7216323 sp b7090e4c error 4 in libc-2.8.90.so[b719f000+158000]
[  322.379194] OneWire[26645]: segfault at 0 ip b72c4323 sp b713ee4c error 4 in libc-2.8.90.so[b724d000+158000]
[  333.496761] OneWire[26850]: segfault at 0 ip b723b323 sp b70b5e4c error 4 in libc-2.8.90.so[b71c4000+158000]
[  344.619316] OneWire[27011]: segfault at 0 ip b7314323 sp b718ee4c error 4 in libc-2.8.90.so[b729d000+158000]
[  355.801843] OneWire[28178]: segfault at 0 ip b72c7323 sp b7141e4c error 4 in libc-2.8.90.so[b7250000+158000]
[  366.915373] OneWire[28629]: segfault at 0 ip b721e323 sp b7098e4c error 4 in libc-2.8.90.so[b71a7000+158000]
[  378.030907] OneWire[28791]: segfault at 0 ip b7357323 sp b71d1e4c error 4 in libc-2.8.90.so[b72e0000+158000]
[  389.170462] OneWire[29011]: segfault at 0 ip b7233323 sp b70ade4c error 4 in libc-2.8.90.so[b71bc000+158000]
[  400.534971] OneWire[29290]: segfault at 0 ip b7179323 sp b6ff3e4c error 4 in libc-2.8.90.so[b7102000+158000]
[  411.729500] OneWire[29647]: segfault at 0 ip b71ef323 sp b7069e4c error 4 in libc-2.8.90.so[b7178000+158000]
[  422.921379] OneWire[30104]: segfault at 0 ip b72a1323 sp b711be4c error 4 in libc-2.8.90.so[b722a000+158000]
[  434.044746] OneWire[30352]: segfault at 0 ip b72ce323 sp b7148e4c error 4 in libc-2.8.90.so[b7257000+158000]
[  445.240279] OneWire[30611]: segfault at 0 ip b7260323 sp b70dae4c error 4 in libc-2.8.90.so[b71e9000+158000]
[  456.391669] OneWire[31094]: segfault at 0 ip b7256323 sp b70d0e4c error 4 in libc-2.8.90.so[b71df000+158000]
[  467.521314] OneWire[32242]: segfault at 0 ip b735b323 sp b71d5e4c error 4 in libc-2.8.90.so[b72e4000+158000]
[  478.689709] OneWire[326]: segfault at 0 ip b72e9323 sp b7163e4c error 4 in libc-2.8.90.so[b7272000+158000]
[  489.796268] OneWire[489]: segfault at 0 ip b720f323 sp b7089e4c error 4 in libc-2.8.90.so[b7198000+158000]
[  500.891839] OneWire[650]: segfault at 0 ip b7175323 sp b6fefe4c error 4 in libc-2.8.90.so[b70fe000+158000]
[  512.008326] OneWire[838]: segfault at 0 ip b7236323 sp b70b0e4c error 4 in libc-2.8.90.so[b71bf000+158000]
[  523.099885] OneWire[1039]: segfault at 0 ip b7210323 sp b708ae4c error 4 in libc-2.8.90.so[b7199000+158000]
[  534.232441] OneWire[1223]: segfault at 0 ip b72c3323 sp b713de4c error 4 in libc-2.8.90.so[b724c000+158000]
[  545.323930] OneWire[1411]: segfault at 0 ip b7239323 sp b70b3e4c error 4 in libc-2.8.90.so[b71c2000+158000]
[  556.431497] OneWire[1572]: segfault at 0 ip b727e323 sp b70f8e4c error 4 in libc-2.8.90.so[b7207000+158000]
[  567.522035] OneWire[1739]: segfault at 0 ip b7201323 sp b707be4c error 4 in libc-2.8.90.so[b718a000+158000]
[  578.621578] OneWire[1927]: segfault at 0 ip b71d5323 sp b704fe4c error 4 in libc-2.8.90.so[b715e000+158000]
[  589.747242] OneWire[2133]: segfault at 0 ip b720d323 sp b7087e4c error 4 in libc-2.8.90.so[b7196000+158000]
[  600.907646] OneWire[3418]: segfault at 0 ip b71e5323 sp b705fe4c error 4 in libc-2.8.90.so[b716e000+158000]
[  612.028185] OneWire[4292]: segfault at 0 ip b732f323 sp b71a9e4c error 4 in libc-2.8.90.so[b72b8000+158000]
[  623.116735] OneWire[4471]: segfault at 0 ip b735f323 sp b71d9e4c error 4 in libc-2.8.90.so[b72e8000+158000]
[  634.196299] OneWire[4661]: segfault at 0 ip b72ad323 sp b7127e4c error 4 in libc-2.8.90.so[b7236000+158000]
[  645.281903] OneWire[4867]: segfault at 0 ip b7315323 sp b718fe4c error 4 in libc-2.8.90.so[b729e000+158000]
[  656.401358] OneWire[5029]: segfault at 0 ip b71cd323 sp b7047e4c error 4 in libc-2.8.90.so[b7156000+158000]
[  667.496873] OneWire[5191]: segfault at 0 ip b7181323 sp b6ffbe4c error 4 in libc-2.8.90.so[b710a000+158000]
[  678.611474] OneWire[5360]: segfault at 0 ip b72b7323 sp b7131e4c error 4 in libc-2.8.90.so[b7240000+158000]
[  689.728992] OneWire[5577]: segfault at 0 ip b7283323 sp b70fde4c error 4 in libc-2.8.90.so[b720c000+158000]
[ 1007.137883] OneWire[13772]: segfault at 0 ip b71af323 sp b7025e4c error 4 in libc-2.8.90.so[b7138000+158000]


when running OneWire I get:

user@dcerouter:/usr/src/LinuxMCE-0810/src/OneWire$ sudo ./OneWire
[sudo] password for user:
OneWire, v.<=version=>
Visit www.plutohome.com for source code and license information

DEFAULT: owlib.c:LibStart(54) No valid 1-wire buses found
Segmentation fault (core dumped)

Kezza

  • Veteran
  • ***
  • Posts: 146
    • View Profile
Re: 1wire support
« Reply #62 on: February 28, 2011, 06:46:19 am »
no luck, I now have tons of:

[  144.111538] OneWire[20112]: segfault at 0 ip b721d323 sp b7097e4c error 4 in libc-2.8.90.so[b71a6000+158000][ 1007.137883] OneWire[13772]: segfault at 0 ip b71af323 sp b7025e4c error 4 in libc-2.8.90.so[b7138000+158000]


when running OneWire I get:

user@dcerouter:/usr/src/LinuxMCE-0810/src/OneWire$ sudo ./OneWire
[sudo] password for user:
OneWire, v.<=version=>
Visit www.plutohome.com for source code and license information

DEFAULT: owlib.c:LibStart(54) No valid 1-wire buses found
Segmentation fault (core dumped)


I'm getting the same sort of errors

DragonK

  • Guru
  • ****
  • Posts: 429
    • View Profile
Re: 1wire support
« Reply #63 on: February 28, 2011, 07:50:11 am »
Guys,

As far as I can see from the thread this would be the steps for the 1-wire support. I unfortuanately dont have an interface unit.

1.Do a sqlCVS update from the webadmin. Select only tables within DCE.
Did you select all repos, or did you select all tables within dce? Make sure to not do the former, but only the latter


2.Install mysql devel headers
you need to install mysql devel headers (iirc "apt-get install libmysqlclient-dev" or something like that)

br Hari


3.Install OWFS. These are the steps I used, Maybe TEchstyle can post his steps. Or Hari could you point us to the correct steps of installing OWFS.
http://www.mail-archive.com/owfs-developers@lists.sourceforge.net/msg04821.html

4.Compile OneWire Binary
yes, and after installing owfs, you need to do something like the following to compile the binary:
Code: [Select]
sudo -i
cd /usr/src/
svn co http://svn.linuxmce.org/svn/branches/LinuxMCE-0810/src LinuxMCE-0810/src
cp /usr/pluto/lib/* LinuxMCE-0810/src/lib
cd LinuxMCE-0810/src/OneWire
make bin
cp OneWire /usr/pluto/bin

br Hari


5.
Techstyle, you also need to do a "echo /opt/owfs/lib > /etc/ld.so.conf.d/owfs.conf", followed by a "ldconfig -X"

6. Add the sensor in webadmin. We still need to confirm, where to retrieve the sensor's ID from.
Hi Folks,

I did write a DCE device for the owfs 1wire driver. Device Template #2161. The code is here: http://svn.linuxmce.org/trac.cgi/browser/branches/LinuxMCE-0810/src/OneWire/

Just create "Multilevel Sensor" Childs and put the 1wire ID into the port/channel field. The DCE device will store the last measurement and only send events when things have changed. Only temperature sensors supported atm:

35   01/19/11 11:11:30.628      Temperature for 28.B3795602000: 25.62 <0xb78c9b70>
35   01/19/11 11:11:30.628      Old temperature for 28.B3795602000: 25.56 <0xb78c9b70>
07   01/19/11 11:11:30.629      Received Message from 233 (1wire temp / ) to -1001 (unknown / ), type 2 id 25 Event:Temperature Changed, retry none, parameters: <0xb2cfdb70>
07   01/19/11 11:11:30.629        Parameter 30(Value): 25.62 <0xb2cfdb70>

br Hari

Anyone feel free to add to this or change anything accordingly. Once we get the installation procedure correct, I'll update the Wiki.

Karel

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: 1wire support
« Reply #64 on: February 28, 2011, 03:37:45 pm »
no luck, I now have tons of:
...

can I get ssh access to your system?

br Hari
rock your home - http://www.agocontrol.com home automation

_if_

  • Guru
  • ****
  • Posts: 241
    • View Profile
Re: 1wire support
« Reply #65 on: February 28, 2011, 04:17:24 pm »
jep, will set it up as soon as I get home...

_if_

  • Guru
  • ****
  • Posts: 241
    • View Profile
Re: 1wire support
« Reply #66 on: February 28, 2011, 08:01:34 pm »
should remote ssh be working at the moment? If I try to enable it, the webadminpage starts loading but never stops...

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: 1wire support
« Reply #67 on: February 28, 2011, 08:25:53 pm »
does not work atm
rock your home - http://www.agocontrol.com home automation

_if_

  • Guru
  • ****
  • Posts: 241
    • View Profile
Re: 1wire support
« Reply #68 on: March 02, 2011, 10:47:33 pm »
does not work atm

do you have any advice what I can try until remote ssh is working again?

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: 1wire support
« Reply #69 on: March 02, 2011, 11:36:22 pm »
regular ssh?
rock your home - http://www.agocontrol.com home automation

_if_

  • Guru
  • ****
  • Posts: 241
    • View Profile
Re: 1wire support
« Reply #70 on: March 03, 2011, 05:59:04 pm »
regular ssh is set up, you got mail!

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: 1wire support
« Reply #71 on: March 03, 2011, 09:10:46 pm »
there is some problem with your interface. What exact kind is it?

I've added some more error handling to the code:

Code: [Select]
DEBUG: ow_parseobject.c:OWQ_create(160) /
   CALL: ow_parsename.c:FS_ParsedName_anywhere(91) path=[/]
  DEBUG: ow_dir.c:FS_dir(63) path=/
   CALL: ow_dir.c:FS_dir_both(98) path=/
  DEBUG: ow_cache.c:Cache_Get_Dir(805) Looking for directory 00 00 00 00 00 00 00 00
  DEBUG: ow_cache.c:Cache_Get_Common_Dir(818) Get from cache sn 00 00 00 00 00 00 00 00 pointer=0xb710fdd4 extension=0
  DEBUG: ow_cache.c:Cache_Get_Common_Dir(847) Dir not found in cache
  DEBUG: ow_search.c:BUS_first(32) Start of directory path=/ device=00 00 00 00 00 00 00 00
  DEBUG: ow_select.c:BUS_select(78) Selecting a path (and device) path=/ SN=00 00 00 00 00 00 00 00 last path=00 00 00 00 00 00 00 00
  DEBUG: ow_select.c:BUS_select(86) Continuing root branch
  DEBUG: ow_tcp_read.c:tcp_read(64) attempt 1 bytes Time: 5.000000 seconds
  DEBUG: ow_tcp_read.c:tcp_read(114) read: 1 - 0 = 1
CONNECT: ow_reset.c:BUS_reset(36) 1-wire bus short circuit.
  DEBUG: ow_tcp_read.c:tcp_read(64) attempt 1 bytes Time: 5.000000 seconds
  DEBUG: ow_tcp_read.c:tcp_read(114) read: 1 - 0 = 1
  DEBUG: ow_bus_data.c:BUS_send_data(38) Response doesn't match data sent
  DEBUG: ow_select.c:BUS_select(78) Selecting a path (and device) path=/ SN=00 00 00 00 00 00 00 00 last path=00 00 00 00 00 00 00 00
  DEBUG: ow_select.c:BUS_select(86) Continuing root branch
  DEBUG: ow_tcp_read.c:tcp_read(64) attempt 1 bytes Time: 5.000000 seconds
  DEBUG: ow_tcp_read.c:tcp_read(114) read: 1 - 0 = 1
CONNECT: ow_reset.c:BUS_reset(36) 1-wire bus short circuit.
  DEBUG: ow_tcp_read.c:tcp_read(64) attempt 1 bytes Time: 5.000000 seconds
  DEBUG: ow_tcp_read.c:tcp_read(114) read: 1 - 0 = 1
  DEBUG: ow_bus_data.c:BUS_send_data(38) Response doesn't match data sent
  DEBUG: ow_select.c:BUS_select(78) Selecting a path (and device) path=/ SN=00 00 00 00 00 00 00 00 last path=00 00 00 00 00 00 00 00
  DEBUG: ow_select.c:BUS_select(86) Continuing root branch
  DEBUG: ow_tcp_read.c:tcp_read(64) attempt 1 bytes Time: 5.000000 seconds
  DEBUG: ow_tcp_read.c:tcp_read(114) read: 1 - 0 = 1
CONNECT: ow_reset.c:BUS_reset(36) 1-wire bus short circuit.
  DEBUG: ow_tcp_read.c:tcp_read(64) attempt 1 bytes Time: 5.000000 seconds
  DEBUG: ow_tcp_read.c:tcp_read(114) read: 1 - 0 = 1
  DEBUG: ow_bus_data.c:BUS_send_data(38) Response doesn't match data sent
   CALL: ow_parsename.c:FS_ParsedName_anywhere(91) path=[/bus.0]
  DEBUG: ow_parsename.c:FS_ParsedName_destroy(55) /bus.0
   CALL: ow_parsename.c:FS_ParsedName_anywhere(91) path=[/uncached]
  DEBUG: ow_parsename.c:FS_ParsedName_destroy(55) /uncached
   CALL: ow_parsename.c:FS_ParsedName_anywhere(91) path=[/settings]
  DEBUG: ow_parsename.c:FS_ParsedName_destroy(55) /settings
   CALL: ow_parsename.c:FS_ParsedName_anywhere(91) path=[/system]
  DEBUG: ow_parsename.c:FS_ParsedName_destroy(55) /system
   CALL: ow_parsename.c:FS_ParsedName_anywhere(91) path=[/statistics]
  DEBUG: ow_parsename.c:FS_ParsedName_destroy(55) /statistics
   CALL: ow_parsename.c:FS_ParsedName_anywhere(91) path=[/structure]
  DEBUG: ow_parsename.c:FS_ParsedName_destroy(55) /structure
  DEBUG: ow_dir.c:FS_dir_both(193) ret=-5
  DEBUG: ow_parsename.c:FS_ParsedName_destroy(55) /
01 03/03/11 21:08:33.364 OW_get error: 22 <0xb7061b90>
please note the BUS_send_data error, after that the OW_get call returns errno 22...

br Hari
rock your home - http://www.agocontrol.com home automation

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: 1wire support
« Reply #72 on: March 03, 2011, 09:26:28 pm »
I've tried owfs and get the same problem. You need to make sure that your interface runs nice with owfs before trying the OneWire LinuxMCE driver.

br Hari
rock your home - http://www.agocontrol.com home automation

_if_

  • Guru
  • ****
  • Posts: 241
    • View Profile
Re: 1wire support
« Reply #73 on: March 03, 2011, 09:26:59 pm »
it's the totally same interface as I send to you...

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: 1wire support
« Reply #74 on: March 03, 2011, 09:42:35 pm »
weird...

did you connect a temp sensor?
rock your home - http://www.agocontrol.com home automation