Troubleshooting - thkl/hap-homematic GitHub Wiki

Running the Daemon from the commandline

  1. Log into your CCU via SSH
  2. Stop the service using this command:
/usr/local/etc/config/rc.d/hap-homematic stop
  1. Start hap via the commandline:
node /usr/local/addons/hap-homematic/node_modules/hap-homematic/index.js

You may add the -D parameter to start hap in debug mode

node /usr/local/addons/hap-homematic/node_modules/hap-homematic/index.js -D

Hap will start with a lot of output. So you may be able to see any errors at the console

You can exit this mode by CTRL-C. The hap process will be terminated when you detach the console. Back to normal mode:

/usr/local/etc/config/rc.d/hap-homematic start

Running in Debug Mode

You can simply switch into debug mode via the WebUI => Just go to "Internals" and activate the debug mode (Result: Menu entry is now "Disable Debug). See Internals & Support Running in debug means a lot of output into the log so please make sure you've turned debug off again (Result: menu entry = Enable debug).

The log file can be found in /var/log/hap-homematic.log on your CCU via SSH or CuXD

A restart of the daemon will disable debug mode, but also purge the log.

Cleaning the Cache

The easiest way is to use the "Force Cache usage" within "Internals" See Internals & Support

If this does not help (see #614):

  1. Log into your CCU via SSH
  2. Stop the service with start-stop-daemon --stop --quiet --oknodo --retry 5 --pidfile /var/run/hap-homematic.pid
  3. Delete /etc/config/addons/hap-homematic/evdps.json(cache file)
  4. Delete the content of /usr/local/etc/config/addons/hap-homematic/persist
  5. Check that "hap-homematic.pid" is no longer existing in /var/run (or delete file manually)
  6. Restart the service with start-stop-daemon --start --quiet --oknodo --make-pidfile --background --pidfile /var/run/hap-homematic.pid --exec node /usr/local/addons/hap-homematic/node_modules/hap-homematic/index.js

Further Troubleshooting (summary of e.g. issue #710)

  1. Based on activated debug mode, log into your CCU via SSH and analyze the following file(s):
 /usr/local/etc/config/addons/hap-homematic/******.crash (whatever the hap-homematic.log is highlighting)
  1. Log into your CCU via SSH and analyze the files within
/etc/config/addons/hap-homematic
  1. Check correct JSON syntax especially for config.json, devices.json, rooms.json, programs.json and variables.json based on e.g. https://jsonlint.com/.

  2. Ensure that you always delete device / programs / parameters always first in HAP before deleting them in the CCU.

  3. In case of running a Raspberrymatic (OpenCCU), please ensure that the timeout is set to 0:

  • Log into your CCU via SSH
  • vi /usr/local/addons/hap-homematic/node_modules/hap-homematic/lib/HomeMaticRegaRequest.js
  • Add a new line after row 52: timeout: 0,
  • Save
  • Restart HAP
  1. For monitoring the service status you might use the script according to https://github.com/thkl/hap-homematic/issues/614#issuecomment-1807680457

  2. Avoid special characters (Sonderzeichen) in your devices

HAP instances

  1. The HAP settings allow to enable/disable the publication of an instance - independent of having a device allocated to an instance.
  2. In case of issues, please delete the related Instance file from /usr/local/etc/config/addons/hap-homematic/persist
  3. Ensure correct firewall configuration within your CCU. See Installation. Every HAP instance requires one port!
  4. If you need to clean-up a specific instance
  • search for the instance within /etc/config/addons/hap-homematic/config.json
  • choose the value of the user parameter without the : -> e.g. 12:34:56:e9:9e:0c results into 123456E99E0C
  • within persist folder delete the files „AccessoryInfo.123456E99E0C.json and „Identifier.123456E99E0C.json“
  • restart HAP

Hue devices

See Avoid hue devices