Xpl-Perl ZenAH setup (Dutch)

Forum regarding Linux Software and Home Automation Domotica.
User avatar
Snelvuur
Forum Moderator
Forum Moderator
Posts: 3156
Joined: Fri Apr 06, 2007 11:01 pm
Location: Netherlands
Contact:

Xpl-Perl ZenAH setup (Dutch)

Post by Snelvuur »

Met xpl-perl , heb ik mijn rfxcom, dreambox, Xanura ctx35, smsdienst al aanmekaar gekoppelt. Nog niet alle puntjes op de i met zenah, maar daar kan je het wel aan mekaar mee knopen. Dus voorlopig heb ik de meeste dingen dan wel. Ook kan je met xpl-rrd grafieken maken hiervan, de grafieken die ik heb zijn van chart director en dat was maar een klein aanpassing.

// Erik (binkey.nl)
beanz
Starting Member
Starting Member
Posts: 20
Joined: Wed Jun 13, 2007 11:22 am
Location: United Kingdom
Contact:

Xpl-Perl ZenAH setup (Dutch)

Post by beanz »

I don't know if it helps because I'm afraid I don't read dutch but many of the perl modules required by ZenAH/xPL-Perl are available in Dag repository at http://dag.wieers.com/rpm/

I should also mention that some of the requirements are build time requirements rather than runtime requirements so these should be unnecessary once I have release binary packages available.

-Mark - ZenAH and xPL-Perl author
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Xpl-Perl ZenAH setup (Dutch)

Post by RDNZL »

Hi Mark,

Ok thanks for the pointer, I forgot about Dag's repository.

I just installed a new spare machine with CentOS 5 minimal, and will install xpl-perl and ZenAH from scratch and document it.

BTW: do you have a screenshot or two from your ZenAH web interface?
I still didn't see it, because of the install probs described earlier, although after looking at the source code, it looks promising. [:p]

Regards,
Ron.
User avatar
Snelvuur
Forum Moderator
Forum Moderator
Posts: 3156
Joined: Fri Apr 06, 2007 11:01 pm
Location: Netherlands
Contact:

Xpl-Perl ZenAH setup (Dutch)

Post by Snelvuur »

Dont forget a screenshot of the xul interface since that one is looking very sharp :)

// Erik (binkey.nl)
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Xpl-Perl ZenAH setup (Dutch)

Post by RDNZL »

Ok.

I installed Debian 4.0 instead of CentOS 5, and installed a minimal system with all the required packages with apt-get.

Build and installed zenah from svn.
When I try to start zenah I get:

domotica:/usr/local/bin# ./zenah
Use of uninitialized value in open at /usr/lib/perl/5.8/IO/File.pm line 70.
Use of uninitialized value in concatenation (.) or string at /usr/local/share/perl/5.8.8/ZenAH/CDBI.pm line 21.
Failed to open database configuration, : No such file or directory
Try setting the environment variable ZENAH_DBI_CONFIG. at /usr/local/share/perl/5.8.8/ZenAH/CDBI.pm line 21.
Compilation failed in require at /usr/local/share/perl/5.8.8/ZenAH/Engine.pm line 44.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.8.8/ZenAH/Engine.pm line 44.
Compilation failed in require at ./zenah line 35.
BEGIN failed--compilation aborted at ./zenah line 35.

How/where can i configure the missing database config?

EDIT:
Ok got the demo db running.
Will post an howto shortly.
beanz
Starting Member
Starting Member
Posts: 20
Joined: Wed Jun 13, 2007 11:22 am
Location: United Kingdom
Contact:

Xpl-Perl ZenAH setup (Dutch)

Post by beanz »

Take a look at the README file in the top-level (not bin) directory. It should tell you the *two* commands to run - one for the xPL client engine part and one for the Catalyst web interface part.

Regards,
Mark.
User avatar
Snelvuur
Forum Moderator
Forum Moderator
Posts: 3156
Joined: Fri Apr 06, 2007 11:01 pm
Location: Netherlands
Contact:

Xpl-Perl ZenAH setup (Dutch)

Post by Snelvuur »

i've updated http://wiki.binkey.nl/index.php/XPL-perl , which shows more detail on how to install stuff too. Might be an idea to just fix the wiki if you find any issues :-)

// Erik (binkey.nl)
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Xpl-Perl ZenAH setup (Dutch)

Post by RDNZL »

OK.

So I started with a new virtual machine.
Debian Standard install.

Installed xpl-perl with apt-get and connected my RFXCom receiver,
XPL_RFXCOM_TTY=/dev/ttyUSB0
and ran xpl-perl-setup

And I already have these rrd graphs generated, without editing a single file.
debian:/var/www/rrd# find .
./thgr228n.10
./thgr228n.10/temp
./thgr228n.10/temp/temp-1h.png
./thgr228n.10/temp/index.html
./thgr228n.10/temp/temp.html
./thgr228n.10/humidity
./thgr228n.10/humidity/humidity.html
./thgr228n.10/humidity/index.html
./thgr228n.10/humidity/humidity-1h.png
./x10
./x10/g15
./x10/g15/state-1h.png
./x10/g15/index.html
./x10/g15/state.html
./x10/g11
./x10/g11/state-1h.png
./x10/g11/index.html
./x10/g11/state.html
./rfxpower.00
./rfxpower.00/kwh
./rfxpower.00/kwh/energy-1h.png
./rfxpower.00/kwh/energy.html
./rfxpower.00/kwh/index.html

That's amazing!

But wait.. I only have a RFXpower module running, the rest is not mine... LOL [}:)]

I can try to switch X10 G15 and G11 on and off and see where the light toggles... LOL

So I have to code to filter out the X10 devices and Oregon THGR228!?!?

Domotica is everywhere... it seems.

I wonder how many unknown devices you guys have discovered, and what you do with them?

UPDATE: an Oregon Scientific thr128 has joined the party.
So from the five devices my RFXCom picks up four are not mine.
And I haven't even fully assembled it's antenna yet [:o)]

Regards,
Ron.
User avatar
Snelvuur
Forum Moderator
Forum Moderator
Posts: 3156
Joined: Fri Apr 06, 2007 11:01 pm
Location: Netherlands
Contact:

Xpl-Perl ZenAH setup (Dutch)

Post by Snelvuur »

Well to be honoust, i have zero things except my own coming in on the rfxcom. I had a few issues in the beginning but there gone since i reinstalled. An option to ignore a certain device for xpl (the rfxcom part) might be something handy, perhaps a /etc/xpl-perl/rfxcom-ignore list of some kind :)

// Erik (binkey.nl)
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Xpl-Perl ZenAH setup (Dutch)

Post by RDNZL »

I have xpl-perl running on my main server now.

Most things work, but my RFX Energy sensor is doing weird.

xpl-rfxcom reports a Parity error every now and then.

And it increments the device id, so I get alot of rrd stats wich are false.

Parent Directory/ - Directory
develop-hda/ 2007-Sep-18 19:47:02 - Directory
meterkast/ 2007-Sep-18 19:47:02 - Directory
rfxmeter.f01c/ 2007-Sep-18 19:47:02 - Directory
rfxmeter.f01d/ 2007-Sep-18 19:47:02 - Directory
rfxmeter.f01e/ 2007-Sep-18 20:07:02 - Directory
rfxmeter.f01f/ 2007-Sep-18 20:27:02 - Directory
rfxmeter.f020/ 2007-Sep-18 21:02:04 - Directory
rfxmeter.f021/ 2007-Sep-18 21:32:02 - Directory
rfxmeter.f022/ 2007-Sep-18 21:42:02 - Directory
rfxmeter.f023/ 2007-Sep-18 21:52:01 - Directory
rfxmeter.f024/ 2007-Sep-18 22:02:06 - Directory
rfxmeter.f025/ 2007-Sep-18 22:12:02 - Directory
rfxmeter.f026/ 2007-Sep-18 22:12:02 - Directory
rfxmeter.f027/ 2007-Sep-18 22:32:02 - Directory
rfxmeter.f028/ 2007-Sep-18 22:42:03 - Directory
rfxmeter.f029/ 2007-Sep-18 22:52:02 - Directory
rfxmeter.f02a/ 2007-Sep-18 22:57:02 - Directory
rfxmeter.f02b/ 2007-Sep-18 23:32:02 - Directory
rfxmeter.f02c/ 2007-Sep-19 00:42:02 - Directory
rfxmeter.f02d/ 2007-Sep-19 01:52:02 - Directory
rfxmeter.f02e/ 2007-Sep-19 03:02:09 - Directory
rfxmeter.f02f/ 2007-Sep-19 04:12:03 - Directory
rfxmeter.f030/ 2007-Sep-19 05:17:02 - Directory
rfxmeter.f031/ 2007-Sep-19 06:12:02 - Directory
rfxmeter.f032/ 2007-Sep-19 07:12:03 - Directory
rfxmeter.f033/ 2007-Sep-19 07:42:03 - Directory
server-sda/ 2007-Sep-18 19:47:02 - Directory
server-sdb/ 2007-Sep-18 19:47:02 - Directory
temp_buiten/ 2007-Sep-18 19:47:02 - Directory
temp_onbekend/ 2007-Sep-18 19:47:02 - Directory
thgr228n.0d/ 2007-Sep-18 19:47:02 - Directory
thgr228n.10/ 2007-Sep-18 19:47:03 - Directory
uv138.79/ 2007-Sep-18 19:47:03 - Directory
x10/ 2007-Sep-18 20:52:03 - Directory
zonlicht/ 2007-Sep-18 19:47:03 - Directory

I have only one rfxmeter!
I'm not growing cannabis. ;-) LOL

I have to get some debug information I guess.

Did anyone else had this behavior before?

Regards,
Ron.
beanz
Starting Member
Starting Member
Posts: 20
Joined: Wed Jun 13, 2007 11:22 am
Location: United Kingdom
Contact:

Xpl-Perl ZenAH setup (Dutch)

Post by beanz »

This is a known bug - I don't actually have an RFX Meter but I think it is fixed in svn. Perhaps I'll make another release as soon as I've checked in some code for my new RFXCom transmitter.
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Xpl-Perl ZenAH setup (Dutch)

Post by RDNZL »

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by beanz</i>
<br />This is a known bug - I don't actually have an RFX Meter but I think it is fixed in svn. Perhaps I'll make another release as soon as I've checked in some code for my new RFXCom transmitter.


<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

Beanz.

This is the latest svn I guess (from yesterday)

server:/home/domo/install/xpl-perl# svn info
Path: .
URL: http://www.xpl-perl.org.uk/svn/xpl-perl/trunk
Repository Root: http://www.xpl-perl.org.uk/svn
Repository UUID: 7f219db2-e106-0410-9bb3-80eaa791bbb1
Revision: 333
Node Kind: directory
Schedule: normal
Last Changed Author: beanz
Last Changed Rev: 333
Last Changed Date: 2007-08-08 22:05:01 +0200 (Wed, 08 Aug 2007)

Can you give me a pointer where to look?
So I can fix it manually...

Would be great!

These are the wishes:
When you install the svn version only (without apt-get package first) make install, installs default in /usr/local/bin which is fine by me.
But the xpl-perl-setup commands creates scripts and runit service files for /usr/bin/...

If you configure alternate device names in devices.txt, you also still get the original rrd and graphs generated, would be nice if only the alternate names gets generated and the orgiginal files where suppressed.

A config file or entry in devices.txt where you can define device/sensor adresses which are not yours, which will be supressed.

Maybe i can generate some diffs.

Thanks.
Regards,
Ron.
rickk
Starting Member
Starting Member
Posts: 34
Joined: Wed Sep 12, 2007 9:55 am
Location: Netherlands

Xpl-Perl ZenAH setup (Dutch)

Post by rickk »

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by beanz</i>
<br />This is a known bug - I don't actually have an RFX Meter but I think it is fixed in svn. Perhaps I'll make another release as soon as I've checked in some code for my new RFXCom transmitter.
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

Dunno if it's related but right now I'm running my rfxcom in w800 mode with xpl-w800 (to see if it sees my Visonic sensors - it does!) and I see similar behavior with an unknown sensor I'm picking up.

In rfxcom mode it's fine and my own thgr228n stays on the same id, but the other one is cycling it's rfxsensor name.

OTOH, it doesn't seem report humidity data, so it might just be bogus decoding of the message.

These Oregon sensors are chatty btw!

- Rick
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Xpl-Perl ZenAH setup (Dutch)

Post by RDNZL »

Mark,

I finally had some time to look into my RFXPower module probs I had with xpl-rfxcom.

I solved 2 bugs, dunno if these break other modules.

Code: Select all

server:/usr/local/bin# diff  /home/domo/install/xpl-perl/lib/xPL/RF/RFXMeter.pm /usr/local/share/perl/5.8.8/xPL/RF/RFXMeter.pm 
58c58,59
<   my $device = sprintf "%02x%02x", $bytes->[1], $bytes->[2];
---
>   my $device = sprintf "%02x%02x", $bytes->[0], $bytes->[1];
> 
102c103
<   my $kwh = ( ($bytes->[4]<<16) + ($bytes->[2]<<8) + ($bytes->[3]) ) / 100;
---
>   my $kwh = ( ($bytes->[4]<<16) + ($bytes->[2]<<8) + ($bytes->[3]) ) / 1000;

This fixes the problem I described earlier, about the wrong device id. I found out xpl-perl reads the wrong bytes ( 1 off)...

And for an RFXPower module inserted in RFXMeter you need to divide by 1000 instead of 100 to get the kWh.

Problem which is still there is rrd not accepting the readout:
2007-09-25_17:51:39.96879 ERROR updating /var/lib/rrd/rfxmeter.00f0/kwh.rrd: not a simple integer: '224.271'
2007-09-25_17:53:39.97997 ERROR updating /var/lib/rrd/rfxmeter.00f0/kwh.rrd: not a simple integer: '224.299'
2007-09-25_17:57:39.99785 ERROR updating /var/lib/rrd/rfxmeter.00f0/kwh.rrd: not a simple integer: '224.354'
2007-09-25_17:59:40.00677 ERROR updating /var/lib/rrd/rfxmeter.00f0/kwh.rrd: not a simple integer: '224.385'

I can round it, but i loose important data then.
Anyone knows why rrd is complaining?

I have also created 2 very simple scripts, to stop and start xpl-perl the right way, make live so much easier!

stop-xpl:

Code: Select all

#!/bin/sh

cd /etc/xplperl/service
for i in `ls`
do
sv down $i
done
start-xpl:

Code: Select all

#!/bin/sh

cd /etc/xplperl/service
for i in `ls`
do
sv up $i
done
I'm starting to like xpl-perl! [8)]

Regards,
Ron.
User avatar
Snelvuur
Forum Moderator
Forum Moderator
Posts: 3156
Joined: Fri Apr 06, 2007 11:01 pm
Location: Netherlands
Contact:

Xpl-Perl ZenAH setup (Dutch)

Post by Snelvuur »

Well join the club then :) i dont know if you use http://www.advsofteng.com/ chart director. But there are some simple lines to get some graphs with it (the sensors button from www.binkey.nl) if you want i can put those online to, perhaps to play around.

// Erik (binkey.nl)
Post Reply

Return to “Linux Forum”