Re: [Owfs-developers] Raspberry pi 2, owserver

2015-12-27 Thread Jan Kandziora
Am 27.12.2015 um 08:22 schrieb Haas Martin:
> Hi i am not able run owserver White startup parametr --w1,  my raspberry pi
> 2 is confgigured to use gpio 4 for onewire, ow server can't read from
> kernel driver.
> 
With distribution do you use? Raspbian?

There are various reasons why this may fail. Debugging requires you to
update to the latest version of the owfs package for Raspberry Pi, which
is 3.1p0, as Vincent had this disabled in his packages previously.

After updating, run owserver with the --debug switch and send the log.


In addition, as we recently found there has been a kernel update in
various Raspberry distributions which breaks the w1 support inside owfs.
So if you use a recent kernel, you have to compile the owfs package for
Raspberry yourself. Please use the latest version from git archive.

$ git clone git://git.code.sf.net/p/owfs/code owfs-code

Kind regards

Jan





--
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Raspberry pi 2, owserver

2015-12-27 Thread Martin Patzak (GMX)

debian / raspian / bananian 'upgrading' to owfs 3.1p0 on jessie:

since owfs 3.1p0 is not available on jessie, one can manually install 
the new packages by respecting the dependancies:


(take the following instructions at your own risk! And kids: don't do 
this at home or on a production system)


download the packages you want to upgrade for your architecture from the 
archives :


additionally the packages libow 
 and owfs-common 
 are needed mandatory



cd into the folder the packages are residing


install first owfs-common:

$ sudo dpkg --install owfs-common_3.1p0-1_all.deb


followed by lib-ow:

$ sudo dpkg --install libow-3.1-0_3.1p0-1_.deb


then you can install the packages you want to upgrade in the same fashion.

This was testet on bananian jessie only...

Cheers,

Martin


On 12/27/2015 10:22 AM, Jan Kandziora wrote:

Am 27.12.2015 um 08:22 schrieb Haas Martin:

Hi i am not able run owserver White startup parametr --w1,  my raspberry pi
2 is confgigured to use gpio 4 for onewire, ow server can't read from
kernel driver.


With distribution do you use? Raspbian?

There are various reasons why this may fail. Debugging requires you to
update to the latest version of the owfs package for Raspberry Pi, which
is 3.1p0, as Vincent had this disabled in his packages previously.

After updating, run owserver with the --debug switch and send the log.


In addition, as we recently found there has been a kernel update in
various Raspberry distributions which breaks the w1 support inside owfs.
So if you use a recent kernel, you have to compile the owfs package for
Raspberry yourself. Please use the latest version from git archive.

$ git clone git://git.code.sf.net/p/owfs/code owfs-code

Kind regards

Jan





--
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers



--
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Server side Commands

2015-12-27 Thread Jan Kandziora
Am 27.12.2015 um 16:35 schrieb Mike Kalist:
> Hi All  I know this is probably not the right place for this  but
> after hours  of google   thought i wold throw this out there.
> 
> I want to make a local website to send commands to pi all on local
> server
> 
> push button   on click  send a server side command
> /opt/owfs/bin/owserver -a alias.txt -u -p 3000
> 
> 
> I have a scripts bash and perl   and tried to run them on click with
> no success
> 
First, there is no way to achieve such a think without running a web server.
file:/ URLs don't work, as they never start an action outside the browser.


Non-Javascript solution:





You need action1.pl etc. be CGI scripts inside your web server directory.
Or you use mod_perl instead of CGI and code the neccessary actions right
into your web page template.


If you want to have it fancy, you'd like to have some javascript
preprocessing in the browser and then trigger a server-side event
when a button is present. There are plenty of frameworks to do
that or you can do it with plain javascript. But that's all out of
our focus her.

Kind regards

Jan



--
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Server side Commands

2015-12-27 Thread Colin Reese
You will have permissions issues with the user www-data. Attempting to run 
system services from a web application is an attempt to subvert the security 
limitations of this user, which are there for good reason. 

The other issue is that this approach does not have a way of killing services, 
so you will just keep attempting to spawn multiple instances with multiple 
clicks. 

A way to do this in a more sane way (and to avoid the permissions issues) would 
be to store the value of a variable, say 'runowserver' in a database, then have 
a system daemon script handle it. If the variable is 0, you could then have it 
run an owserver stop or pkill. 

I run the start function at boot, which you can see at the top here:

https://github.com/iinnovations/iicontrollibs/blob/master/cupid/boot.py

It doesn't actually pull a db variable, but you can see easily in the script 
how to do that (e.g. see where the web server type is read from the db). 

C

> On Dec 27, 2015, at 7:35 AM, Mike Kalist  wrote:
> 
> Hi All  I know this is probably not the right place for this  but  after 
> hours  of google   thought i wold throw this out there.
> 
> I want to make a local website to send commands to pi all on local server
> 
> push button   on click  send a server side command   /opt/owfs/bin/owserver 
> -a alias.txt -u -p 3000  
> 
> 
> I have a scripts bash and perl   and tried to run them on click with no 
> success 
> 
> Any help would be greatly appreciated.
> 
> 
> Mike
> 
> 
> --
> ___
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers

--
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Raspberry pi 2, owserver

2015-12-27 Thread Haas Martin
Hi Jan,

I am using on py Ubuntu - Mate
There is debug log :
root@hama-pi:/var/lib# owserver --debug --w1 -c /etc/owfs.conf
DEBUG MODE
libow version:
2.9p8
NLMSGHDR: len=48 type=3 (NLMSG_DONE) flags=5 seq=0|1 pid=18565
CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=1 len=12 flags=0
W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=0 id=0
W1_NETLINK_CMD: NULL w1c field
NULL data

and there is config:
root@hama-pi:/var/lib# cat /etc/owfs.conf
! server: server = 127.0.0.1:4304
server: w1 = all
server: server = 192.168.101.8:3131
mountpoint = /mnt/1wire
allow_other
http: port = 2121
ftp: port = 2120
server: port = 127.0.0.1:4304

I will try compile new version of owserver as you wrote.

Thanks Martin


2015-12-27 10:22 GMT+01:00 Jan Kandziora :

> Am 27.12.2015 um 08:22 schrieb Haas Martin:
> > Hi i am not able run owserver White startup parametr --w1,  my raspberry
> pi
> > 2 is confgigured to use gpio 4 for onewire, ow server can't read from
> > kernel driver.
> >
> With distribution do you use? Raspbian?
>
> There are various reasons why this may fail. Debugging requires you to
> update to the latest version of the owfs package for Raspberry Pi, which
> is 3.1p0, as Vincent had this disabled in his packages previously.
>
> After updating, run owserver with the --debug switch and send the log.
>
>
> In addition, as we recently found there has been a kernel update in
> various Raspberry distributions which breaks the w1 support inside owfs.
> So if you use a recent kernel, you have to compile the owfs package for
> Raspberry yourself. Please use the latest version from git archive.
>
> $ git clone git://git.code.sf.net/p/owfs/code owfs-code
>
> Kind regards
>
> Jan
>
>
>
>
>
>
> --
> ___
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>



-- 
DobrĂ½ den,


S pozdravem
   Haas Martin
--
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] Server side Commands

2015-12-27 Thread Mike Kalist
Hi All  I know this is probably not the right place for this  but  after
hours  of google   thought i wold throw this out there.

I want to make a local website to send commands to pi all on local server

push button   on click  send a server side command   /opt/owfs/bin/owserver
-a alias.txt -u -p 3000


I have a scripts bash and perl   and tried to run them on click with no
success

Any help would be greatly appreciated.


Mike
--
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Raspberry pi 2, owserver

2015-12-27 Thread Jan Kandziora
Am 27.12.2015 um 18:22 schrieb Haas Martin:
> Hi Jan,
> 
> I am using on py Ubuntu - Mate
> There is debug log :
> root@hama-pi:/var/lib# owserver --debug --w1 -c /etc/owfs.conf
> DEBUG MODE
> libow version:
> 2.9p8
>
This is pointless, as the debug output is disabled in the available
debian packages before 3.1p0.



> 
> and there is config:
> root@hama-pi:/var/lib# cat /etc/owfs.conf
> ! server: server = 127.0.0.1:4304
> server: w1 = all
> server: server = 192.168.101.8:3131
>
So you want your Raspi owserver both query the local w1 driver and
another owserver at 192.168.101.8:3131? I don't think the latter is what
you want.


> mountpoint = /mnt/1wire
> allow_other
> http: port = 2121
> ftp: port = 2120
>
You don't need any of those when you aren't running owfs, owhttpd,
owftpd. Remove them.


> server: port = 127.0.0.1:4304
> 
This means the local owserver is bound to 127.0.0.1, which means it will
not answer any requests from other hosts. Most likely, that's the core
of your problem. Just remove that line, 4304 is the default port anyway.

Kind regards

Jan

--
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers