Zenah will not start

Forum regarding Linux Software and Home Automation Domotica.

Zenah will not start

Postby Jfn » Sun Mar 16, 2008 8:25 pm

I downloaded Zenah from the SVN sourcetree, ran

perl Makefile.PL
make

which all went well (No errors or warnings). However, when trying to start the rules-engine, I get the following errors:
Code: Select all
debian:/home/zenah# perl -Iblib/lib blib/script/zenah
closing dbh with active statement handles at /usr/share/perl5/Class/DBI/Loader/SQLite.pm line 110.
Use of uninitialized value in hash element at /usr/share/perl5/Class/DBI/Loader/Generic.pm line 79.
Use of uninitialized value in hash element at /usr/share/perl5/Class/DBI/Loader/Generic.pm line 79.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Lingua/EN/Inflect.pm line 719.
Use of uninitialized value in string eq at /usr/share/perl5/Lingua/EN/Inflect.pm line 770.
Use of uninitialized value in string eq at /usr/share/perl5/Lingua/EN/Inflect.pm line 770.
Use of uninitialized value in hash element at /usr/share/perl5/Class/DBI/Loader/Generic.pm line 79.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Lingua/EN/Inflect.pm line 719.
Use of uninitialized value in string eq at /usr/share/perl5/Lingua/EN/Inflect.pm line 770.
Use of uninitialized value in string eq at /usr/share/perl5/Lingua/EN/Inflect.pm line 770.
Can't call method "has_a" on an undefined value at /usr/share/perl5/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.
debian:/home/zenah#

Is this because I am missing a required CPAN library? I can imagine it only to be some minor issue, but I hav enot found the solution yet.

Als het niet kapot is, niet repareren!
Jfn
Member
Member
 
Posts: 332
Joined: February 2008
Location: Netherlands

Zenah will not start

Postby Snelvuur » Sun Mar 16, 2008 8:28 pm

As i can recollect, this has to do with the zenah.dbi.conf , did you rename the zenah.dbi.sample to zenah.dbi?

// Erik (binkey.nl)
User avatar
Snelvuur
Forum Moderator
Forum Moderator
 
Posts: 3156
Joined: April 2007
Location: Netherlands

Zenah will not start

Postby Jfn » Sun Mar 16, 2008 9:08 pm

I am trying to use Zenah with mysql (Not with sqlite).

The zenah.sample.sql3 code I need to populate the empty database I just created does not work with mysql. The perl code you provide in your wiki to correct this removes too much (for example all CREATE TABLE entries are missing). Need to rewrite that code, but will look into that tomorrow (Need to get up early).

Is it because of the empty database I get these errors? I did rename the file and filled it with the correct data:
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">## ZenAH DBI configuration
## for sqlite:
#dsn = dbi:SQLite:zenah.db

## for mysql:
dsn = dbi:mysql:zenahDB
user = xxxxx
password = xxxxx
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">Als het niet kapot is, niet repareren!
Jfn
Member
Member
 
Posts: 332
Joined: February 2008
Location: Netherlands

Zenah will not start

Postby Snelvuur » Sun Mar 16, 2008 9:17 pm

well try and use the zenah.db just to try it then. the sample sql code should be ok to work with mysql, i think beanz did create an update that it works for mysql too (perhaps it is a different file, check the files)

// Erik (binkey.nl)
User avatar
Snelvuur
Forum Moderator
Forum Moderator
 
Posts: 3156
Joined: April 2007
Location: Netherlands

Zenah will not start

Postby Jfn » Mon Mar 17, 2008 6:39 pm

It still will not start.

I downloaded a fresh copy of the SVN sources and did a 'perl Makefile.PL'. In bold/italic text there are two lines I think are telling me something is wrong:

Code: Select all
debian:/home/zenah# perl Makefile.PL
include /home/zenah/inc/Module/Install.pm
include inc/Module/Install/Metadata.pm
include inc/Module/Install/Base.pm
<i><b>Cannot determine perl version info from lib/ZenAH.pm</b></i>
include inc/Module/Install/Catalyst.pm
*** Module::Install::Catalyst
include inc/Module/Install/Makefile.pm
<i><b>Please run "make catalyst_par" to create the PAR package!</b></i>
*** Module::Install::Catalyst finished.
include inc/Module/Install/Scripts.pm
include inc/Module/Install/AutoInstall.pm
include inc/Module/Install/Include.pm
include inc/Module/AutoInstall.pm
*** Module::AutoInstall version 1.03
*** Checking for Perl dependencies...
[Core Features]
- Module::Install                  ...loaded. (0.64)
- DBD::SQLite                      ...loaded. (1.13)
- Class::DBI::SQLite               ...loaded. (0.110)
- Test::More                       ...loaded. (0.620)
- Catalyst                         ...loaded. (5.700600 >= 5.64)
- Template::Provider               ...loaded. (2.930 >= 2.93)
- xPL::Base                        ...loaded. (0.060 >= 0.05)
- Catalyst::Plugin::FormValidator  ...loaded. (0.020)
- Catalyst::Plugin::SubRequest     ...loaded. (0.100)
- Class::DBI::FromForm             ...loaded. (0.040)
- Class::DBI::AsForm               ...loaded. (2.420)
- Class::DBI::Loader               ...loaded. (0.330)
- Class::DBI::Loader::Relationship ...loaded. (1.300)
- Class::DBI::Sweet                ...loaded. (0.080)
- DateTime::Format::Strptime       ...loaded. (1.070000)
- Template::Plugin::Class          ...loaded. (0.130)
*** Module::AutoInstall configuration finished.
include inc/Module/Install/WriteAll.pm
Writing META.yml
include inc/Module/Install/Win32.pm
include inc/Module/Install/Can.pm
include inc/Module/Install/Fetch.pm
Writing Makefile for ZenAH
debian:/home/zenah#


After this I ran make. This runs fine, no errors.

Then I set the longitude/latitude/tz environment variables and finally start the rules engine:

Code: Select all
debian:/home/zenah# perl -Iblib/lib blib/script/zenah_server.pl
closing dbh with active statement handles at /usr/share/perl5/Class/DBI/Loader/SQLite.pm line 110.
Use of uninitialized value in hash element at /usr/share/perl5/Class/DBI/Loader/Generic.pm line 79.
Use of uninitialized value in hash element at /usr/share/perl5/Class/DBI/Loader/Generic.pm line 79.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Lingua/EN/Inflect.pm line 719.
Use of uninitialized value in string eq at /usr/share/perl5/Lingua/EN/Inflect.pm line 770.
Use of uninitialized value in string eq at /usr/share/perl5/Lingua/EN/Inflect.pm line 770.
Use of uninitialized value in hash element at /usr/share/perl5/Class/DBI/Loader/Generic.pm line 79.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Lingua/EN/Inflect.pm line 719.
Use of uninitialized value in string eq at /usr/share/perl5/Lingua/EN/Inflect.pm line 770.
Use of uninitialized value in string eq at /usr/share/perl5/Lingua/EN/Inflect.pm line 770.
Can't call method "has_a" on an undefined value at /usr/share/perl5/Class/DBI/Loader/Relationship.pm line 101.
Compilation failed in require at /home/zenah/blib/script/../lib/ZenAH/Templates.pm line 34.
BEGIN failed--compilation aborted at /home/zenah/blib/script/../lib/ZenAH/Templates.pm line 34.
Compilation failed in require at /home/zenah/blib/script/../lib/ZenAH/View/UI.pm line 5.
BEGIN failed--compilation aborted at /home/zenah/blib/script/../lib/ZenAH/View/UI.pm line 5.
Compilation failed in require at (eval 97) line 3.
Compilation failed in require at blib/script/zenah_server.pl line 56.


I followed the exact steps as set-out in the wiki, but unfortunately still no luck.

What am I doing wrong?

Als het niet kapot is, niet repareren!
Jfn
Member
Member
 
Posts: 332
Joined: February 2008
Location: Netherlands

Zenah will not start

Postby Jfn » Mon Mar 17, 2008 6:50 pm

It is working!

Just after hitting the 'Post New Reply' button I realized that a very important step was omitted from the wiki:

<center><b>sqlite3 zenah.db < zenah.sample.sql3</b></center>

Just by accident I noticed that the sqlite database was empty, so I needed to fill it first. After doing so I was in business!

Now it is time to find out how Zenah actually works. I have no sensors connected to my system yet (RFXcom is in the mail and 1-wire is still awaiting shipment from the US). But soon I will be able to start exploring Zenah.



Als het niet kapot is, niet repareren!
Jfn
Member
Member
 
Posts: 332
Joined: February 2008
Location: Netherlands

Zenah will not start

Postby Snelvuur » Mon Mar 17, 2008 7:41 pm

So something was still bad on the wiki? let me know so i (or you) can adjust.

// Erik (binkey.nl)
User avatar
Snelvuur
Forum Moderator
Forum Moderator
 
Posts: 3156
Joined: April 2007
Location: Netherlands


Return to Linux Forum

Who is online

Users browsing this forum: No registered users and 1 guest