Hello Romain,
Thanks for the reply.
phpinfo() is running fine.
I've just managed to get some values on the screen.
I've found some more info at
http://permalink.gmane.org/gmane.comp.file-systems.owfs.devel/5736
First I started the owfs daemons:
willy@willy-VirtualBox ~ $ sudo service owfs start
Starting script owfs
umount: /mnt/1wire: not mounted
DEFAULT: ow_usb_msg.c:(295) Opened USB DS9490 bus master at 2:3.
DEFAULT: ow_usb_cycle.c:(191) Set DS9490 2:3 unique id to 81 2A B1 30 00 00
00 19
willy@willy-VirtualBox ~ $ sudo service owserver start
* Starting 1-Wire TCP Server owserver
[ OK ]
willy@willy-VirtualBox ~ $ sudo service owhttpd start
* Starting 1-Wire HTTP Daemon owhttpd
Then on the browser I entered the following URL:
localhost/ ownettemperature.php
The content of the ownettemperature.php is:
<?php
echo date('d/n/Y H:m:s').'<br />';
// Check to make sure the file bcadd.php exists
if(!function_exists('bcadd')) {
if(file_exists("/opt/owfs/share/php/OWNet/bcadd.php")) {
require "/opt/owfs/share/php/OWNet/bcadd.php";
} else if(file_exists("bcadd.php")) {
require "bcadd.php";
} else {
die("File 'bcadd.php' is not found.\n");
}
}
// Check to make sure the file ownet.php exists
if(file_exists("/opt/owfs/share/php/OWNet/ownet.php")) {
require "/opt/owfs/share/php/OWNet/ownet.php";
} else if(file_exists("ownet.php")) {
require "ownet.php";
} else {
die("File 'ownet.php' is not found.\n");
}
$ow = new OWNet("tcp://127.0.0.1:4304");
echo 'Temperature is now:
<b>'.$ow->get("/10.2489B7000800/temperature",OWNET_MSG_READ,false); echo '
C</b><br />';
unset($ow);
The reply on the screen was:
23/10/2012 22:10:07
Temperature is now: *23.75 C*
Now I can do further test to read counters DS2423 and digital in- and
outputs DS2408.
Regards,
Willy Verbiest
Ghent
2012/10/23 Romain Bourdy <achil...@gmail.com>
> Can post to ml from mobile, please see below
> ---------- Forwarded message ----------
> From: <owfs-developers-ow...@lists.sourceforge.net>
> Date: Oct 23, 2012 10:01 PM
> Subject: Re: [Owfs-developers] owphp howto setup
> To: <achil...@gmail.com>
>
> You are not allowed to post to this mailing list, and your message has
> been automatically rejected. If you think that your messages are
> being rejected in error, contact the mailing list owner at
> owfs-developers-ow...@lists.sourceforge.net.
>
>
>
> ---------- Forwarded message ----------
> From: Romain Bourdy <achil...@gmail.com>
> To: "OWFS (One-wire file system) discussion and help" <
> owfs-developers@lists.sourceforge.net>
> Cc:
> Date: Tue, 23 Oct 2012 22:01:50 +0200
> Subject: Re: [Owfs-developers] owphp howto setup
>
> Hi,
>
> Can you confirm that phpinfo is working ?
>
> <?php phpinfo(); ?>
> On Oct 23, 2012 8:30 PM, "Willy Verbiest" <willy.verbi...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I'm working on a Linux machine whit Mint 13 on it.
>>
>>
>> I'm trying to run an example in php to list the 1-wire sensors in my
>> network.
>> I've compiled and build the owfs suite Version 2.8p20
>> Now
>> owfs is running
>> owserver is running
>> owhttpd is running
>> on http://localhost:2121/ I can see my sensors and there actual values.
>>
>> I've followed the documentation at:
>> http://owfs.sourceforge.net/owphp.html
>>
>> in php.ini enable_dl = On // dl(...) does not seems to work
>> in php.ini I have loaded the extension "libowphp.so" directly.
>>
>> I've tried the example from owfs Development:
>> http://owfs.org/index.php?page=ownet-php
>>
>> <?php
>> require_once('/opt/owfs/share/php/OWNet/ownet.php');
>> $ow=new OWNet("tcp://127.0.0.1:4304");
>> print_r($ow->dir("/"));
>> print_r($ow->read("/10.E8C1C9000800/temperature"));
>> unset($ow)
>>
>> Without success, I get no reply on the screen!
>>
>> How to go further
>>
>> Thanks in advance,
>>
>> Willy Verbiest
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_sfd2d_oct
>> _______________________________________________
>> Owfs-developers mailing list
>> Owfs-developers@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>>
>>
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers