Domoticz is a Home Automation system design to control various devices and receive input from various sensors. For example this system can be used with:
Shipped version: Always the last stable one. The last compiled version is retrieved from this directory during install. Once installed, updates from the uptream app are managed from within the app. YunoHost upgrade script will only upgrade the YunoHost package.
The MQTT broker Mosquitto is integrated into the package. It requires its own domain or subdomain. It's an optional setting: during install if you set the same domaine as your main app domain, it won't be installed.
During installation, a MQTT broker, Mosquitto, is installed at the same time as Domoticz. The installed version is the one from the official project repo and not from Debian ones. This broker requires a dedicated domain or subdomain to work (ex : mqtt.your.domain.tld): creating this domain prior installation is a prerequisite.
To use Mosquitto, you need to customize the communication between Domoticz and the broker by following the Domoticz documentation, part Add hardware "MQTT Client Gateway". User and password are automatically generated during installation, you may retrieve them with
These two tools do not support WebSocket protocol, only direct MQTT: base settings will not allow communication from an outside device. If you're using them directly from your server, this kind of syntax should work:
Set the TLS setting in mosquitto configuration by giving access to crt.pem and key.pem from your MQTT domain by setting respective certfile et keyfile variables. This is mandatory to ensure a secure connection.
If you have package ynh3 or below, Mosquitto is not installed by default. If you have chosen to not set a domain during initial installation also. So, if you need to activate mosquitto in retrospect, do following actions:
By default, access for the JSON API is allowed on following path `/yourdomain.tld/api_/domoticzpath`. So if you access domoticz via `https://mydomainname.tld/domoticz`, use the following webpath for the api: `/mydomainname.tld/api_/domoticz/json.htm?yourapicommand`
By default, only sensor updates and switch toogle are authorized. To authorized a new command, you have (for now) to manually update the NGINX config file:
All IPv4 addresses within the local network (192.168.0.0/24) and all IPv6 addresses are authorized as API. As far as I know, there is no way to filter for IPv6 address on local network: You may remove the authorization by removing or commenting this line in `/etc/nginx/conf.d/yourdomain.tld.d/domoticz.conf`:
+ Fix a bug or an improvement by creating a ticket (issue): [github.com - YunoHost-Apps/domoticz/issues](https://github.com/YunoHost-Apps/domoticz_ynh/issues)