Setting up Device sharing

From Domoticz
Revision as of 11:51, 14 August 2024 by Walter vl (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

One of the nice features of Domoticz is the ability to share devices over the (intra-)network between systems with a Domoticz installation..
This page describes how to set this up.

Preconditions

Because of a bug, device sharing only works between hardware platforms using the same endianness. For example if the main Domoticz is a Raspberry Pi which uses "little endian" the Remote instance has to be "little endian" as well and vice versa.

The bug report is here: Github #1182

Device sharing is not (yet) possible with devices managed by a Python Plugin. The request is on Github #2484 Solved in 2024.4

Setup

You have, for example, 3 machines or controllers or RaspberryPis with Domoticz. All software should be at the latest version and all main and remotes must be running the same version.

  • Main Domoticz
  • Remote1 (with installed switch and sensor devices)
  • Remote2 (with installed switch and sensor devices)


Our goal is to have all or some of the devices of Remote1 and Remote2 to be available to the Main Domoticz.

Configuration

Remote1 and Remote2

1. Specify the shared port (6144 by default) where the Main will connect to.

2. Now, add a User to Remote's Domoticz (Setup - Users). This is the user/password combination we will use later when we setup the Main.

NOTE: Do not use an admin role for this remote user. Do not use the default admin user for security reasons!

3. Here you can specify the devices you want this remote to share (no selected devices for this User means all).

4. Do this on both Remote installs.

Note: if the remote(s) is/are on a different network than the main, you will need to configure the router of the remote to forward port 6144 into the devicde where the Domoticz remote is running.

Main Domoticz

Adding Remote1:

In menu "Setup | Hardware" - add a new hardware device of type "Domoticz - Remote Server" with properties:

  • Name (eg "Remote1")
  • Remote IP/Port (IP address of Remote1, port 6144)
  • Specify the username/password entered above for Remote1

With the row still highlighted, press the "Update" button or you will lose the setup parameters!

Adding Remote2:

Add another new hardware device of type "Domoticz - Remote Server" with properties:

  • Name (eg "Remote2")
  • Remote IP/Port (IP Address of Remote2, port 6144)
  • Specify the username/password entered above for Remote2

With the row still highlighted, press the "Update" button.

You should now receive device/sensor data from Remote1 and Remote2 in your Main Domoticz. Give it some time to collect all data. Data is pushed to the Main from the Remote triggered by device changes. So if a device changes it will be synchronised.
It would be wise to check the "Setup | Log" to double check there are no errors.

To add specific data to your Main Domoticz, look in menu "Setup | Devices". If you have a lot of devices in your Main Domoticz, type your Remote's name in the search box and Domoticz will only display available device data matching that name.