logo elektroda
logo elektroda
X
logo elektroda

Integrating RPI with Domoticz on Ubuntu Server: Connecting Sensors (e.g. ds18b20) & Devices

waluszek 5718 13
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16803677
    waluszek
    Level 19  
    Posts: 557
    Help: 27
    Rate: 56
    Board Language: polish
    Hello, I am trying to play the basics of home automation with some successes.

    But it occurred to me that the central point of the whole system was not located on the RPI and on the server, and there is nothing strange in it because domoticz itself nicely flies on the ubuntu server, unfortunately the stairs began, namely I do not know how to connect it all to domoticz which is on a device other than RPI itself.

    As far as I found some howto how to connect sensors, e.g. ds18b20 in the form of a script and here everything would be ok because in the script I give the IP address of the home.

    But I wonder if the domoticz can somehow connect the whole RPI in the form of adding it as a device or only as separate elements made by RPI?
  • ADVERTISEMENT
  • #2 16803722
    xury
    Automation specialist
    Posts: 7068
    Help: 876
    Rate: 1486
    Board Language: polish
    Dummy is used for such things. No matter where a device is physically connected. It is important how to receive and process data from them and give one to domoticz.
    You have to read about the domoticz API and how to transfer data to it, e.g. using mqtt or via regular http.
  • #3 16803802
    waluszek
    Level 19  
    Posts: 557
    Help: 27
    Rate: 56
    Board Language: polish
    So, with the help of dummy, I can add the entire GPIO resource from RPI to domoticz? I understand that then I can add more RPI to the same domoticz?
  • #4 16805059
    xury
    Automation specialist
    Posts: 7068
    Help: 876
    Rate: 1486
    Board Language: polish
    So you can do something like slave sub-units.
  • ADVERTISEMENT
  • #5 16805230
    waluszek
    Level 19  
    Posts: 557
    Help: 27
    Rate: 56
    Board Language: polish
    Is there a chance for a description or direction in which to look for a solution?
  • ADVERTISEMENT
  • #7 16826453
    wampirek
    Level 18  
    Posts: 259
    Help: 17
    Rate: 12
    Board Language: polish
    First of all, on rpi you create a user with permission to share the equipment. Secondly, on the ubuntu server where you have domoticza in your devices, add the Domoticz Remote server and enter the rpi IP, login and password there. After a while, a list of all connected devices will appear in your devices and you will add them to the server by clicking on the green arrow and describing them. If you have a problem, I invite you to priv or contact by phone
    I mention that my domoticz works on an orange pi pc rpi3 and orange pi they are all fastened together. and works fine.
  • #8 16827286
    waluszek
    Level 19  
    Posts: 557
    Help: 27
    Rate: 56
    Board Language: polish
    Great, that's exactly what I meant.

    And tell me, how do I understand this way I can connect more raspberries to domoticz?

    best regards
  • #9 16827650
    DJ MHz
    Level 26  
    Posts: 1136
    Help: 36
    Rate: 241
    Board Language: polish
    only that the current soft domoticza causes errors and does not display sensors connected to the gpio slave device on the master device.
    And the division of Master and several slaves can be done without a problem, guides are generally available on the net, e.g .:
    https://raspberrywpraktyce.wordpress.com/2016...moticzami-udostepnianie-odczytow-z-czujnikow/
  • #10 16828536
    waluszek
    Level 19  
    Posts: 557
    Help: 27
    Rate: 56
    Board Language: polish
    Ok, so if I understand it correctly, domoticz must be installed on each raspberry. And the parent domoticz collects from the child data.

    I understand it well.
  • ADVERTISEMENT
  • #11 16829053
    DJ MHz
    Level 26  
    Posts: 1136
    Help: 36
    Rate: 241
    Board Language: polish
    yes, you will also do it on esp + espmega, some collect and share the results with others.
  • #12 16833354
    wampirek
    Level 18  
    Posts: 259
    Help: 17
    Rate: 12
    Board Language: polish
    Just like I have the whole domoticz broken into 3 raspberry hardware 1 master and 2 slaves. You can even connect dozens of raspberries in different locations not only on the local network

    I don't have any read errors, everything works fine. The DJ MHz post from 2016 has changed a lot so far.
  • #13 16843485
    Sickboy
    Level 12  
    Posts: 105
    Help: 1
    Rate: 18
    Board Language: polish
    You can always write a script in python that will collect readings and through the GET / POST queries will communicate with the domoticz.
  • #14 16849275
    wampirek
    Level 18  
    Posts: 259
    Help: 17
    Rate: 12
    Board Language: polish
    Sickboy, why make an open door?

Topic summary

✨ The discussion revolves around integrating Raspberry Pi (RPI) with Domoticz on an Ubuntu server for home automation, specifically focusing on connecting sensors like the DS18B20. Users explore the possibility of adding RPI as a device in Domoticz rather than just individual components. It is suggested to utilize the Domoticz API for data transfer, employing methods such as MQTT or HTTP. Users can create a user on RPI to share resources and configure the Ubuntu server to recognize the RPI by entering its IP address and credentials. The setup allows for multiple RPIs to be connected as slave devices to a master Domoticz instance, although some users report issues with sensor visibility on the master device. Python scripts can also be employed for data collection and communication with Domoticz.
Generated by the language model.

FAQ

TL;DR: Domoticz can run as a master on Ubuntu and pull devices from remote RPIs; a 3‑node (1 master + 2 slaves) setup works and “You can even connect dozens of raspberries.” Use Domoticz Remote, Dummy + API, or MQTT/HTTP. [Elektroda, wampirek, post #16833354] Why it matters:** It shows how to centralize sensors like DS18B20 and GPIO from multiple RPIs into one Domoticz server with minimal rewiring.

Quick Facts

Can Domoticz on Ubuntu read sensors from a remote Raspberry Pi?

Yes. On the Ubuntu Domoticz, add Hardware → Domoticz Remote, enter the RPI’s IP, login, and password. After a moment, devices from that RPI appear in Devices; click the green arrow to add them to master. [Elektroda, wampirek, post #16826453]

Do I add the entire RPI GPIO to Domoticz or separate devices?

Add and update separate devices. Use Dummy hardware to represent virtual sensors/switches, then feed data via the Domoticz API using HTTP or MQTT. “Dummy is used for such things.” [Elektroda, xury, post #16803722]

How many RPIs can one Domoticz master handle?

Users report one master with two slaves running stably and note you can connect “dozens of raspberries,” including remote locations beyond your LAN. This scales well for multi‑site installs. [Elektroda, wampirek, post #16833354]

How do I add an RPI as a remote Domoticz hardware? (3 steps)

  1. On the RPI, create a Domoticz user with permission to share devices.
  2. On the Ubuntu master, add Hardware → Domoticz Remote; enter the RPI IP, login, and password.
  3. Open Devices; click the green arrow to add and name each device. [Elektroda, wampirek, post #16826453]

Should I use MQTT or HTTP for sending readings like DS18B20?

Both work. Domoticz accepts updates via its JSON API over HTTP, and many prefer MQTT for decoupled messaging. Read values with a script and publish to the master. [Elektroda, xury, post #16803722]

Do I need Domoticz installed on every Raspberry Pi?

For a master/slave design, install Domoticz on each RPI (slaves). The Ubuntu master then aggregates their exposed devices. ESP‑based nodes can also collect and share data. [Elektroda, DJ MHz, post #16829053]

Known issue: why don’t GPIO sensors from a slave show on the master?

An older Domoticz build had a bug where GPIO sensors on slaves didn’t display on the master. Update and retest if you hit this behavior. [Elektroda, DJ MHz, post #16827650]

Can I push DS18B20 readings without running Domoticz on the RPI?

Yes. Write a Python script to read DS18B20 and send values directly to the master using HTTP GET/POST to the Domoticz API. This skips slave Domoticz. [Elektroda, Sickboy, post #16843485]

What does “slave” mean in this Domoticz context?

It’s a subordinate node that collects local devices and exposes them to the master. Or, as one user said, “slave sub‑units.” [Elektroda, xury, post #16805059]

Can I mix RPIs with ESP/ESPMega devices in one system?

Yes. You can have Domoticz masters and slaves plus ESP/ESPMega nodes that collect and share results to the master over the network. [Elektroda, DJ MHz, post #16829053]

What is Tuya?

Tuya is a global AIoT platform and app ecosystem used by many smart‑home brands. It provides cloud, app, and device enablement. [“Tuya Inc.”]

What is Arduino Nano?

Arduino Nano is a compact, breadboard‑friendly microcontroller board, historically based on the ATmega328P, programmable via the Arduino IDE. [“Arduino Nano - Wikipedia”]

What is OpenBeken?

OpenBeken is open‑source firmware for many Tuya/Beken and other Wi‑Fi chips, positioned as a Tasmota/ESPHome alternative with MQTT and HA support. [“OpenBK7231T_App — GitHub”]

What is CAN bus?

CAN bus is a robust, differential, multi‑master serial bus used in vehicles and industry; classic CAN runs up to 1 Mbit/s. [“CAN bus”]

Quote to remember on architecture?

“So you can do something like slave sub‑units.” It captures the mental model for distributing nodes cleanly. [Elektroda, xury, post #16805059]

Where do I learn Domoticz API endpoints for scripting?

Start with the Domoticz API JSON URLs documentation referenced in the thread. It shows the GET/POST patterns you’ll call from scripts. [Elektroda, xury, post #16805281]
Generated by the language model.
ADVERTISEMENT