Page 1 of 2

Imperihome

Posted: Saturday 26 December 2015 17:17
by ESFnl
Hello,

As a noob to linux I'm very proud my RPI is running Domiticz! Controlling some cheap switches via RFXcom goes well on the web interface (http://192.168.0.177:8080). I'm able to control the Christmas tree with my tablet! However I'm completely stuck with my next goal: Imperihome.

First I've edited config.yml for my fixed IP:

Code: Select all

domo_path: "http://192.168.0.177:3001"
I left MyDomoAtHome.sh untouched because I have the standard Raspberry Pi setup. I tried to run the script:

Code: Select all

sh ./run-once.sh
Unfortunately this code is always stuck at the lines

Code: Select all

Configuring Plack-Middleware-Auth-Digest-0.05 ... OK
Building and testing Plack-Middleware-Auth-Digest-0.05 ... 
I figured out that this code is called at line:

Code: Select all

sudo cpanm Task::Plack
within the script. Not having a clue of what this is used for, or how to fix, I've searched many discussions on the forum and Google but don't know my next step.

I would very much appreciate any help but please... in clear simple steps for me to copy/paste into putty ;)

Re: sh ./run-once.sh

Posted: Sunday 27 December 2015 10:27
by Derik

Re: sh ./run-once.sh

Posted: Sunday 27 December 2015 16:59
by ESFnl
Thank you Derik for your suggestion. However I'm not looking for another frontpage for Domoticz but a way to install https://www.domoticz.com/wiki/ImperiHome.

Re: sh ./run-once.sh

Posted: Sunday 27 December 2015 20:16
by Derik
ESFnl wrote:Thank you Derik for your suggestion. However I'm not looking for another frontpage for Domoticz but a way to install https://www.domoticz.com/wiki/ImperiHome.
You have to pay for the full version of imperihome..
There are better options...

Oke, i cannot help you with Imperihome sorry..

Re: Imperihome

Posted: Thursday 07 January 2016 20:31
by ESFnl
screendump
screendump
Putty run-once.sh.PNG (30.5 KiB) Viewed 5999 times
<bump> ;)

This is the line

Code: Select all

sh ./run-once.sh 
is stuck all the time. Any other suggestions?

Re: Imperihome

Posted: Friday 08 January 2016 8:15
by Abbadon
how long did you wait? on my rpi2 it take about 30mins to configure so...

Re: Imperihome

Posted: Friday 08 January 2016 13:33
by ESFnl
Thank you Abbadon for this suggestion. I believe I've waited longer than that but maybe my patience wasn't enough...
I'll give it a try after work!

Imperihome

Posted: Saturday 09 January 2016 0:31
by mvzut
I think I may be able to help you... In configuration.yml, you shouldn't put port 3001 in the "domo_path" section, but 8080. At least I have it configured that way, and it works perfectly. But at Abbadon says, the run-once.sh script can take quite a long time to run, so give it some time.

By the way, Imperihome (especially the Android version) is still the best and most configurable front end for Domoticz that I have seen so far, don't listen to people that suggest to use alternative frontpages ;-)

Re: Imperihome

Posted: Sunday 10 January 2016 20:23
by ESFnl
You were right: I wasn't patience enough. The script took 54 minutes! I didn't know it could take that long.
Unfortunately still without success. I ran the script twice. First with the original settings (port 3001) and secondly with port 8080 as mvzut suggested.

Although the script continues and finishes, I believe some errors appear which I don't understand:

Code: Select all

pi@raspberrypi ~/domoticz/MyDomoAtHome $ sh ./run-once.sh
Will update packages list first...
Now getting the needed software...
Now getting getting and installing dependencies...
Reading package lists... Done
Building dependency tree
Reading state information... Done
cpanminus is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
--> Working on Task::Plack
Fetching http://www.cpan.org/authors/id/M/MI/MIYAGAWA/Task-Plack-0.28.tar.gz ... OK
Configuring Task-Plack-0.28 ... OK
==> Found dependencies: Plack::Middleware::Auth::Digest, Starman, Plack::Middleware::Deflater, Plack::App::Proxy, CGI::PSGI, IO::Handle::Util, FCGI::Client, FCGI, Plack::Middleware::Debug, Plack, Twiggy, Plack::Middleware::ReverseProxy, Net::FastCGI, Corona, Plack::Middleware::Header, PSGI, Starlet, Plack::Middleware::Session
--> Working on Plack::Middleware::Auth::Digest
Fetching http://www.cpan.org/authors/id/M/MI/MIYAGAWA/Plack-Middleware-Auth-Digest-0.05.tar.gz ... OK
Configuring Plack-Middleware-Auth-Digest-0.05 ... OK
Building and testing Plack-Middleware-Auth-Digest-0.05 ... FAIL
! Timed out (> 1800s). Use --verbose to retry.
Terminated
! Installing Plack::Middleware::Auth::Digest failed. See /root/.cpanm/work/1452356060.18870/build.log for details. Retry with --force to force install it.
pi@raspberrypi ~/domoticz/MyDomoAtHome $ --> Working on Starman
Fetching http://www.cpan.org/authors/id/M/MI/MIYAGAWA/Starman-0.4014.tar.gz ... OK
Configuring Starman-0.4014 ... OK
==> Found dependencies: Net::Server, Test::TCP
--> Working on Net::Server
Fetching http://www.cpan.org/authors/id/R/RH/RHANDOM/Net-Server-2.008.tar.gz ... OK
Configuring Net-Server-2.008 ... OK
Building and testing Net-Server-2.008 ... FAIL
! Installing Net::Server failed. See /root/.cpanm/work/1452356060.18870/build.log for details. Retry with --force to force install it.
--> Working on Test::TCP
Fetching http://www.cpan.org/authors/id/T/TO/TOKUHIROM/Test-TCP-2.14.tar.gz ... OK
Configuring Test-TCP-2.14 ... OK
pi@raspberrypi ~/domoticz/MyDomoAtHome $
The Imperihome still cannot connect "Error :( Invalid response from API". Any suggestions?

Re: Imperihome

Posted: Tuesday 26 January 2016 21:01
by Heen
Did you solve your problem?

Re: Imperihome

Posted: Wednesday 27 January 2016 19:51
by ESFnl
No Heen, unfortunately I still don't know how to solve this issue. In another attempt I've renamed the MyDomoAtHome directory to OLDMyDomoAtHome. Herewith I was hoping to get a clean installtion. However during the run-once.sh I see the following errors:

Code: Select all

--> Working on Task::PlackFetching http://www.cpan.org/authors/id/M/MI/MIYAGAWA/Task-Plack-0.28.tar.gz ... OK
Configuring Task-Plack-0.28 ... OK
==> Found dependencies: Plack::Middleware::Auth::Digest, Starman, Plack::Middleware::Deflater, Plack
are::Session
--> Working on Plack::Middleware::Auth::Digest
Fetching http://www.cpan.org/authors/id/M/MI/MIYAGAWA/Plack-Middleware-Auth-Digest-0.05.tar.gz ... O
Configuring Plack-Middleware-Auth-Digest-0.05 ... OK
Building and testing Plack-Middleware-Auth-Digest-0.05 ... FAIL
! Timed out (> 1800s). Use --verbose to retry.
Terminated
pi@raspberrypi ~/domoticz/MyDomoAtHome $ ! Installing Plack::Middleware::Auth::Digest failed. See /r
 with --force to force install it.
--> Working on Starman
Fetching http://www.cpan.org/authors/id/M/MI/MIYAGAWA/Starman-0.4014.tar.gz ... OK
Configuring Starman-0.4014 ... OK
==> Found dependencies: Net::Server, Test::TCP
pi@raspberrypi ~/domoticz/MyDomoAtHome $
As always everything goes well untill

Code: Select all

Building and testing Plack-Middleware-Auth-Digest-0.05 ... FAIL
Could maybe something goes wrong with this specific version? Did anyone succeed with this installation recently?

Re: Imperihome

Posted: Thursday 28 January 2016 11:42
by epierre
Hello,

So bad you've not come to the official support thread...

in the MDAH repository do a run-once.sh again, I recently fixed a missing dependencies that has effects here.

Also before this command will add the missing.

sudo apt-get install cmake make gcc g++

In fact the procedure install a lot of things, configuration is much shorter ;-) but the remark on port 8080 is very important.

Re: Imperihome

Posted: Thursday 28 January 2016 22:44
by ESFnl
Sorry I didn't know a better place to post my question.

I removed MyDomoAtHome directory to be sure having a new clean download. I changed my domoticz IP address to 192.168.0.176. The script now took over 2 hours (!) where it had four times a >1800 seconds timeout. For example

Code: Select all

Building and testing Plack-Middleware-Session-0.30 ... FAIL
! Timed out (> 1800s). Use --verbose to retry.
The address http://192.168.0.176:8080/json.htm?type ... order=Name nicely shows my scenes and hardware. But http://gateway_ip:gateway_port/devices and Imperihome doesn't work. What would be the gateway with a default installation? What makes the run-once.sh fail?

Re: Imperihome

Posted: Thursday 28 January 2016 23:10
by epierre
ESFnl wrote:Sorry I didn't know a better place to post my question.

I removed MyDomoAtHome directory to be sure having a new clean download. I changed my domoticz IP address to 192.168.0.176. The script now took over 2 hours (!) where it had four times a >1800 seconds timeout. For example

Code: Select all

Building and testing Plack-Middleware-Session-0.30 ... FAIL
! Timed out (> 1800s). Use --verbose to retry.
The address http://192.168.0.176:8080/json.htm?type ... order=Name nicely shows my scenes and hardware. But http://gateway_ip:gateway_port/devices and Imperihome doesn't work. What would be the gateway with a default installation? What makes the run-once.sh fail?
1st question: if domoticz and the gateway are on the same host you should have in your conf:
- http://127.0.0.1:8080 for domoticz

the gateway_ip:gateway_port would be 192.168.0.176:3001 so you should call http://192.168.0.176:3001/devices if installation is successful

Re: Imperihome

Posted: Saturday 13 February 2016 15:36
by ESFnl
Would you please copy the right config files as an example? I'm still struggling with the installation. I've formatted my SD-card and re-downloaded the Domoticz image file. After re-installing all the steps unfortunately still no luck.
Now I've got the message:

Code: Select all

MyDomoAtHome process is not running... failed!
and

Code: Select all

No such process

Re: Imperihome

Posted: Saturday 13 February 2016 19:30
by epierre
Hello,

Try:

./start2.sh

you should see where the error is from.

Re: Imperihome

Posted: Saturday 13 February 2016 20:39
by ESFnl
Not having a clue what I did... this is the result:

Code: Select all

pi@raspberrypi ~ $ cd domoticz/
pi@raspberrypi ~/domoticz $ cd MyDomoAtHome/
pi@raspberrypi ~/domoticz/MyDomoAtHome $ ./start2.sh
YAML Warning: Duplicate map key found. Ignoring.
   Code: YAML_LOAD_WARN_DUPLICATE_KEY
   Line: 17
   Document: 1
 at /usr/share/perl5/YAML/Mo.pm line 24, <$IN> line 1.
        YAML::Mo::__ANON__(YAML::Loader=HASH(0x1b422c8), "YAML_LOAD_WARN_DUPLICATE_KEY") called at /usr/share/perl5/Y                        AML/Loader.pm line 359
        YAML::Loader::_parse_mapping(YAML::Loader=HASH(0x1b422c8), "") called at /usr/share/perl5/YAML/Loader.pm line                         168
        YAML::Loader::_parse_node(YAML::Loader=HASH(0x1b422c8)) called at /usr/share/perl5/YAML/Loader.pm line 103
        YAML::Loader::_parse(YAML::Loader=HASH(0x1b422c8)) called at /usr/share/perl5/YAML/Loader.pm line 25
        YAML::Loader::load(YAML::Loader=HASH(0x1b422c8), "# appdir/environments/development.yml\x{a}# configuration f                        ile fo"...) called at /usr/share/perl5/YAML.pm line 34
        YAML::Load("# appdir/environments/development.yml\x{a}# configuration file fo"...) called at /usr/share/perl5                        /YAML.pm line 75
        YAML::LoadFile("/home/pi/domoticz/MyDomoAtHome/environments/development.yml") called at /usr/share/perl5/Danc                        er/Config.pm line 201
        eval {...} called at /usr/share/perl5/Dancer/Config.pm line 201
        Dancer::Config::load_settings_from_yaml("/home/pi/domoticz/MyDomoAtHome/environments/development.yml") called                         at /usr/share/perl5/Dancer/Config.pm line 182
        Dancer::Config::load("Dancer::Config") called at /usr/share/perl5/Dancer.pm line 258
        Dancer::import("Dancer") called at /home/pi/domoticz/MyDomoAtHome/bin/app.pl line 19
        Plack::Sandbox::_2fhome_2fpi_2fdomoticz_2fMyDomoAtHome_2fbin_2fapp_2epl::BEGIN() called at /home/pi/domoticz/                        MyDomoAtHome/bin/app.pl line 19
        eval {...} called at /home/pi/domoticz/MyDomoAtHome/bin/app.pl line 19
        require /home/pi/domoticz/MyDomoAtHome/bin/app.pl called at (eval 9) line 3
        eval 'package Plack::Sandbox::_2fhome_2fpi_2fdomoticz_2fMyDomoAtHome_2fbin_2fapp_2epl;
{
    my $app = do $_file;
    if ( !$app && ( my $error = $@ || $! )) { die $error; }
    $app;
}

;' called at /usr/local/share/perl/5.14.2/Plack/Util.pm line 120
        Plack::Util::_load_sandbox("/home/pi/domoticz/MyDomoAtHome/bin/app.pl") called at /usr/local/share/perl/5.14.                        2/Plack/Util.pm line 136
        Plack::Util::load_psgi("/home/pi/domoticz/MyDomoAtHome/bin/app.pl") called at /usr/local/share/perl/5.14.2/Pl                        ack/Runner.pm line 179
        Plack::Runner::__ANON__() called at /usr/local/share/perl/5.14.2/Plack/Runner.pm line 24
        Plack::Runner::__ANON__() called at /usr/local/share/perl/5.14.2/Plack/Runner.pm line 24
        Plack::Runner::__ANON__() called at /usr/local/share/perl/5.14.2/Plack/Runner.pm line 24
        Plack::Runner::__ANON__() called at /usr/local/share/perl/5.14.2/Plack/Runner.pm line 24
        Plack::Runner::__ANON__() called at /usr/local/share/perl/5.14.2/Plack/Loader.pm line 55
        Plack::Loader::preload_app(Plack::Loader=HASH(0x13b5288), CODE(0x14aa7e0)) called at /usr/local/share/perl/5.                        14.2/Plack/Runner.pm line 274
        Plack::Runner::run(Plack::Runner=HASH(0x1290a60)) called at /usr/local/bin/plackup line 7
environment:development
log:core
logger:console
domoticz:http://192.168.0.176:8080
[3279]  core @0.000050> PLACK_ENV is set (development) forcing PSGI handler in /usr/share/perl5/Dancer/Handler.pm l.                         31
[3279]  core @0.007378> loading Dancer::Handler::PSGI handler in /usr/share/perl5/Dancer/Handler.pm l. 45
[3279]  core @0.076102> loading handler 'Dancer::Handler::PSGI' in /usr/share/perl5/Dancer.pm l. 464
Use of uninitialized value $opt in lc at /usr/local/share/perl/5.14.2/Starman/Server.pm line 80.
2016/02/13-20:36:49 Starman::Server (type Net::Server::PreFork) starting! pid(3279)
Resolved [*]:3001 to [0.0.0.0]:3001, IPv4
Host [*] resolved to IPv6 address [::] but IO::Socket::INET6->new fails: Address family not supported by protocol at                         /usr/local/share/perl/5.14.2/Net/Server/Proto.pm line 141.
Binding to TCP port 3001 on host 0.0.0.0 with IPv4
2016/02/13-20:36:49 Can't connect to TCP port 3001 on 0.0.0.0 [Address already in use]
  at line 68 in file /usr/local/share/perl/5.14.2/Net/Server/Proto/TCP.pm
2016/02/13-20:36:49 Received QUIT. Running a graceful shutdown
Use of uninitialized value in subtraction (-) at /usr/local/share/perl/5.14.2/Net/Server/PreFork.pm line 356.
Use of uninitialized value in subtraction (-) at /usr/local/share/perl/5.14.2/Net/Server/PreFork.pm line 386.
Use of uninitialized value in subtraction (-) at /usr/local/share/perl/5.14.2/Net/Server/PreFork.pm line 406.
Use of uninitialized value in subtraction (-) at /usr/local/share/perl/5.14.2/Net/Server/PreFork.pm line 414.
2016/02/13-20:36:49 Worker processes cleaned up
2016/02/13-20:36:49 Server closing!
shutdown() on closed socket GEN1 at /usr/lib/perl/5.14/IO/Socket.pm line 294.
pi@raspberrypi ~/domoticz/MyDomoAtHome $

Re: Imperihome

Posted: Sunday 14 February 2016 0:05
by epierre
@ESFnl something is already runnin on port 3001, try "lsof -i tcp:3001" to find out

Can't connect to TCP port 3001 on 0.0.0.0 [Address already in use]

Re: Imperihome

Posted: Sunday 14 February 2016 9:59
by ESFnl
Thank you Epierre for all your patience. You probably noticed I'm not experienced.
A little proud of myself getting your command running!

Code: Select all

pi@raspberrypi ~ $ lsof -i tcp:3001
-bash: lsof: command not found
pi@raspberrypi ~ $ sudo lsof -i tcp:3001
sudo: lsof: command not found
pi@raspberrypi ~ $ sudo -v
[sudo] password for pi:
pi@raspberrypi ~ $ lsof -i tcp:3001
-bash: lsof: command not found
pi@raspberrypi ~ $ cd /
pi@raspberrypi / $ lsof -i tcp:3001
-bash: lsof: command not found
pi@raspberrypi / $ su
Password:
root@raspberrypi:/# lsof -i tcp:3001
bash: lsof: command not found
root@raspberrypi:/# sudo lsof -i tcp:3001
sudo: lsof: command not found
root@raspberrypi:/# sudo apt-get install lsof
---

---
Setting up lsof (4.86+dfsg-1) ...
root@raspberrypi:/# lsof -i tcp:3001
COMMAND  PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
starman 2133 www-data    5u  IPv4   6021      0t0  TCP *:3001 (LISTEN)
starman 2357 www-data    5u  IPv4   6021      0t0  TCP *:3001 (LISTEN)
starman 2358 www-data    5u  IPv4   6021      0t0  TCP *:3001 (LISTEN)
starman 2359 www-data    5u  IPv4   6021      0t0  TCP *:3001 (LISTEN)
starman 2360 www-data    5u  IPv4   6021      0t0  TCP *:3001 (LISTEN)
root@raspberrypi:/#
What would the next step be? Getting starman another port? Do you know how these conflicts may occur? I am strictly following the instructions on domoticz.com.

Re: Imperihome

Posted: Sunday 14 February 2016 10:09
by epierre
it is already running ! so everything is fine there !