logo elektroda
logo elektroda
X
logo elektroda

Home automation - Rpi3 + Arduino + Domoticz - drawbacks of the solution

Dadol91 2976 10
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 17569563
    Dadol91
    Level 2  
    Welcome,

    I am in the process of building a detached house and would like to make some improvements. I am a mechanical builder and electrical/electronic issues are rather alien to me. Why am I getting into this? Because I like to develop, I like to tinker and do things myself, plus I'm cutting costs ready-made solutions from the market are a big expense.

    Smart home is too much to say. I would like the system to be wired, I will leave wireless solutions for later - in case of system expansion.
    It should look like this:
    Rpi 3 + domoticz + Arduino mega to increase the number of inputs/outputs.

    Elements I want to control: approx. 25 lighting points, external blinds (11 of them), intercom (to open the gate when I am not at home), heating (the whole house is underfloor, I would like to control each room loop separately. I have 11 loops), I am still thinking over music in the toilets.

    To control: stair switches, motion sensors (2), temperature sensors 11 pieces, rain sensor and reed switches in the windows (11 pieces window open + rain close roller shutter) .

    Quite a lot of this and I'm wondering if my simple layout can cope with it and if it has a chance of working stably.
    In a nutshell I plan to connect each sensor/switch with a wire to an Arduino split. Blinds, lights etc. Through the przekaniki also controlled from the Arduino, on which the only thing that will happen is the corresponding output signal when the corresponding input is received.
    I was planning to create the logic already at the Domoticz level, e.g. to determine the set temperature in a room and control the underfloor heating on this basis.

    Do any of you have experience with such a simple system in practice? What disadvantages do you see and do they defeat the purpose of such an installation?

    What worries me :
    1. the operation of the system during a storm. Will a large number and length of cables not be a problem? I will make a big antenna out of the house. Shielded cables will help?
    2. failing cards in the rpi. Is it enough to have a second identical card, with a backup of the whole thing and just swap cards in case of a fault?
  • ADVERTISEMENT
  • #2 17569800
    oskar777

    Level 26  
    Hello
    From what I've read, all you need to do is swap cards. However, it's worth doing a fresh system image from the card every so often so you need to have the system designed to work manually without electronics. Move the signal/control wires away from the power wires on the wall so no voltage is induced on the signal lines.

    By how much I don't know unfortunately, I have from 4cm-5cm and it's ok.

    Remember to have a large enough switchboard for this. Standard fuses, differential, B + C and maybe D protectors (an electrician will have to help you), DIN rail power supply, probably some relay cards, they're on DIN too.

    If you're planning an alarm, consider motion detectors - if you're planning an alarm, wire it straight away for peace of mind - it's not a big expense.
  • #3 17570032
    xury
    Automation specialist
    As for the cards, they do indeed die. The best thing to do is to take an image after changes and every now and then backup the domoticz base. As for long distances, it is a good idea to use gpio opto-isolation to avoid burning them in spades. It is best if, when designing the control, you think about the fact that, in case of emergency, you can also control in a conventional way. In practice, this means that the control should be implemented as with staircase switches. This is really a lot of work and the basis is a well-designed installation.
  • ADVERTISEMENT
  • #4 17570098
    lukaszd82
    Level 31  
    Then maybe not Rasp pi but some clone with eMMC memory (up to 64GB) for example: ODROID-XU4 or even something with SATA?
    It may be more expensive, but it will cause fewer problems in the future.

    Have a look at this topic:
    Link .
  • #5 17570165
    Dadol91
    Level 2  
    Thanks for the initial responses.

    As I am building a house for probably the only time in my life I am leaving myself a safety gate. I wouldn't want to find 2 years after moving in that what I've done sucks and have to forge plaster to change the installation.

    That's why I plan to run signal cables - e.g. for light switches - under the plaster in conduits. In the extreme case, this makes it possible to use the signal cable as a remote control and pull the traditional 230V cable through. A small change in the installation and we have everything traditionally. The only loss will then be the wires I pull out of the wall.

    I don't really care about the lights, as they will work when the Arduino is working. Perhaps I will get a replacement with ready-made software in case of failure. A quick swap would then suffice and everything would be back to normal.

    It will be worse with the heating, because here I will need Domoticz to work properly. And here I need to think about how to protect myself. Any suggestions? Let's assume that under normal conditions, a temp sensor placed in the room gives information to the Rpi. I set up a simple logic in Domoticz - if there is a difference of e.g. 2 degrees from the set temp then open/close the loop.

    What if there is a problem with Rpi or Domoticz? I plan to use actuators (solenoid valves) which have an "open" state in the absence of a signal. In the event of a system failure, in the worst case scenario all rooms will be heated to "full". Then the temperature can still be corrected with the furnace, until the repair.

    As for the switchgear - in my case this is not a problem. I have a 5m x 2.7m wall, so I can even put a few 'cabinets' in there.
  • #6 17570213
    calixto
    Level 23  
    As far as the RPi and Domoticz are concerned, it should be able to cope with the number of sensors. At most, I would think about connecting an HDD to it via USB to collect data. This way you won't overload the SD card with a large number of records and it will probably last much longer. As for the sensor connections, you need to consider whether they will operate analogue or digital (e.g. are you considering using I2C, SPI). This will determine the length of the wires and the number of cores, plus you can think about making a separate power supply for each sensor, which ultimately can be connected to a UPS. I do not know what distances you have from the control panel to the sensors, and if I were you, I would consider whether it would not be practical to connect an Eth-shielded twisted-pair cable (cat 6) to the sensors (it is always better to have more cable strands than fewer).
    Some of the more important parts of the system you can make on the Arduino/STM32/ESP8266, which can have an active watchdog and will continue to work in case the RPI hangs up, in case the watchdog module hangs up it can order a restart or the restart will be done by the RPi. I would rather not leave certain operations on the shoulders of the RPi.
  • ADVERTISEMENT
  • #7 17570299
    lukaszd82
    Level 31  
    In addition to the signal cables, I would immediately pull in some 1-core cables as remote controls to tighten up the new cables ;>.
    I would also prefer to implement the CO furnace control outside Domiticz, and treat this software only as an interface. I would prefer to sew the logic even in some Arduino etc.
    Then you can make islands of control spread around the house and be less prone to faults. To the microprock some kind of web interface (RJ45 connection with a router) in the local network and we have an emergency control (or a small LCD and a few buttons giving the possibility of wary change of settings). Fewer cables to lay and sometimes this may have a purpose (e.g. some cables in the garage).
  • #8 17579385
    ditomek
    Level 22  
    It will only be possible to pull the cables through in the corrugations after plastering if they are straight lengths.
    I advise you to bear this in mind. I am writing from experience.
    Correct laying and selection of cables is one thing, What you install in the switchboard is another.
    Have you thought carefully about:
    what circuit breakers you will use (whether standard for 320V installations)
    how to connect all the switches to your arduino,
    how to connect 230V consumers (lighting and roller shutters) to the arduino
    which specific actuators to use
    how to deal with the mess in the switchgear if you are going to use the proverbial contacts
    how to build in and connect temperature sensors
    exactly how many of these arduino's (mega) you will need
    I personally experienced card failure in the Rpi. A test installation so there was no problem, but the fault happened at the least opportune moment.
    If you are on a business trip, will someone at home be able to cope with such a system and its failures?
    I'm a fan of simple configurations, which is why I have my control on 8-biters, even now I have the web interface set up on an arduino/nodemc.
    If I ever go back to the raspberry it will only be for visualisation because it is indeed much faster than the arduino and allows more.
    But that's me.
    If you don't know how to program yet and you want to make everything yourself then there is a really long way to go besides the hardware issues.
    My advice:
    Do a classic installation but in the lighting and roller shutter circuit boxes add a twisted pair to the switchboard.
    You will now run the installation in the classic manner and add new functionality over time.
    Simply place a relay in the box instead of the switch contacts and control it from the switchboard.
  • ADVERTISEMENT
  • #9 18379435
    calak
    Level 11  
    Gentlemen,
    I have a question on a similar topic to the one above, namely I am buying a house from a developer and I am thinking about adding some control and I think the arduino meets my criteria and offers the possibility of combining many solutions, but to start with I will want to do some testing and make roller shutters - 12 in total.
    The plan is to do it relatively cheaply and use the existing infrastructure (I only have a phase in the push button boxes for the roller shutters and a wire each for up and down control. I was thinking of adding a shielded twisted pair cable to all the boxes and bringing them to the switchboard with the arduino, then adding relay modules (2 channels) in each of the boxes. And here a question arises because the answers found on the forums do not give me a clear answer - will it be possible to control these relays directly from the arduino outputs ? or will it be safer, due to the distances, to duplicate the relays and place the first line of relays controlled from the arduino in the distribution board, add a power supply and control these relays in the boxes ?
  • #10 18387303
    ditomek
    Level 22  
    The control of the relays located in the switchgear requires the laying of a cable with 4 conductors. N, L1, L2, PE.
    A twisted pair will take care of the connection of the button at the window with the arduino placed in the switchboard.
    If the power supply cable to the boxes has only 3 wires and goes to all the windows, you can install the 2-switch modules alone in the boxes.
    The twisted pair will then be used to connect the relays and the switch. Connecting the arduino pins straight to the twisted pair is a bit risky. It is best to use galvanic separation.
    You can use the uln2803 out of the box. It does not give galvanic isolation but should protect the pins. You can use it for both inputs and outputs. You just need to connect it "in reverse".
  • #11 18390240
    calak
    Level 11  
    This is the original plan to put small double relay modules in all the roller shutter boxes, hence the long lengths of twisted pair cable that would control all this from the arduino. I'm going to try my hand at this uln2803 and if that doesn't work I'm going to use dual relay modules which will give me galvanic separation and complete security.

Topic summary

The discussion addresses the design and potential drawbacks of a home automation system based on Raspberry Pi 3, Arduino Mega, and Domoticz for controlling lighting, blinds, intercom, underfloor heating loops, and sensors in a newly built detached house. Key considerations include ensuring system reliability through regular backups and fresh system images to mitigate SD card failures common in Raspberry Pi setups. Alternatives like ODROID-XU4 with eMMC storage are suggested for improved stability. Proper wiring practices are emphasized, such as separating signal/control cables from power lines by at least 4-5 cm to prevent voltage induction, using shielded twisted-pair cables (e.g., Cat 6) for sensor connections, and installing sufficient conduits to allow future cable replacement or upgrades. The importance of designing manual override controls (e.g., staircase switches) for emergency operation is highlighted. For heating control, it is recommended to offload critical logic from Domoticz to microcontrollers (Arduino or STM32) to create distributed control islands with local interfaces, enhancing fault tolerance. The use of galvanic isolation (e.g., opto-isolators or ULN2803 driver IC) is advised when controlling relays over long distances to protect Arduino pins. Relay modules can be installed locally in roller shutter boxes, controlled via twisted-pair cables from the Arduino in the switchboard. Proper selection and arrangement of circuit breakers, relays, and temperature sensors in the switchboard are crucial to manage complexity and ensure safety. Data logging to an external USB HDD is recommended to reduce SD card wear. Overall, the system requires careful planning of hardware layout, wiring, power supply, and fallback manual controls to ensure reliability and maintainability in a wired home automation environment.
Summary generated by the language model.
ADVERTISEMENT