Page 48 of 55

Re: [MyDomoAtHome] Support thread

Posted: Thursday 07 June 2018 13:27
by mcwieger
Don't have a clue...

It was stable, but after updating to DSM 6.1.7 and MDAH 0.2.39, it's not anymore. Do you recall what you changed when you resolved the issue mentioned above?

Re: [MyDomoAtHome] Support thread

Posted: Thursday 07 June 2018 13:52
by epierre
not that part of code, I just did add a test on one device type...

Re: [MyDomoAtHome] Support thread

Posted: Monday 18 June 2018 9:10
by mcwieger
Hi Emmanuel, I think I found the cause for the 'Unexpected end of input' error. I found out that one of my children had removed a z-wave dimmer from the socket (one I don't use very often). After I plugged it in again, MDAH has been up for several days again. The device that was removed is on my Imperihome dashboard.

My hypothesis: Imperihome or MDAH is doing some kind of periodic polling on all devices. If a device or Domoticz does not respond (properly), MDAH can't handle the input and stops.

For me it's clear what to do now, but it may be worth investigating this behaviour, to see if there's a cleaner way of handling devices that aren't available.

Re: [MyDomoAtHome] Support thread

Posted: Monday 18 June 2018 15:28
by epierre

Code: Select all

My hypothesis: Imperihome or MDAH is doing some kind of periodic polling on all devices. If a device or Domoticz does not respond (properly), MDAH can't handle the input and stops.
this is something new for me, but this is not MDAH, since the message is related on data sent from todomoticz to MDAH, and MDAH reacts unextectedly... on synology there is no forever process (we have on pi) possibility, maybe catching the exception would do the trick.

Re: [MyDomoAtHome] Support thread

Posted: Tuesday 19 June 2018 19:09
by gerardosamara
gerardosamara wrote: Tuesday 30 January 2018 10:03 Thanks for the proposal.

When I ran the commands in 2 steps so first " wget -qo - http://www.e-nef.com/domoticz/mdah/gpg.key | sudo apt-key add - "

=> I got " gpg: no valid OpenPGP data found."

The existing gpg files were deleted first from the /home/pi directory
New shot here on a new RPI3B+ machine with Stretch version but same issue again ... " gpg: no valid OpenPGP data found."

The gpg.key file is downloaded in /home/pi and can be opened using nano

I do not know really what is wrong here !

BTW the readme.cmd file has to be corrected for "wget -q0" , to be replaced by "wget -qo"

Re: [MyDomoAtHome] Support thread

Posted: Friday 22 June 2018 22:41
by gerardosamara
I did a new mdah 0.2.39 install with the last beta V3.9673 and it worked as per your readme.rd !

Testing the installation
Check in a browser it is running
http://gateway_ip:gateway_port/
From there you'll get the following links in the browser.
Check the domoticz is accessible from the hosting machine
curl http://domoticz_ip:domoticz_port/json.htm?type=devices&filter=all&used=true&order=Name
Check the MDAH returns the result from the hosting machine
curl http://gateway_ip:gateway_port/devices


Now I must complete with the integration with Imperihome

Re: [MyDomoAtHome] Support thread

Posted: Tuesday 26 June 2018 0:01
by timeclypse
I installed the Domoticz on Synology as well as the MyDomoAtHome using the package as instructed here.

However, im having trouble securing MyDomoAtHome access to Domoticz.

The port 3002 is now wide open, and theoretically, everybody could access the MDAH.

I read in this topic that using config.json you can secure it all, but whatever i try (SSH) i can't find the folder where syno stores all of this.

Did someone manage to secure MDAH successfully on Synology lately?

Re: [MyDomoAtHome] Support thread

Posted: Tuesday 10 July 2018 23:11
by EdddieN
Running latest stable Domoticz 4.9700, suddenly today my http://IP_rpi:3002 works but my IP:3002/devices does not work. Any ideas?

Re: [MyDomoAtHome] Support thread

Posted: Wednesday 11 July 2018 20:20
by EdddieN
Following this to the letter: https://github.com/empierre/MyDomoAtHome and a curl http://IP:3002/devices gives me an empty response.

I read it was some recent changes that did mess up this but was fixed on the latest MDAH release? Is there anything in particular to look for since I get no improvement.

Re: [MyDomoAtHome] Support thread

Posted: Monday 10 September 2018 21:08
by thebeetleuk
EdddieN wrote: Tuesday 10 July 2018 23:11 Running latest stable Domoticz 4.9700, suddenly today my http://IP_rpi:3002 works but my IP:3002/devices does not work. Any ideas?
I'm getting this as well!! :( Feeling sad :(

Re: [MyDomoAtHome] Support thread

Posted: Monday 10 September 2018 22:43
by EdddieN
thebeetleuk wrote:
EdddieN wrote: Tuesday 10 July 2018 23:11 Running latest stable Domoticz 4.9700, suddenly today my http://IP_rpi:3002 works but my IP:3002/devices does not work. Any ideas?
I'm getting this as well!! :( Feeling sad :(
Not a solution but I have two RPIs at home, so ended up installing from fresh on one of them and pointing to the Domoticz install. Now it works (not on the original one that didn’t work, I imagine it will be some mix of files that I do not understand...)

Re: [MyDomoAtHome] Support thread

Posted: Tuesday 11 September 2018 0:45
by thebeetleuk
EdddieN wrote: Monday 10 September 2018 22:43
thebeetleuk wrote:
EdddieN wrote: Tuesday 10 July 2018 23:11 Running latest stable Domoticz 4.9700, suddenly today my http://IP_rpi:3002 works but my IP:3002/devices does not work. Any ideas?
I'm getting this as well!! :( Feeling sad :(
Not a solution but I have two RPIs at home, so ended up installing from fresh on one of them and pointing to the Domoticz install. Now it works (not on the original one that didn’t work, I imagine it will be some mix of files that I do not understand...)
From what I can tell the mydomoathome service isnt running. the only problem is I dont know why.

Code: Select all

pi@raspberrypi:/etc/init.d $ sudo service MyDomoAtHome.sh start
Failed to start MyDomoAtHome.service: Unit MyDomoAtHome.service failed to load: No such file or directory.
pi@raspberrypi:/etc/init.d $

Re: [MyDomoAtHome] Support thread

Posted: Friday 28 September 2018 23:31
by jefft
Hi folks,

I have MDAH working well with domoticz and Imperihome, but I'm seeing quite high CPU usage from the 'node' process and as I have intermittent delays in devices responding to commands from domoticz, I'm concerned that node's CPU use might be part of the cause.

Node is varying between low CPU use, 1~5%, and 50%+, occasionally even higher briefly. It settles at <2% the majority of the time but ramps up to 30%+ for a couple of seconds, every 15~20 seconds. The machine is an Intel Z8350-based box with 4GB RAM, should be more than powerful enough for the job. Ubuntu 18.04. Latest versions of everything - just built the new box and moved the system over today.

I have four tablets running Imperihome; most of them are asleep most of the time so I wouldn't expect the Imperihome refresh requests to be causing such high or frequent spikes in CPU. Is there anything else that could cause node to be burning up a lot of CPU? Any debugging worth me trying?

Thanks!

Re: [MyDomoAtHome] Support thread

Posted: Sunday 14 October 2018 13:49
by jefft
Is there any way to control how much MDAH logs?

Mine wasn't logging much at all, which was fine, but since I added some dummy selector switches to domoticz, MDAH is filling syslog with a load of info about them every 5 seconds! I was concerned that this might mean that it's having a problem with them, but the log entries seem to be just informational. That seems entirely unnecessary.

Example of log lines below. I'm seeing this pattern continuously - two sets of the same entries, about every 5 seconds.

Any way to stop this? Is it indicating a problem?

Code: Select all

Oct 14 12:47:51 domoticz MDAH[1162]: { MaxDimLevel: null,
Oct 14 12:47:51 domoticz MDAH[1162]:   Action: null,
Oct 14 12:47:51 domoticz MDAH[1162]:   graph: null,
Oct 14 12:47:51 domoticz MDAH[1162]:   Selector:
Oct 14 12:47:51 domoticz MDAH[1162]:    [ 'Off',
Oct 14 12:47:51 domoticz MDAH[1162]:      'Tune1',
Oct 14 12:47:51 domoticz MDAH[1162]:      'Tune2',
Oct 14 12:47:51 domoticz MDAH[1162]:      'Tune3',
Oct 14 12:47:51 domoticz MDAH[1162]:      'Tune4',
Oct 14 12:47:51 domoticz MDAH[1162]:      'Tune5',
Oct 14 12:47:51 domoticz MDAH[1162]:      'Tune6',
Oct 14 12:47:51 domoticz MDAH[1162]:      'Tune7',
Oct 14 12:47:51 domoticz MDAH[1162]:      'Tune8',
Oct 14 12:47:51 domoticz MDAH[1162]:      'Tune9',
Oct 14 12:47:51 domoticz MDAH[1162]:      'Tune10' ] }
Oct 14 12:47:51 domoticz MDAH[1162]: 1
Oct 14 12:47:51 domoticz MDAH[1162]: { MaxDimLevel: null,
Oct 14 12:47:51 domoticz MDAH[1162]:   Action: null,
Oct 14 12:47:51 domoticz MDAH[1162]:   graph: null,
Oct 14 12:47:51 domoticz MDAH[1162]:   Selector: [ 'Off', '5s', '10s', '15s', '20s', '30s' ] }
Oct 14 12:47:51 domoticz MDAH[1162]: 2
Oct 14 12:47:51 domoticz MDAH[1162]: { MaxDimLevel: null,
Oct 14 12:47:51 domoticz MDAH[1162]:   Action: null,
Oct 14 12:47:51 domoticz MDAH[1162]:   graph: null,
Oct 14 12:47:51 domoticz MDAH[1162]:   Selector: [ 'Off', 'Byron only', 'MP3 only', 'Byron + MP3' ] }
Oct 14 12:47:51 domoticz MDAH[1162]: 1
Oct 14 12:47:52 domoticz domoticz: (Z-Wave (Aeotec Z-Stick Gen5)) General/kWh (kWh Meter)
Oct 14 12:47:52 domoticz domoticz: (Z-Wave (Aeotec Z-Stick Gen5)) Usage (Unknown)
Oct 14 12:47:52 domoticz domoticz: (Z-Wave (Aeotec Z-Stick Gen5)) General/kWh (kWh Meter)
Oct 14 12:47:53 domoticz MDAH[1162]: { MaxDimLevel: null,
Oct 14 12:47:53 domoticz MDAH[1162]:   Action: null,
Oct 14 12:47:53 domoticz MDAH[1162]:   graph: null,
Oct 14 12:47:53 domoticz MDAH[1162]:   Selector:
Oct 14 12:47:53 domoticz MDAH[1162]:    [ 'Off',
Oct 14 12:47:53 domoticz MDAH[1162]:      'Tune1',
Oct 14 12:47:53 domoticz MDAH[1162]:      'Tune2',
Oct 14 12:47:53 domoticz MDAH[1162]:      'Tune3',
Oct 14 12:47:53 domoticz MDAH[1162]:      'Tune4',
Oct 14 12:47:53 domoticz MDAH[1162]:      'Tune5',
Oct 14 12:47:53 domoticz MDAH[1162]:      'Tune6',
Oct 14 12:47:53 domoticz MDAH[1162]:      'Tune7',
Oct 14 12:47:53 domoticz MDAH[1162]:      'Tune8',
Oct 14 12:47:53 domoticz MDAH[1162]:      'Tune9',
Oct 14 12:47:53 domoticz MDAH[1162]:      'Tune10' ] }
Oct 14 12:47:53 domoticz MDAH[1162]: 1
Oct 14 12:47:53 domoticz MDAH[1162]: { MaxDimLevel: null,
Oct 14 12:47:53 domoticz MDAH[1162]:   Action: null,
Oct 14 12:47:53 domoticz MDAH[1162]:   graph: null,
Oct 14 12:47:53 domoticz MDAH[1162]:   Selector: [ 'Off', '5s', '10s', '15s', '20s', '30s' ] }
Oct 14 12:47:53 domoticz MDAH[1162]: 2
Oct 14 12:47:53 domoticz MDAH[1162]: { MaxDimLevel: null,
Oct 14 12:47:53 domoticz MDAH[1162]:   Action: null,
Oct 14 12:47:53 domoticz MDAH[1162]:   graph: null,
Oct 14 12:47:53 domoticz MDAH[1162]:   Selector: [ 'Off', 'Byron only', 'MP3 only', 'Byron + MP3' ] }
Oct 14 12:47:53 domoticz MDAH[1162]: 1

Re: [MyDomoAtHome] Support thread

Posted: Friday 02 November 2018 14:20
by lazara007
EdddieN wrote: Tuesday 10 July 2018 23:11 Running latest stable Domoticz 4.9700, suddenly today my http://IP_rpi:3002 works but my IP:3002/devices does not work. Any ideas?
Hi,

Did you find a solution? I did a fresh install on V4.9700, but no success.
http://IP_rpi:3002 works but my IP:3002/devices does not work.

Re: [MyDomoAtHome] Support thread

Posted: Friday 02 November 2018 20:18
by dextm80
lazara007 wrote:
EdddieN wrote: Tuesday 10 July 2018 23:11 Running latest stable Domoticz 4.9700, suddenly today my http://IP_rpi:3002 works but my IP:3002/devices does not work. Any ideas?
Hi,

Did you find a solution? I did a fresh install on V4.9700, but no success.
http://IP_rpi:3002 works but my IP:3002/devices does not work.
Post your error please, do you use auth access?

Re: [MyDomoAtHome] Support thread

Posted: Saturday 03 November 2018 8:36
by lazara007
dextm80 wrote: Friday 02 November 2018 20:18
lazara007 wrote:
EdddieN wrote: Tuesday 10 July 2018 23:11 Running latest stable Domoticz 4.9700, suddenly today my http://IP_rpi:3002 works but my IP:3002/devices does not work. Any ideas?
Hi,

Did you find a solution? I did a fresh install on V4.9700, but no success.
http://IP_rpi:3002 works but my IP:3002/devices does not work.
Post your error please, do you use auth access?
Domoticz Version: 4.10160

node -v
v4.3.2
root@Domoticz:/home/pi# npm -v
2.14.12
root@Domoticz:/home/pi# sudo service mydomoathome status
* mydomoathome.service - MDAH ISS Rest interface for Domoticz to Imperihome
Loaded: loaded (/etc/systemd/system/mydomoathome.service; enabled)
Active: active (running) since Fri 2018-11-02 16:05:58 CET; 16h ago
Process: 10859 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCE SS)
Process: 10874 ExecStartPre=/bin/chmod 755 /run/mydomoathome (code=exited, sta tus=0/SUCCESS)
Process: 10871 ExecStartPre=/bin/chown www-data:www-data /etc/mydomoathome/con fig.json (code=exited, status=0/SUCCESS)
Process: 10868 ExecStartPre=/bin/chown www-data:www-data /run/mydomoathome (co de=exited, status=0/SUCCESS)
Process: 10865 ExecStartPre=/bin/mkdir -p /run/mydomoathome (code=exited, stat us=0/SUCCESS)
Main PID: 10877 (mydomoathome)
CGroup: /system.slice/mydomoathome.service
|- 3710 /usr/local/bin/node /usr/share/mydomoathome/app/mdah.js
|-10877 /bin/bash /usr/share/mydomoathome/bin/mydomoathome
`-10878 node /usr/local/bin/forever --minUptime 5000 --spinSleepTi...

Nov 03 08:24:19 Domoticz MDAH[10877]: at IncomingMessage.<anonymous> (/usr/...2)
Nov 03 08:24:19 Domoticz MDAH[10877]: at emitNone (events.js:72:20)
Nov 03 08:24:19 Domoticz MDAH[10877]: error: Forever detected script exited... 1
Nov 03 08:24:19 Domoticz MDAH[10877]: error: Script restart attempt #53
Nov 03 08:24:21 Domoticz MDAH[10877]: info: Domoticz server: http://127.0.0...tm
Nov 03 08:24:21 Domoticz MDAH[10877]: info: Node version: 4.3.2
Nov 03 08:24:21 Domoticz MDAH[10877]: info: MDAH version: MyDomoAtHome 0.2.39
Nov 03 08:24:21 Domoticz MDAH[10877]: info: OS version: Linux linux 4.9.35-v7+
Nov 03 08:24:21 Domoticz MDAH[10877]: info: Hostname: Domoticz 192.168.1.10... /
Nov 03 08:24:22 Domoticz MDAH[10877]: info: Refreshing version cache: v0.2.39
Hint: Some lines were ellipsized, use -l to show in full.
root@Domoticz:/home/pi# curl http://192.168.1.100:3002/devices
curl: (52) Empty reply from server
root@Domoticz:/home/pi# sudo nano /etc/mydomoathome/config.json

{
"app_name": "MyDomoAtHome",
"auth": null,
"domoticz": {
"ssl": false,
"host": "127.0.0.1",
"port": "8080",
"path": "/",
"auth": null
},
"port": 3002,
"passcode": ""
}

Image

Re: [MyDomoAtHome] Support thread

Posted: Saturday 03 November 2018 10:52
by dextm80
Did you Try 127.0.0.1:3002/devices/ ?

Re: [MyDomoAtHome] Support thread

Posted: Saturday 03 November 2018 12:13
by lazara007
dextm80 wrote: Saturday 03 November 2018 10:52 Did you Try 127.0.0.1:3002/devices/ ?
root@Domoticz:/home/pi# curl http://127.0.0.1:3002/devices
curl: (52) Empty reply from server

Re: [MyDomoAtHome] Support thread

Posted: Wednesday 07 November 2018 0:57
by MikeF
Negative values showing as positive in MDAH. Apologies if this has been reported already, but I couldn't find it.

I have a custom sensor in Domoticz, which shows sun altitude. After sunset, this has negative values, but these are showing as positive in MDAH (and Imperihome).

E.g.,
Image

MDAH:

Code: Select all

{"id":"338","name":"Sun altitude","type":"DevGenericSensor","room":"Utility","params":[{"key":"Value","value":"54.5","unit":"°","graphable":"true"}]}