Page 2 of 2

xpl-rfxcom

Posted: Mon Nov 19, 2007 12:14 am
by Snelvuur
sensors are in the database stored (mysql) i use chart director for linux and then the perl version... http://www.advsofteng.com/cdperl.html.

I really need to check the data with zenah, since that would be 10 times faster. But have not had the time yet, its time consuming like every hobby.

// Erik (binkey.nl)

xpl-rfxcom

Posted: Mon Nov 19, 2007 7:40 pm
by Kroonen
This software is not opensource?? you must pay for it, it isn't cheap..

xpl-rfxcom

Posted: Mon Nov 19, 2007 7:43 pm
by Snelvuur
It still works without a key.. i still had it from some time ago when i needed it once. I will try and create some open source graphs when i have the time. There are also some nice ones for free.

// Erik (binkey.nl)

xpl-rfxcom

Posted: Tue Nov 27, 2007 10:39 pm
by Kroonen
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by snelvuur</i>
<br />reboot? you are using linux right? I use sv to keep my things running (see wiki.binkey.nl for info)

// Erik (binkey.nl)
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

Erik,

sv doesn work for me i don't have sv, i use this

http://cr.yp.to/daemontools/faq/create.html#why

* svc -h /service/yourdaemon: sends HUP
* svc -t /service/yourdaemon: sends TERM, and automatically restarts the daemon after it dies
* svc -d /service/yourdaemon: sends TERM, and leaves the service down
* svc -u /service/yourdaemon: brings the service back up
* svc -o /service/yourdaemon: runs the service once

xpl-rfxcom

Posted: Tue Nov 27, 2007 10:43 pm
by Snelvuur
I have not tried using svc, also since it doesn't come with that setup tools. What are your limitations for not running sv then? Perhaps i can help in that areea. But you should be able to use daemontools without to much hassle, it works sort off the same as sv.

// Erik (binkey.nl)

xpl-rfxcom

Posted: Tue Nov 27, 2007 11:23 pm
by Kroonen
Hi,

I also trying to log into a mysql database.

How must the database be created, i called it xpl, but is that enough

When i run xpl-sql-logger i get this error

Can't locate object method "has_a" via package "xPL::SQL::Msgelt" (perhaps you forgot to load "xPL::SQL::Msgelt"?) at /usr/lib/perl5/site_perl/5.8.8/xPL/SQL.pm line 76.
Compilation failed in require at /usr/bin/xpl-sql-logger line 35.
BEGIN failed--compilation aborted at /usr/bin/xpl-sql-logger line 35.

xpl-rfxcom

Posted: Tue Nov 27, 2007 11:48 pm
by Snelvuur
You can find the tables you need with "man xPL::SQL" you can see which tables you need.

About the "has_a" via package, it sounds really familair with me. I think i solved this once, but i cant remember what. I'll check it more.

// Erik (binkey.nl)

xpl-rfxcom

Posted: Wed Nov 28, 2007 8:08 pm
by Kroonen
Erik,

I made the database and run the 4 scripts to create the tables.

I see 4 tables body elt msg msgelt. if I do a select * from elt, i get values so it works
How do i get some nice values out of it. For example the last reading of my oregon sensor???

xpl-rfxcom

Posted: Wed Nov 28, 2007 9:50 pm
by Snelvuur
You can check this thread.. http://www.domoticaforum.eu/topic.asp?TOPIC_ID=464

But do note, that although its nice mysql. I think its better to use the standard one that comes with it. Change it and then use zenah. With zenah you can add rules and let it work with mysql so that it will create better "graphs" in the database. As you can also see on www.binkey.nl if you click on sensors, thats still the old way (not with zenah) which is pretty slow, but thats because of the complexity on how to get it.

// Erik (binkey.nl)

xpl-rfxcom

Posted: Wed Nov 28, 2007 11:36 pm
by Kroonen
I found that topic already, also the sql query works but i'm looking for a query, where for the last reeading so i can do it with php, and i can put it on my site. the charts i still do with rrdtool

So if you know the query

xpl-rfxcom

Posted: Thu Nov 29, 2007 10:36 am
by Snelvuur
i used to know, but i'am trying to switch to zenah for that. since its alot faster. i'll check if i can find it since its also a really big one.

// Erik (binkey.nl)

xpl-rfxcom

Posted: Thu Nov 29, 2007 8:33 pm
by Kroonen
Erik

I think i got him

select (substring(body.body from (8+position('current=' in body.body)))) as value from msg,body where msg.body = body.id and msg.time and body.body like '%device=thgr228n.89\ntype=temp\n%' order by msg.time DESC LIMIT 0,1;

Please try it and check if it is allright.
And now i must get it in php, i have no experience with that so if someone has...


IT should be nice that the are daily snapshots are from zenah, so it is just a tarball you can download., can jou ask it to Beanz

xpl-rfxcom

Posted: Thu Nov 29, 2007 10:44 pm
by Snelvuur
well you can use svn with zenah.. then just make a new package.. he only makes new packages when he thinks a new one should arrive. BUT, you should really install zenah, because then you can choose which items should be stored. Then you can do a "select from items where thingy=oregon sensor" that kind of easy things.. i'am still busy playing around with it since it takes a lot of time.

// Erik (binkey.nl)

xpl-rfxcom

Posted: Fri Nov 30, 2007 11:06 pm
by Kroonen
Well installed like your wiki zenah
all perl modules are there

hen i start i get this error, ny idea


[root@kroonen zenah]# perl -Iblib/lib blib/script/zenah
Use of uninitialized value in hash element at /usr/lib/perl5/vendor_perl/5.8.8/Class/DBI/Loader/Generic.pm line 79.
Use of uninitialized value in hash element at /usr/lib/perl5/vendor_perl/5.8.8/Class/DBI/Loader/Generic.pm line 79.
Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/vendor_perl/5.8.6/Lingua/EN/Inflect.pm line 719.
Use of uninitialized value in string eq at /usr/lib/perl5/vendor_perl/5.8.6/Lingua/EN/Inflect.pm line 770.
Use of uninitialized value in string eq at /usr/lib/perl5/vendor_perl/5.8.6/Lingua/EN/Inflect.pm line 770.
Use of uninitialized value in hash element at /usr/lib/perl5/vendor_perl/5.8.8/Class/DBI/Loader/Generic.pm line 79.
Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/vendor_perl/5.8.6/Lingua/EN/Inflect.pm line 719.
Use of uninitialized value in string eq at /usr/lib/perl5/vendor_perl/5.8.6/Lingua/EN/Inflect.pm line 770.
Use of uninitialized value in string eq at /usr/lib/perl5/vendor_perl/5.8.6/Lingua/EN/Inflect.pm line 770.
Can't call method "has_a" on an undefined value at /usr/lib/perl5/vendor_perl/5.8.8/Class/DBI/Loader/Relationship.pm line 101.
Compilation failed in require at blib/lib/ZenAH/Engine.pm line 44.
BEGIN failed--compilation aborted at blib/lib/ZenAH/Engine.pm line 44.
Compilation failed in require at blib/script/zenah line 35.
BEGIN failed--compilation aborted at blib/script/zenah line 35.

xpl-rfxcom

Posted: Fri Nov 30, 2007 11:11 pm
by Snelvuur
did you select the mysql version? (within the config?) if so, also create the zenah db, its in the svn files you have. in zenah/misc/zenah.mysql.sql

// Erik (binkey.nl)