Troubleshooting - thkl/hap-homematic GitHub Wiki
Running the Daemon from the commandline
- Log into your CCU via SSH
- Stop the service using this command:
/usr/local/etc/config/rc.d/hap-homematic stop
- 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):
- Log into your CCU via SSH
- Stop the service with
start-stop-daemon --stop --quiet --oknodo --retry 5 --pidfile /var/run/hap-homematic.pid - Delete
/etc/config/addons/hap-homematic/evdps.json(cache file) - Delete the content of
/usr/local/etc/config/addons/hap-homematic/persist - Check that "hap-homematic.pid" is no longer existing in
/var/run(or delete file manually) - 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)
- 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)
- Log into your CCU via SSH and analyze the files within
/etc/config/addons/hap-homematic
-
Check correct JSON syntax especially for config.json, devices.json, rooms.json, programs.json and variables.json based on e.g. https://jsonlint.com/.
-
Ensure that you always delete device / programs / parameters always first in HAP before deleting them in the CCU.
-
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
-
For monitoring the service status you might use the script according to https://github.com/thkl/hap-homematic/issues/614#issuecomment-1807680457
-
Avoid special characters (Sonderzeichen) in your devices
HAP instances
- The HAP settings allow to enable/disable the publication of an instance - independent of having a device allocated to an instance.
- In case of issues, please delete the related Instance file from
/usr/local/etc/config/addons/hap-homematic/persist - Ensure correct firewall configuration within your CCU. See Installation. Every HAP instance requires one port!
- 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