Page 25 of 55

Re: [MyDomoAtHome] Support thread

Posted: Thursday 03 March 2016 20:27
by lowca
epierre wrote:@Iowca I was working on water and the new Energy yesterday ;-)

this is round number, I can multiply by 1000 and display Watt
I thought about to see in kWh in format x.xxx
"Iowca I was working on water and the new Energy yesterday ;-)" , do you have some beta version , changlog ,
or all changes are in new version .. (sorry i'm new here ;)

Re: [MyDomoAtHome] Support thread

Posted: Friday 04 March 2016 19:41
by aleceuta
Hello:

I try now fresh install of MyDomoAtHome on preconfigured SD with Domoticz 3.4834 for raspberry

I follow the wiki tutorial https://www.domoticz.com/wiki/ImperiHome
I have problem with sh ./run-once.sh never finish
I created any modificate script run-once2.sh that include 2 lines in verbose mode

run-once2.sh

Code: Select all

#!/bin/sh
echo "Will update packages list first..."
clear
echo "Will update packages list first..."
#sudo apt-get update 2>&1 > /dev/null
echo "Now getting the needed software..."
sudo apt-get -y install whiptail  2>&1 > /dev/null

 if ! whiptail  --backtitle "MyDomoAtHome ISS Interface" --yesno "Have you configured MyDomoAtHome.sh with your parameters before continuing ? Otherwise please say NO" 0 0; then
                whiptail  --backtitle "MyDomoAtHome ISS Interface" --msgbox "Understood! Aborting!" 0 0 
                return
        fi


echo "Now getting getting and installing dependencies..."
sudo apt-get -y install libdancer-perl libdancer2-perl libfile-slurp-perl  liblwp-protocol-psgi-perl  2>&1 
sudo apt-get -y install libtime-piece-perl libjson-perl libplack-perl starman  libcrypt-ssleay-perl libdatetime-perl libdatetime-format-strptime-perl  2>&1 
sudo apt-get -y install libdbd-sqlite3-perl libdbi-perl sqlite3 2>&1 
sudo apt-get -y install libaudio-mpd-perl libnet-upnp-perl libpoe-component-client-mpd-perl  2>&1 
sudo curl -L https://cpanmin.us | perl - --sudo App::cpanminus
sudo cpanm Task::Plack --verbose --force
sudo cpanm Time::Moment --verbose --force
echo "Now installing the service"
sudo cp MyDomoAtHome.sh /etc/init.d/MyDomoAtHome.sh
sudo chmod +x /etc/init.d/MyDomoAtHome.sh
sudo update-rc.d MyDomoAtHome.sh defaults
whiptail  --backtitle "MyDomoAtHome ISS Interface" --msgbox "Everything has been installed ! Please remember default port is 3001." 0 0 
and here the result

Code: Select all

pi@raspberrypi:~/domoticz/MyDomoAtHome$ ./run-once2.sh
Will update packages list first...
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
libdancer-perl is already the newest version.
libdancer2-perl is already the newest version.
libfile-slurp-perl is already the newest version.
liblwp-protocol-psgi-perl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'perl' instead of 'libtime-piece-perl'
libcrypt-ssleay-perl is already the newest version.
libdatetime-format-strptime-perl is already the newest version.
libdatetime-perl is already the newest version.
libjson-perl is already the newest version.
libplack-perl is already the newest version.
perl is already the newest version.
starman is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
libdbd-sqlite3-perl is already the newest version.
libdbi-perl is already the newest version.
sqlite3 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
libaudio-mpd-perl is already the newest version.
libnet-upnp-perl is already the newest version.
libpoe-component-client-mpd-perl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   314    0   314    0     0    283      0 --:--:--  0:00:01 --:--:--   287
100  296k  100  296k    0     0   159k      0  0:00:01  0:00:01 --:--:--  405k
App::cpanminus is up to date. (1.7040)
cpanm (App::cpanminus) 1.7040 on perl 5.020002 built for arm-linux-gnueabihf-thread-multi-64int
Work directory is /root/.cpanm/work/1457115373.16925
You have make /usr/bin/make
You have LWP 6.08
You have /bin/tar: tar (GNU tar) 1.27.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching Task::Plack () on cpanmetadb ...
--> Working on Task::Plack
Fetching http://www.cpan.org/authors/id/M/MI/MIYAGAWA/Task-Plack-0.28.tar.gz ... OK
Unpacking Task-Plack-0.28.tar.gz
Task-Plack-0.28/
Task-Plack-0.28/Build.PL
Task-Plack-0.28/Changes
Task-Plack-0.28/cpanfile
Task-Plack-0.28/dist.ini
Task-Plack-0.28/lib/
Task-Plack-0.28/LICENSE
Task-Plack-0.28/maint/
Task-Plack-0.28/MANIFEST
Task-Plack-0.28/META.json
Task-Plack-0.28/META.yml
Task-Plack-0.28/README
Task-Plack-0.28/t/
Task-Plack-0.28/xt/
Task-Plack-0.28/xt/perlcritic.t
Task-Plack-0.28/xt/pod.t
Task-Plack-0.28/xt/podspell.t
Task-Plack-0.28/xt/synopsis.t
Task-Plack-0.28/t/00_compile.t
Task-Plack-0.28/t/release-pod-syntax.t
Task-Plack-0.28/maint/bump.pl
Task-Plack-0.28/lib/Task/
Task-Plack-0.28/lib/Task/Plack.pm
Entering Task-Plack-0.28
Checking configure dependencies from META.json
Checking if you have Module::Build::Tiny 0.019 ... Yes (0.039)
Running Build.PL
Configuring Task-Plack-0.28 ... Creating new 'Build' script for 'Task-Plack' version '0.28'
OK
Checking dependencies from MYMETA.json ...
Checking if you have IO::Handle::Util 0.01 ... Yes (0.01)
Checking if you have Plack::Middleware::Debug 0.14 ... Yes (0.16)
Checking if you have FCGI::ProcManager 0.24 ... Yes (0.24)
Checking if you have Plack 1.0023 ... Yes (1.0033)
Checking if you have Starlet 0.18 ... No
Checking if you have Plack::Middleware::Auth::Digest 0.04 ... Yes (0.05)
Checking if you have Corona 0.1004 ... Yes (0.1004)
Checking if you have Plack::Middleware::Header 0.04 ... Yes (0.04)
Checking if you have Plack::Middleware::ReverseProxy 0.15 ... Yes (0.15)
Checking if you have PSGI 1.101 ... Yes (1.102)
Checking if you have HTTP::Server::Simple::PSGI 0.14 ... Yes (0.16)
Checking if you have Plack::Middleware::Session 0.18 ... Yes (0.30)
Checking if you have Twiggy 0.1021 ... Yes (0.1025)
Checking if you have Net::FastCGI 0.14 ... Yes (0.14)
Checking if you have Starman 0.3011 ... Yes (0.4010)
Checking if you have FCGI 0.74 ... Yes (0.77)
Checking if you have FCGI::Client 0.08 ... Yes (0.08)
Checking if you have Plack::Middleware::ConsoleLogger 0.04 ... Yes (0.05)
Checking if you have Plack::Middleware::Deflater 0.08 ... Yes (0.12)
Checking if you have Plack::App::Proxy 0.27 ... Yes (0.29)
Checking if you have CGI::PSGI 0.15 ... Yes (0.15)
Checking if you have CGI::Compile 0.16 ... Yes (0.17)
Checking if you have CGI::Emulate::PSGI 0.15 ... Yes (0.20)
==> Found dependencies: Starlet
Searching Starlet (0.18) on cpanmetadb ...
--> Working on Starlet
Fetching http://www.cpan.org/authors/id/K/KA/KAZUHO/Starlet-0.29.tar.gz ... OK
Unpacking Starlet-0.29.tar.gz
Starlet-0.29/
Starlet-0.29/.gitignore
Starlet-0.29/Changes
Starlet-0.29/inc/
Starlet-0.29/inc/Module/
Starlet-0.29/inc/Module/Install/
Starlet-0.29/inc/Module/Install/Base.pm
Starlet-0.29/inc/Module/Install/Can.pm
Starlet-0.29/inc/Module/Install/Fetch.pm
Starlet-0.29/inc/Module/Install/Makefile.pm
Starlet-0.29/inc/Module/Install/Metadata.pm
Starlet-0.29/inc/Module/Install/ReadmeFromPod.pm
Starlet-0.29/inc/Module/Install/Win32.pm
Starlet-0.29/inc/Module/Install/WriteAll.pm
Starlet-0.29/inc/Module/Install.pm
Starlet-0.29/lib/
Starlet-0.29/lib/Plack/
Starlet-0.29/lib/Plack/Handler/
Starlet-0.29/lib/Plack/Handler/Starlet.pm
Starlet-0.29/lib/Starlet/
Starlet-0.29/lib/Starlet/Server.pm
Starlet-0.29/lib/Starlet.pm
Starlet-0.29/Makefile.PL
Starlet-0.29/MANIFEST
Starlet-0.29/META.yml
Starlet-0.29/MYMETA.json
Starlet-0.29/MYMETA.yml
Starlet-0.29/README
Starlet-0.29/t/
Starlet-0.29/t/00base-hello.psgi
Starlet-0.29/t/00base.t
Starlet-0.29/t/01plack-test.t
Starlet-0.29/t/02graceful.t
Starlet-0.29/t/03post.t
Starlet-0.29/t/04-bumpy-life.t
Starlet-0.29/t/05server-header.t
Starlet-0.29/t/06harakiri.t
Starlet-0.29/t/07remote_port.t
Starlet-0.29/t/08chunked_req.t
Starlet-0.29/t/09chunked_zero_length.t
Starlet-0.29/t/10unix_domain_socket.t
Starlet-0.29/t/11multi-sockets.t
Starlet-0.29/t/12bad_request_line.t
Starlet-0.29/t/13spawn_interval.t
Starlet-0.29/t/assets/
Starlet-0.29/t/assets/baybridge.jpg
Entering Starlet-0.29
Checking configure dependencies from META.yml
Checking if you have ExtUtils::MakeMaker 6.59 ... Yes (6.98)
Running Makefile.PL
Configuring Starlet-0.29 ... Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Starlet
Writing MYMETA.yml and MYMETA.json
OK
Checking dependencies from MYMETA.json ...
Checking if you have Plack 0.992 ... Yes (1.0033)
Checking if you have Parallel::Prefork 0.17 ... Yes (0.18)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.98)
Checking if you have Test::More 0.88 ... Yes (1.001002)
Checking if you have Server::Starter 0.06 ... Yes (0.17)
Checking if you have LWP::UserAgent 5.8 ... Yes (6.06)
Checking if you have Test::TCP 2.1 ... Yes (2.14)
Building and testing Starlet-0.29 ... cp lib/Plack/Handler/Starlet.pm blib/lib/Plack/Handler/Starlet.pm
cp lib/Starlet/Server.pm blib/lib/Starlet/Server.pm
cp lib/Starlet.pm blib/lib/Starlet.pm
Manifying blib/man3/Starlet.3pm
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t
t/00base.t ................. 2/?
#   Failed test 'request successfull'
#   at t/00base.t line 49.
t/00base.t ................. 3/?
#   Failed test 'content is hello'
#   at t/00base.t line 50.
#          got: 'Can't connect to 127.0.0.1:50364
#
# Connection refused at /usr/share/perl5/LWP/Protocol/http.pm line 49.
# '
#     expected: 'hello'
# Looks like you failed 2 tests of 3.
t/00base.t ................. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/3 subtests
t/01plack-test.t ........... ok
t/02graceful.t ............. 18036 at t/02graceful.t line 11.
18036 at t/02graceful.t line 30.
18110 at t/02graceful.t line 16.
t/02graceful.t ............. ok
t/03post.t ................. 18154 at t/03post.t line 9.
Plack::Handler::Starlet: Accepting connections at http://0:50646/
127.0.0.1 - - [04/Mar/2016:18:19:07 +0000] "POST / HTTP/1.1" 200 3 "-" "libwww-perl/6.08"
t/03post.t ................. ok
t/04-bumpy-life.t .......... ok
t/05server-header.t ........ ok
t/06harakiri.t ............. ok
t/07remote_port.t .......... ok
t/08chunked_req.t .......... ok
t/09chunked_zero_length.t .. ok
t/10unix_domain_socket.t ... failed to listen to socket /tmp/B7bs9bOXhw:No such file or directory at t/10unix_domain_socket.t line 35.
    # Child (direct) exited without calling finalize()
t/10unix_domain_socket.t ... 1/?
#   Failed test 'direct'
#   at /usr/share/perl/5.20/Test/Builder.pm line 276.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 2 just after 1.

on this line # Looks like your test exited with 2 just after 1. newer finish

I try step by step of the script.

But when I try start

Code: Select all

sudo service MyDomoAtHome.sh start
when test it

Code: Select all

http://192.168.3.125:3001/devices
not working

Nevertheless when start

Code: Select all

start2.sh
works

Re: [MyDomoAtHome] Support thread

Posted: Friday 04 March 2016 21:56
by epierre
@lowca is it there:

viewtopic.php?f=21&t=8951

Re: [MyDomoAtHome] Support thread

Posted: Friday 04 March 2016 21:58
by epierre
aleceuta wrote: I try now fresh install of MyDomoAtHome on preconfigured SD with Domoticz 3.4834 for raspberry

I follow the wiki tutorial https://www.domoticz.com/wiki/ImperiHome
I have problem with sh ./run-once.sh never finish
I created any modificate script run-once2.sh that include 2 lines in verbose mode

on this line # Looks like your test exited with 2 just after 1. newer finish
not mine, but it seems package maintainer has some issues... and so people there... this is why I'm rewriting it in nodeJS
aleceuta wrote: I try step by step of the script.

But when I try start

Code: Select all

sudo service MyDomoAtHome.sh start
when test it

Code: Select all

http://192.168.3.125:3001/devices
not working

Nevertheless when start

Code: Select all

start2.sh
works
try:

service mydomoathome start

and then:

service mydomoathome status

to see the system status

Re: [MyDomoAtHome] Support thread

Posted: Saturday 05 March 2016 15:29
by epierre
Hello,

need some testers here:

viewtopic.php?f=21&t=8951

mostly on blinds and docker, please send me your email either pm or [email protected]

Re: [MyDomoAtHome] Support thread

Posted: Saturday 05 March 2016 16:23
by epierre
lowca wrote:Hello..
I'm trying to run Counter Incremental .,
It looks like it worked:.

Code: Select all

if (($f->{"Type"} eq "General") and ($f->{"SubType"} eq "Counter Incremental"))  {

In debug("CounterToday:$v\n"); have [hit #91]CounterToday:1.463 ImpireHome show 1. Not showing numbers after decimal.
My question is how can i do that , or is it on Imperihome side ..[/quote]

@lowca I did it in the new version in nodeJS, this is not that simple, 4 types, 4 fixed units and one dynamic... 

I need more testers but now only graphs are now missing, all new and updated devices are here

Re: [MyDomoAtHome] Support thread

Posted: Saturday 05 March 2016 17:56
by lowca
epierre wrote: @lowca I did it in the new version in nodeJS, this is not that simple, 4 types, 4 fixed units and one dynamic...
I need more testers but now only graphs are now missing, all new and updated devices are here
Ok. later i will install node js version and make some test .. 8-)
update:
Node version: 4.3.2
MDAH version: 0.0.19

in Imerihome Counter Incremental show N/A
console.log(res[1]); show good value , total and usage.. need some more time to get deeper in nodejs version .. ;)

update:
On my other pi system same node and mdah version , showing good values .. hmm,.

Re: [MyDomoAtHome] Support thread

Posted: Monday 07 March 2016 13:35
by aleceuta
When I test

Code: Select all

sudo service MyDomoAtHome.sh status
say is failed not working.

Re: [MyDomoAtHome] Support thread

Posted: Monday 07 March 2016 13:37
by aleceuta
Is not possible generate any log´s to see the problem.

Re: [MyDomoAtHome] Support thread

Posted: Monday 07 March 2016 14:22
by lowca
epierre wrote:
@lowca I did it in the new version in nodeJS, this is not that simple, 4 types, 4 fixed units and one dynamic...
I need more testers but now only graphs are now missing, all new and updated devices are here
Problem is in { key: 'Watts', value: '6.791 kWh', unit: undefined },
For test i remove kWh from usage varible ,and static unit "kWh" it shows in watts.

Code: Select all

usage = usage.substr(0, usage.length-3); 
        console.log(usage);
Method is not the best, but its working now .,

Re: [MyDomoAtHome] Support thread

Posted: Monday 07 March 2016 19:54
by lowca
aleceuta wrote:Is not possible generate any log´s to see the problem.
Try to start manualy ,, In Your MyDomoAtHome directory try to run start2.sh

Code: Select all

pi@raspberrypi:~/domoticz/MyDomoAtHome $ sh ./start2.sh

Re: [MyDomoAtHome] Support thread

Posted: Tuesday 08 March 2016 12:45
by aleceuta
Yes lowca at moment start with ./start2.sh

But not is good solution. I want start as service.

Re: [MyDomoAtHome] Support thread

Posted: Tuesday 08 March 2016 12:56
by lowca
Try: sudo /etc/init.d/MyDomoAtHome.sh start
and send as output ..

Re: [MyDomoAtHome] Support thread

Posted: Wednesday 09 March 2016 11:41
by hendrik6073
used search cannot find anything on this issue

i added 8 test dummy tekst devices. i use them to post the heater thermostat schedule information . I want to display the devices using ImperiHome.
In ImperiHome the dummy text devices are not visible (http://imperihome:5001/devices) ? should i do some extra ?

thanks

Re: [MyDomoAtHome] Support thread

Posted: Sunday 13 March 2016 18:28
by rafal
Hello everybody,
I have Domoticz v3.4834 by Jadahl on NAS Synology and i installed docker on nas with MyDomoAtHome to connect imperihome on samsung android.

my domoticz on nas is on 192.168.0.11:8084, so i try connect but i have different range ip:

MyDomoAtHome Dev
MDAH: http://172.17.0.11:3002
MDAH ver: 0.0.23
Domoticz: http://127.0.0.1:8080
NodeJS: v4.3.0
Webmanager: EJS
Renderer: Express

how i can change domoticz http for 192.168.0.11:8084???
i conected from my phone to the gatway but i'cant see any sensors :(
Is it possible to connect MyDomotAtHome in any different way expect raspberry pi?? for example:

Domoticz on windows --any "system" with gate ---imperihome or
Domoticz on NAS --- any "system" with gate(like docker) ---imperihome

https://drive.google.com/file/d/0B5vmlS ... sp=sharing
https://drive.google.com/file/d/0B5vmlS ... sp=sharing

Thank You for any anwer and help

Re: [MyDomoAtHome] Support thread

Posted: Sunday 13 March 2016 18:54
by epierre
aleceuta wrote:When I test

Code: Select all

sudo service MyDomoAtHome.sh status
say is failed not working.

Code: Select all

sudo service MyDomoAtHome status

Re: [MyDomoAtHome] Support thread

Posted: Sunday 13 March 2016 18:55
by epierre
hendrik6073 wrote:used search cannot find anything on this issue

i added 8 test dummy tekst devices. i use them to post the heater thermostat schedule information . I want to display the devices using ImperiHome.
In ImperiHome the dummy text devices are not visible (http://imperihome:5001/devices) ? should i do some extra ?
can you send me the output of your http://192.168.0.xx:8080/json.htm?type= ... order=Name

Re: [MyDomoAtHome] Support thread

Posted: Sunday 13 March 2016 18:58
by epierre
rafal wrote:Hello everybody,
I have Domoticz v3.4834 by Jadahl on NAS Synology and i installed docker on nas with MyDomoAtHome to connect imperihome on samsung android.

my domoticz on nas is on 192.168.0.11:8084, so i try connect but i have different range ip:

MyDomoAtHome Dev
MDAH: http://172.17.0.11:3002
MDAH ver: 0.0.23
Domoticz: http://127.0.0.1:8080
NodeJS: v4.3.0
Webmanager: EJS
Renderer: Express

how i can change domoticz http for 192.168.0.11:8084???
i conected from my phone to the gatway but i'cant see any sensors :(
Is it possible to connect MyDomotAtHome in any different way expect raspberry pi?? for example:

Domoticz on windows --any "system" with gate ---imperihome or
Domoticz on NAS --- any "system" with gate(like docker) ---imperihome

https://drive.google.com/file/d/0B5vmlS ... sp=sharing
https://drive.google.com/file/d/0B5vmlS ... sp=sharing

Thank You for any anwer and help
Normally this should start as :
docker run --name=mdah --env DOMO="http://your_ip:8080" -it --rm -p 3002:3002 epierre/mdah

the environment variable would change the IP/PORT in the DOMO variable, and if you want to use something different as port 3002 you could change -p 3002:your_port

If you can't change environment, can you "mount" the image and modify in it /etc/mydomoathome/config.json ?

Re: [MyDomoAtHome] Support thread

Posted: Sunday 13 March 2016 20:08
by rafal
"Remember to change the IP below and authorize in Domoticz the docker IP range
docker run --name=mdah --env DOMO="http://your_ip:8080" -it --rm -p 3002:3002 epierre/mdah"

i did same way with instrukction on github and you container is added but when i try switching on and i had error:

https://drive.google.com/file/d/0B5vmlS ... sp=sharing
https://drive.google.com/file/d/0B5vmlS ... sp=sharing
https://drive.google.com/file/d/0B5vmlS ... sp=sharing

meybe i doing something wrong...??

i do not think i using port 3002 for something else.
how to i can modifay it /etc/mydomoathome/config.json ? in docker is terminal bash? i newbie on linux bash etc anyway when i config manually

and config ip and domoticz port i have error:
https://drive.google.com/file/d/0B5vmlS ... sp=sharing

i know is terminal in docker but i dont't know how to use it :

https://drive.google.com/file/d/0B5vmlS ... sp=sharing

Thank You for help
Rafal

Re: [MyDomoAtHome] Support thread

Posted: Sunday 13 March 2016 21:00
by rafal
second question how i can use these commands in docker on synology????:

Check running docker processes

docker ps
Stoping a docker process

docker stop mdah