2020-10-09 23:01:20 +02:00
# Domoticz for YunoHost
2020-10-05 23:05:58 +02:00
2020-10-09 23:01:20 +02:00
[![Integration level ](https://dash.yunohost.org/integration/domoticz.svg )](https://dash.yunohost.org/appci/app/domoticz) ![](https://ci-apps.yunohost.org/ci/badges/domoticz.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/domoticz.maintain.svg)
[![Install domoticz with YunoHost ](https://install-app.yunohost.org/install-with-yunohost.png )](https://install-app.yunohost.org/?app=domoticz)
2020-10-05 23:05:58 +02:00
*[Lire ce readme en français.](./README_fr.md)*
2020-10-09 23:01:20 +02:00
> *This package allows you to install domoticz quickly and simply on a YunoHost server.
2020-10-05 23:05:58 +02:00
If you don't have YunoHost, please consult [the guide ](https://yunohost.org/#/install ) to learn how to install it.*
## Overview
2020-10-09 23:01:20 +02:00
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:
-Light switches
-Door sensors
-Doorbells
-Security devices
2020-10-05 23:05:58 +02:00
2020-10-09 23:01:20 +02:00
-Weather sensors like: UV/Rain/Wind Meters
2020-10-05 23:05:58 +02:00
2020-10-09 23:01:20 +02:00
-Temperature Sensors
2020-10-05 23:05:58 +02:00
2020-10-09 23:01:20 +02:00
-Pulse Meters
2020-10-05 23:05:58 +02:00
2020-10-09 23:01:20 +02:00
-Voltage / AD Meters
-And more ...
2020-11-01 16:01:26 +01:00
**Shipped version:** Always the last stable one. The last compiled version is retrieved from [this directory ](https://releases.domoticz.com/releases/?dir=./beta )
2020-11-08 15:24:23 +01:00
Once installed, **updates from the uptream app are managed from within the app.** . Yunohost upgrade script will only upgrade the Yunohost package.
2020-10-05 23:05:58 +02:00
## Configuration
2020-12-05 23:08:32 +01:00
### Sensors, language and this kind of stuff
Main configuration of the app take place inside the app itself.
### Access and API
By default, access for the [JSON API ](https://www.domoticz.com/wiki/Domoticz_API/JSON_URL's ) is allowed on following path `/yourdomain.tld/api_/domoticzpath` .
2020-12-06 10:17:49 +01:00
So if you access domoticz via https://mydomainname.tld/domoticz, use the following webpath for the api : `/mydomainname.tld/api_/domoticz/json.htm?yourapicommand`
2020-12-05 23:08:32 +01:00
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 :
````
sudo nano /etc/nginx/conf.d/yourdomain.tld.d/domoticz.conf
2020-12-06 10:17:49 +01:00
````
2020-12-05 23:08:32 +01:00
Then edit the following block by adding the regex of the command you want to allow:
````
#set the list of authorized json command here in regex format
#you may retrieve the command from https://www.domoticz.com/wiki/Domoticz_API/JSON_URL's
#By default, sensors updates and toggle switch are authorized
if ( $args ~* type=command& param=udevice& idx=[0-9]*& nvalue=[0-9]*& svalue=.*$|type=command& param=switchlight& idx=[0-9]*& switchcmd=Toggle$) {
set $api "1";
}
````
For example, to add the json command to retrieve the status of a device (/json.htm?type=devices& rid=IDX),modify the line as this:
````
#set the list of authorized json command here in regex format
#you may retrieve the command from https://www.domoticz.com/wiki/Domoticz_API/JSON_URL's
#By default, sensors updates and toggle switch are authorized
if ( $args ~* type=command& param=udevice& idx=[0-9]*& nvalue=[0-9]*& svalue=.*$|type=command& param=switchlight& idx=[0-9]*& switchcmd=Toggle$|type=devices& rid=[0-9]* ) {
set $api "1";
}
````
2021-02-04 23:35:15 +01:00
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` :
2020-12-05 23:08:32 +01:00
````
allow ::/1;
````
This will authorized only IPv4 within local network to access your domoticz API.
2020-12-06 11:37:24 +01:00
You may add individual IPv6 address in the same way.
2020-10-05 23:05:58 +02:00
## Documentation
2020-10-09 23:01:20 +02:00
* Official documentation: Please use the [wiki ](https://www.domoticz.com/wiki/Main_Page ) and [user manual ](https://www.domoticz.com/DomoticzManual.pdf ) for further info.
2020-10-05 23:05:58 +02:00
* YunoHost documentation: If specific documentation is needed, feel free to contribute.
## YunoHost specific features
#### Supported architectures
2020-10-09 23:01:20 +02:00
Both ARM and x86 architectures should be supported.
Compiled sources are directly downloaded by the package.
2020-10-05 23:05:58 +02:00
## Limitations
2020-11-08 17:04:56 +01:00
* No user management nor LDAP integration This function is [not planned to be implemented into the app ](https://github.com/domoticz/domoticz/issues/838 ), hence it's not planned into the package neither.
* Backup cannot be restored on a different machine type (arm, x86...) as compiled sources are different
2020-10-05 23:05:58 +02:00
**More info on the documentation page:**
https://yunohost.org/packaging_apps
## Links
2020-11-26 20:26:24 +01:00
* Report a bug: https://github.com/Yunohost-Apps/domoticz_ynh/issues
2020-10-09 23:01:20 +02:00
* App website: https://domoticz.com/
* Upstream app repository: https://github.com/domoticz/domoticz
2020-10-05 23:05:58 +02:00
* YunoHost website: https://yunohost.org/
---
Developer info
----------------
**Only if you want to use a testing branch for coding, instead of merging directly into master.**
2020-11-26 20:26:24 +01:00
Please send your pull request to the [testing branch ](https://github.com/Yunohost-Apps/domoticz_ynh/tree/testing ).
2020-10-05 23:05:58 +02:00
To try the testing branch, please proceed like that.
```
2020-11-26 20:26:24 +01:00
sudo yunohost app install https://github.com/Yunohost-Apps/domoticz_ynh/tree/testing --debug
2020-10-05 23:05:58 +02:00
or
2020-11-26 20:26:24 +01:00
sudo yunohost app upgrade domoticz -u https://github.com/Yunohost-Apps/domoticz_ynh/tree/testing --debug
2020-10-05 23:05:58 +02:00
```