[MyDomoAtHome] Support thread

Client tools or tools that can connect with Domoticz. Tools for Windows, iOS, Android, Linux etc.

Moderator: leecollings

lrybak
Posts: 40
Joined: Thursday 18 December 2014 20:12
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Poland
Contact:

Re: [MyDomoAtHome] Support thread

Post by lrybak »

Hi Guys,
I did mdah update on my test pi. Indeed had the same behaviour as you mentioned.

Try to find and kill ALL mdah fork processes, by using following cmd ex.
sudo kill -9 `ps -ef |grep tarman |awk '{print $2}'`

then remove pid file:
sudo rm /var/run/MyDomoAtHome.pid

And check once again.

Hope it helps
HW: HP dc7900 USD running ESXi, RaspberryPi (few of it), AEON S2 USB stick, Fibaro modules (Dimmers, switches), 1-wire (DS18B20, DS2423), DSC Alarm with Envisalink ethernet module, MySensors, RFLink
lrybak
Posts: 40
Joined: Thursday 18 December 2014 20:12
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Poland
Contact:

Re: [MyDomoAtHome] Support thread

Post by lrybak »

Doler wrote:Another question: is MDAH compatible with Debian-Jessie?
It works for me on Debian 7.8 and 8.0
HW: HP dc7900 USD running ESXi, RaspberryPi (few of it), AEON S2 USB stick, Fibaro modules (Dimmers, switches), 1-wire (DS18B20, DS2423), DSC Alarm with Envisalink ethernet module, MySensors, RFLink
Gabe
Posts: 44
Joined: Wednesday 17 February 2016 21:34
Target OS: -
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by Gabe »

Hi Irybak,

thanks for helping. I can start now the service and it say ok, but when I stop it it says "kill 3615: No such process, start-stop-deamon:warning: failed to kill 3615:No such porocess"

Also connecting through brower after start not function

rgds
lrybak
Posts: 40
Joined: Thursday 18 December 2014 20:12
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Poland
Contact:

Re: [MyDomoAtHome] Support thread

Post by lrybak »

Hi,
1) please post process list:

Code: Select all

sudo ps -ef |grep [s]tarman
2) check if you have current version of init.d script, please post output of command

Code: Select all

wget https://raw.githubusercontent.com/empierre/MyDomoAtHome/master/MyDomoAtHome.sh -O /tmp/MDH.sh > /dev/null 2>&1 && diff /etc/init.d/MyDomoAtHome.sh /tmp/MDH.sh && rm /tmp/MDH.sh
HW: HP dc7900 USD running ESXi, RaspberryPi (few of it), AEON S2 USB stick, Fibaro modules (Dimmers, switches), 1-wire (DS18B20, DS2423), DSC Alarm with Envisalink ethernet module, MySensors, RFLink
Gabe
Posts: 44
Joined: Wednesday 17 February 2016 21:34
Target OS: -
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by Gabe »

Hi Irybak,

I get no results if I put sudo ps -ef |grep tarman in my terminal.

Other I check situation still the same
lrybak
Posts: 40
Joined: Thursday 18 December 2014 20:12
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Poland
Contact:

Re: [MyDomoAtHome] Support thread

Post by lrybak »

check if your init.d script is up to date - please post output of 2nd cmd
HW: HP dc7900 USD running ESXi, RaspberryPi (few of it), AEON S2 USB stick, Fibaro modules (Dimmers, switches), 1-wire (DS18B20, DS2423), DSC Alarm with Envisalink ethernet module, MySensors, RFLink
Doler
Posts: 142
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

Re: [MyDomoAtHome] Support thread

Post by Doler »

Hello Irybak,
Same result as Gabe: no starman process. From your second check I discovered a difference between MyDomoAtHome.sh in init.d and the MDAH directory. The first (original/older) user /var/tmp for the pid-file while the new one uses /var/run (at least that was the most obvious difference).
I replaced the MyDomoAtHome.sh in init.d with the new one (chmod +x, update-rc.d) but not with positive result. I see the pid-file in /var/run, it even holds a process number but that process doesn't exist. So I'm stuck here. But thanks for your efforts in helping us.
Mark
Mark: Domoticz Beta on Raspberry Pi 4 running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - MySensors - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (plugin) - Zwave-js-ui - dzVents - Nodered
Gabe
Posts: 44
Joined: Wednesday 17 February 2016 21:34
Target OS: -
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by Gabe »

just update init.d too, but no futher sucess
lrybak
Posts: 40
Joined: Thursday 18 December 2014 20:12
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Poland
Contact:

Re: [MyDomoAtHome] Support thread

Post by lrybak »

Strange.

I already updated my PROD MDAH instance running Debian Jessie 8.0 without issues, please see my full output below

Spoiler: show

Code: Select all

pi@pi2 ~/domoticz $ cp -pr MyDomoAtHome MyDomoAtHome.2016-02-19
pi@pi2 ~/domoticz $ cp -pr /etc/init.d/MyDomoAtHome.sh MyDomoAtHome.sh.2016-02-19
pi@pi2 ~/domoticz/MyDomoAtHome $ ./update-mdah.sh
Stoping MyDomoAtHome service...
Retrieving latest code...
error: cannot open .git/FETCH_HEAD: Permission denied

Setting directories rights...
Checking latest libraries dependencies...
Reading package lists... Done
Building dependency tree
Reading state information... Done
cpanminus is already the newest version.
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.
whiptail is already the newest version.
The following packages were automatically installed and are no longer required:
  python-django-common python-sqlparse
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 128 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-perl is already the newest version.
libjson-perl is already the newest version.
libplack-perl is already the newest version.
libswitch-perl is already the newest version.
starman is already the newest version.
The following packages were automatically installed and are no longer required:
  python-django-common python-sqlparse
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  perl-base perl-modules
Suggested packages:
  perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl libb-lint-perl libcpanplus-dist-build-perl libcpanplus-perl libfile-checktree-perl libobject-accessor-perl
The following packages will be upgraded:
  perl perl-base perl-modules
3 upgraded, 0 newly installed, 0 to remove and 125 not upgraded.
Need to get 5,697 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://piotrkosoft.net/pub/mirrors/raspbian/raspbian/ jessie/main perl armhf 5.20.2-3+deb8u3 [2,055 kB]
Get:2 http://piotrkosoft.net/pub/mirrors/raspbian/raspbian/ jessie/main perl-base armhf 5.20.2-3+deb8u3 [1,097 kB]
Get:3 http://piotrkosoft.net/pub/mirrors/raspbian/raspbian/ jessie/main perl-modules all 5.20.2-3+deb8u3 [2,545 kB]
Fetched 5,697 kB in 6s (849 kB/s)
(Reading database ... 74780 files and directories currently installed.)
Preparing to unpack .../perl_5.20.2-3+deb8u3_armhf.deb ...
Unpacking perl (5.20.2-3+deb8u3) over (5.20.2-3+deb8u1) ...
Preparing to unpack .../perl-base_5.20.2-3+deb8u3_armhf.deb ...
Unpacking perl-base (5.20.2-3+deb8u3) over (5.20.2-3+deb8u1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up perl-base (5.20.2-3+deb8u3) ...
(Reading database ... 74780 files and directories currently installed.)
Preparing to unpack .../perl-modules_5.20.2-3+deb8u3_all.deb ...
Unpacking perl-modules (5.20.2-3+deb8u3) over (5.20.2-3+deb8u1) ...
Setting up perl-modules (5.20.2-3+deb8u3) ...
Setting up perl (5.20.2-3+deb8u3) ...
./update-mdah.sh: 30: ./update-mdah.sh: ./speedUP.sh: not found
--> Working on Time::Moment
Fetching http://www.cpan.org/authors/id/C/CH/CHANSEN/Time-Moment-0.38.tar.gz ... OK
Configuring Time-Moment-0.38 ... OK
==> Found dependencies: Test::Requires
--> Working on Test::Requires
Fetching http://www.cpan.org/authors/id/T/TO/TOKUHIROM/Test-Requires-0.10.tar.gz ... OK
Configuring Test-Requires-0.10 ... OK
Building and testing Test-Requires-0.10 ... OK
Successfully installed Test-Requires-0.10
Building and testing Time-Moment-0.38 ...
Successfully installed Time-Moment-0.38 (upgraded from 0.36)
2 distributions installed
Restarting MyDomoAtHome service...
Update path finished
pi@pi2 ~/domoticz/MyDomoAtHome $ ps -ef |grep [s]tarman
www-data 17004     1  5 21:36 ?        00:00:09 starman master
www-data 17075 17004  0 21:36 ?        00:00:01 starman worker
www-data 17076 17004  1 21:36 ?        00:00:01 starman worker
www-data 17077 17004  0 21:36 ?        00:00:01 starman worker
www-data 17078 17004  1 21:36 ?        00:00:01 starman worker
pi@pi2 ~/domoticz/MyDomoAtHome $ sudo kill -9 17004
pi@pi2 ~/domoticz/MyDomoAtHome $ sudo /etc/init.d/MyDomoAtHome.sh stop
[ ok ] Stopping MyDomoAtHome.sh (via systemctl): MyDomoAtHome.service.
pi@pi2 ~/domoticz/MyDomoAtHome $ ps -ef |grep [s]tarman
pi@pi2 ~/domoticz/MyDomoAtHome $ ps -ef |grep [s]tarman
[after couple of seconds]
pi@pi2 ~/domoticz/MyDomoAtHome $ ps -ef |grep [s]tarman
www-data 19179     1 92 21:42 ?        00:00:08 starman master
www-data 19207 19179  1 21:42 ?        00:00:00 starman worker
www-data 19208 19179  0 21:42 ?        00:00:00 starman worker
www-data 19209 19179  1 21:42 ?        00:00:00 starman worker
www-data 19210 19179  0 21:42 ?        00:00:00 starman worker

pi@pi2 ~/domoticz/MyDomoAtHome $ sudo wget https://raw.githubusercontent.com/empierre/MyDomoAtHome/master/MyDomoAtHome.sh -O /etc/init.d/MyDomoAtHome.sh
--2016-02-19 21:50:04--  https://raw.githubusercontent.com/empierre/MyDomoAtHome/master/MyDomoAtHome.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.31.17.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.31.17.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2286 (2.2K) [text/plain]
Saving to: ‘/etc/init.d/MyDomoAtHome.sh’

/etc/init.d/MyDomoAtHome.sh             100%[==============================================================================>]   2.23K  --.-KB/s   in 0s

2016-02-19 21:50:04 (5.49 MB/s) - ‘/etc/init.d/MyDomoAtHome.sh’ saved [2286/2286]


pi@pi2 ~/domoticz/MyDomoAtHome $ cd /etc/init.d/
pi@pi2 /etc/init.d $ sudo chmod +x ./MyDomoAtHome.sh && sudo update-rc.d MyDomoAtHome.sh defaults
insserv: Starting monit depends on MyDomoAtHome.sh and therefore on system facility `$all' which can not be true!
insserv: Starting monit depends on MyDomoAtHome.sh and therefore on system facility `$all' which can not be true!
insserv: Starting monit depends on MyDomoAtHome.sh and therefore on system facility `$all' which can not be true!
insserv: Starting monit depends on MyDomoAtHome.sh and therefore on system facility `$all' which can not be true!


pi@pi2 /etc/init.d $ cat /etc/init.d/MyDomoAtHome.sh |grep Required-
# Required-Start:    $all
# Required-Stop:     $all

[changed only Required-Start and Required-Stop to fit my needs (monit daemon requirements)]
pi@pi2 /etc/init.d $ sudo vi /etc/init.d/MyDomoAtHome.sh

pi@pi2 /etc/init.d $ cat /etc/init.d/MyDomoAtHome.sh |grep Required-
# Required-Start:    $local_fs $network $named $time $syslog
# Required-Stop:     $local_fs $network $named $time $syslog

pi@pi2 /etc/init.d $ ps -ef |grep [s]tarman
www-data 19179     1  1 21:42 ?        00:00:08 starman master
www-data 19207 19179  0 21:42 ?        00:00:06 starman worker
www-data 19208 19179  0 21:42 ?        00:00:05 starman worker
www-data 19209 19179  0 21:42 ?        00:00:05 starman worker
www-data 19210 19179  0 21:42 ?        00:00:05 starman worker
pi@pi2 /etc/init.d $ sudo /etc/init.d/MyDomoAtHome.sh stop
[ ok ] Stopping MyDomoAtHome.sh (via systemctl): MyDomoAtHome.service.
pi@pi2 /etc/init.d $ ps -ef |grep [s]tarman
pi@pi2 /etc/init.d $ sudo /etc/init.d/MyDomoAtHome.sh start
[ ok ] Starting MyDomoAtHome.sh (via systemctl): MyDomoAtHome.service.
pi@pi2 /etc/init.d $ ps -ef |grep [s]tarman
pi@pi2 /etc/init.d $ ps -ef |grep [s]tarman
pi@pi2 /etc/init.d $ ps -ef |grep [s]tarman
www-data 23574     1 95 21:57 ?        00:00:08 starman master
www-data 23652 23574  0 21:57 ?        00:00:00 starman worker
www-data 23653 23574  1 21:57 ?        00:00:00 starman worker
www-data 23654 23574  0 21:57 ?        00:00:00 starman worker
www-data 23655 23574  0 21:57 ?        00:00:00 starman worker
pi@pi2 /etc/init.d $ cat /etc/debian_version
8.0
HW: HP dc7900 USD running ESXi, RaspberryPi (few of it), AEON S2 USB stick, Fibaro modules (Dimmers, switches), 1-wire (DS18B20, DS2423), DSC Alarm with Envisalink ethernet module, MySensors, RFLink
Gabe
Posts: 44
Joined: Wednesday 17 February 2016 21:34
Target OS: -
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by Gabe »

this is my outpute

Stoping MyDomoAtHome service...
[....] Stopping plack server: MyDomoAtHomestart-stop-daemon: warning: failed to kill 4179: No such process
start-stop-daemon: warning: failed to kill 4179: No such process
failed!
Retrieving latest code...
error: cannot open .git/FETCH_HEAD: Permission denied

Checking latest libraries dependencies...
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.
whiptail is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'perl' instead of 'libtime-piece-perl'
E: Unable to locate package libdancer2-perl
Restarting MyDomoAtHome service...
[ ok ] Starting plack server: MyDomoAtHome.
Update path finished
[ ok ] MyDomoAtHome process is running.
Doler
Posts: 142
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

Re: [MyDomoAtHome] Support thread

Post by Doler »

lrybak wrote:Strange.

I already updated my PROD MDAH instance running Debian Jessie 8.0 without issues, please see my full output below
Sorry that I possibly put you on the wrong path. I'm still at Wheezy but was trying to migrate to Jessie this afternoon. Just got inot some trouble with Fibaro motion sensors so I had to revert back (only got one RPI). So the problems I have are on Wheezy, didn't try it yet on Jessie so therefore my question on compatibility. But the given info is very welcome and I'll give it a try on Jessie. Just have to wait till next week (upcoming birthday :P ) when I have more time. Again thanks.
Mark
Mark: Domoticz Beta on Raspberry Pi 4 running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - MySensors - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (plugin) - Zwave-js-ui - dzVents - Nodered
Gabe
Posts: 44
Joined: Wednesday 17 February 2016 21:34
Target OS: -
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by Gabe »

maybe this is the solution I have also Wheezy from standard Domoticz installation. Hi I must migrate from wheezy to Jessie without loosing all setting of Domoticz
lrybak
Posts: 40
Joined: Thursday 18 December 2014 20:12
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Poland
Contact:

Re: [MyDomoAtHome] Support thread

Post by lrybak »

My test pi runs on Debian Wheezy (7.8) - I don't think this is an issue.
Maybe epierre will help you
HW: HP dc7900 USD running ESXi, RaspberryPi (few of it), AEON S2 USB stick, Fibaro modules (Dimmers, switches), 1-wire (DS18B20, DS2423), DSC Alarm with Envisalink ethernet module, MySensors, RFLink
User avatar
epierre
Posts: 522
Joined: Wednesday 05 March 2014 13:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: [MyDomoAtHome] Support thread

Post by epierre »

@doler what was the previous version number/date ? last modification is 4 months old

for all, to manually kill the process, you have to find the Starman master pid
Last edited by epierre on Monday 22 February 2016 11:01, edited 1 time in total.
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter
User avatar
epierre
Posts: 522
Joined: Wednesday 05 March 2014 13:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: [MyDomoAtHome] Support thread

Post by epierre »

Gabe wrote:maybe this is the solution I have also Wheezy from standard Domoticz installation. Hi I must migrate from wheezy to Jessie without loosing all setting of Domoticz
by design all domoticz settings except scripts are in domoticz.db so backup it often !

@gabe who is the owner of either:

ls -la /var/run/MyDomoAtHome.pid
ls -la /var/tmp/MyDomoAtHome.pid

starting the script as pi or root may add a file with wrong rights, so you have to remove it and let the system start/stop it.

what gives you '/etc/init.d/MyDomoAtHome.sh status' ?
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter
Doler
Posts: 142
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

Re: [MyDomoAtHome] Support thread

Post by Doler »

epierre wrote:@doler what was the previous version number/date ? last modification is 4 months old

for all, to manually kill the process, you have to find the Starman master pid
The package.json (09-09-2015) in the MDAH directory tells me it's version 0.12. I see more recent files though, like run-once.sh that is dated 05-02-2016.
The problem that I meet is that, after upgrading, there is no Starman master pid: the service just doesn't start.
Thanks, Mark
Mark: Domoticz Beta on Raspberry Pi 4 running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - MySensors - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (plugin) - Zwave-js-ui - dzVents - Nodered
User avatar
epierre
Posts: 522
Joined: Wednesday 05 March 2014 13:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: [MyDomoAtHome] Support thread

Post by epierre »

@doler try start2.sh as pi user to see if all libs dependencies are ok

The best for me would be to know the MyDomoAtHome.sh date in /etc/inin.d and in your MDAH directory so I could know when it work and when it doesn't... maybe a diff would be enough
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter
Doler
Posts: 142
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

Re: [MyDomoAtHome] Support thread

Post by Doler »

epierre wrote:@doler try start2.sh as pi user to see if all libs dependencies are ok

The best for me would be to know the MyDomoAtHome.sh date in /etc/inin.d and in your MDAH directory so I could know when it work and when it doesn't... maybe a diff would be enough
Output of start2.sh:
Spoiler: show
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/local/share/perl/5.14.2/YAML/Mo.pm line 24, <$IN> line 1.
YAML::Mo::__ANON__(YAML::Loader=HASH(0x125e448), "YAML_LOAD_WARN_DUPLICATE_KEY") called at /usr/local/share/perl/5.14.2/YAML/Loader.pm line 356
YAML::Loader::_parse_mapping(YAML::Loader=HASH(0x125e448), "") called at /usr/local/share/perl/5.14.2/YAML/Loader.pm line 165
YAML::Loader::_parse_node(YAML::Loader=HASH(0x125e448)) called at /usr/local/share/perl/5.14.2/YAML/Loader.pm line 100
YAML::Loader::_parse(YAML::Loader=HASH(0x125e448)) called at /usr/local/share/perl/5.14.2/YAML/Loader.pm line 24
YAML::Loader::load(YAML::Loader=HASH(0x125e448), "# appdir/environments/development.yml\x{a}# configuration file fo"...) called at /usr/local/share/perl/5.14.2/YAML.pm line 33
YAML::Load("# appdir/environments/development.yml\x{a}# configuration file fo"...) called at /usr/local/share/perl/5.14.2/YAML.pm line 74
YAML::LoadFile("/home/pi/domoticz/MyDomoAtHome/environments/development.yml") called at /usr/share/perl5/Dancer/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 10) 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/Plack/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(0xad4dd0), CODE(0xb6be90)) called at /usr/local/share/perl/5.14.2/Plack/Runner.pm line 274
Plack::Runner::run(Plack::Runner=HASH(0x9b33a0)) called at /usr/local/bin/plackup line 7
environment:development
log:core
logger:console
domoticz:http://192.168.2.202:8080
[20598] core @0.000052> PLACK_ENV is set (development) forcing PSGI handler in /usr/share/perl5/Dancer/Handler.pm l. 31
[20598] core @0.007802> loading Dancer::Handler::PSGI handler in /usr/share/perl5/Dancer/Handler.pm l. 45
[20598] core @0.077914> loading handler 'Dancer::Handler::PSGI' in /usr/share/perl5/Dancer.pm l. 464
2016/02/22-12:31:09 Starman::Server (type Net::Server::PreFork) starting! pid(20598)
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/share/perl5/Net/Server/Proto.pm line 133.
Binding to TCP port 3001 on host 0.0.0.0 with IPv4
2016/02/22-12:31:09 Can't connect to TCP port 3001 on 0.0.0.0 [Address already in use]
at line 67 in file /usr/share/perl5/Net/Server/Proto/TCP.pm
2016/02/22-12:31:09 Received QUIT. Running a graceful shutdown
Use of uninitialized value in subtraction (-) at /usr/share/perl5/Net/Server/PreFork.pm line 355.
Use of uninitialized value in subtraction (-) at /usr/share/perl5/Net/Server/PreFork.pm line 385.
Use of uninitialized value in subtraction (-) at /usr/share/perl5/Net/Server/PreFork.pm line 405.
Use of uninitialized value in subtraction (-) at /usr/share/perl5/Net/Server/PreFork.pm line 413.
2016/02/22-12:31:09 Worker processes cleaned up
2016/02/22-12:31:09 Server closing!
shutdown() on closed socket GEN1 at /usr/lib/perl/5.14/IO/Socket.pm line 294.
Output of diff /etc/init.d/MyDomoAtHome.sh ~/domoticz/MyDomoAtHome/MyDomoAtHome.sh
Spoiler: show
pi@raspberrypi ~/domoticz/MyDomoAtHome $ diff /etc/init.d/MyDomoAtHome.sh ~/domoticz/MyDomoAtHome/MyDomoAtHome.sh
14c14,18
< PATH=/bin:/usr/bin:/sbin:/usr/sbin:
---
> # CHANGE TO YOUR PATH HERE
> APP_DIR="/home/pi/domoticz/"
> PORT=3001
> # DO NOT CHANGE BELOW
> PATH=/bin:/usr/bin:/sbin:/usr/sbin:$HOME/perl5/bin
16a21,25
> PIDFILE=/var/run/$NAME.pid
>
> USER=www-data
> GROUP=www-data
>
20,23c29
< OPTIONS="-E production -s Starman --workers=4 -p 3001 -a /home/pi/domoticz/MyDomoAtHome/bin/app.pl --pid /tmp/mydomoathome.pid" # CHANGE TO YOUR PATH HERE
<
< # PIDFILE="$NAME.pid"
< PIDFILE="/tmp/mydomoathome.pid"
---
> OPTIONS="-E production -s Starman --workers=4 --user $USER --group $GROUP --port $PORT -a $APP_DIR/MyDomoAtHome/bin/app.pl"
85c91
< if [ "$SIGNAL" = "KILL" ]; then
---
> if [ "$SIGNAL" = "KILL" ] || [ "$SIGNAL" = "TERM" ]; then
119c125,127
<
---
> status)
> status_of_proc -p $PIDFILE $DAEMON "$NAME process" && exit 0 || exit $?
> ;;
121c129
< echo "Usage: /etc/init.d/$NAME {start|force-start|stop|force-stop|reload|restart|force-reload}"
---
> echo "Usage: /etc/init.d/$NAME {start|force-start|stop|status|force-stop|reload|restart|force-reload}"
This is for the current (working) version.
Mark
Mark: Domoticz Beta on Raspberry Pi 4 running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - MySensors - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (plugin) - Zwave-js-ui - dzVents - Nodered
User avatar
epierre
Posts: 522
Joined: Wednesday 05 March 2014 13:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: [MyDomoAtHome] Support thread

Post by epierre »

@doler "Can't connect to TCP port 3001 on 0.0.0.0 [Address already in use]", you need to kill the starman master before starting it, it seems it is already running which is good !

can you send me the MyDomoAtHome.sh version that works for you so I shall make a regression till I find what is wrong ? [email protected]

I've restarted working on nodejs version yesterday, all statuses are good, switches also working, will follow on this in parallel now. I'll investigate on graphes as some reported on both at the same time.
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter
Doler
Posts: 142
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

Re: [MyDomoAtHome] Support thread

Post by Doler »

epierre wrote:@doler "Can't connect to TCP port 3001 on 0.0.0.0 [Address already in use]", you need to kill the starman master before starting it, it seems it is already running which is good !

can you send me the MyDomoAtHome.sh version that works for you so I shall make a regression till I find what is wrong ? [email protected]

I've restarted working on nodejs version yesterday, all statuses are good, switches also working, will follow on this in parallel now. I'll investigate on graphes as some reported on both at the same time.
Yes, it's running :), it is the working version. I've sent you the MyDomoAtHome.sh file. I could also try a clean install to see if that works.
I'd be interested in the nodejs version, I have node version 5.3 running for my Nefit interface. If you need some testing to do, I can help.
Thanks, Mark
Mark: Domoticz Beta on Raspberry Pi 4 running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - MySensors - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (plugin) - Zwave-js-ui - dzVents - Nodered
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest