logo elektroda
logo elektroda
X
logo elektroda

Raspberry Pi 3B+ Home Assistant Setup for Smart Apartment Lighting Control

tomashbe 1353 13
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18972305
    tomashbe
    Level 9  
    Hello practitioners and smart home/residential professionals and anyone else interested in this thread :)

    Please evaluate the smart home idea, suggestions on what to give up, what to change, what to necessarily do, also through the prism of how they are implemented colloquially :) I am also very interested in how it should look like in the switchboard, please give me some hints.
    The project is amateurish and was created while gaining knowledge "on the fly", it's hard not to use bare concrete - general from a renovation in the flat :)
    The Raspberry Pi 3B+ with Home Assistant (so far I've really liked this kit) will be the heart of the whole thing.

    I am very much counting on your help !

    The aim is to control the lighting - the cables are drawn directly to the switches, there are almost 16 wires in total, which will be controlled in 8 rooms/places - with relay modules. In addition, collecting temperature and humidity from selected rooms from sensors, collecting and using information from reed switches, e.g. entrance doors, PIR sensors, and later probably reed switches on wifi for other doors and control of additional lighting, such as LED strips or plafonds via RF, but I have to read both. I would also like to find out how to log a doorbell press (?) and possibly use this to trigger the recording of a short video from the judas - I have found some information on the latter.

    Everything will be mounted on a DIN rail in a 3x18 switchboard (with room for ideas) :
    Raspberry 3B+ with 3x3cm fan and power supply,
    400 pin contact board for the modules and sensors,2 modules of 8 relays with probably a separate power supply for them and for the sensors,
    Temperature sensor.
    In the switchboard or very close by I am considering putting a LAN switch.
    By the prism of the temperature measurements collected I will consider adding a fan.

    As far as the wiring is concerned, there is a decent twisted pair cable for the optional sensors and others to each light control box - switches - in addition and e.g.: one day under the light switch status download but here too I need to educate myself....

    The solution (perhaps eventually) is to work on the principle: the current is fed from the fuses through the relay module via NC (normally closed) and the control would be based on normal switches plus there would be the option of control when the switch is on - then there would be the additional possibility of controlling the application on the phone via Home Assistant or by other means... Due to the use of NC then the relays would not generate the temperature until the lights are switched off with them and the whole thing would work regardless of what happens to the tinkerer the current would go to the lights traditionally. Water features available for those interested and within the needs.... I am tempted to call this project a hybrid smart home/apartment :) .
    Do you have a problem with Raspberry? Ask question. Visit our forum Raspberry.
  • ADVERTISEMENT
  • #2 18972540
    kood
    CCTV and Stationary Alarms specialist
    tomashbe wrote:
    through a relay module via NC (normally closed) and the control would be based on normal switches plus there would be an option to control when the switch is on - then there would be an additional possibility to control with a phone app via Home Assistant or by other means....


    Not a very apt solution. Better bell buttons and control with them so that the control panel knows the status of the light and that it can be manually controlled at any time.
  • ADVERTISEMENT
  • #3 18972557
    tomashbe
    Level 9  
    I know - amateur question but I'm not hiding :) - how do I realistically implement this in this project?
    What would I need to buy / make?
  • #4 18973229
    marcingebus
    Level 11  
    tomashbe wrote:
    I know - amateur question but I'm not hiding :) - how do I realistically implement this in this project?
    What would I need to buy / do?
    .
    I have a similar idea and I see it like this (lighting/contactors/motion sensors):
    - switches and light points go down to the switchboard.
    - Switches obviously bell switches that control bistable relays (SSR? not sure if there are any). A bistable doesn't draw any current when operating.
    - The raspberry/ESP or other 'heart' knows the state of the relay and controls the relay, analogous to a bell switch. Raspberry responds to motion sensors, reed switches, smartphone control, programmable switching etc....

    I have a dilemma: I want to terminate the cables from the switches and light points in all the rooms on ZUGs in the switchgear, so that I can patch them into one relay or another. It is probably necessary to draw everything up so that you know how many ZUGóe, how many relays, etc.....

    Maybe someone can advise on popular, cheap ZUG's. Is the PE on the ZUG (which splices it on TH35: Wago/TopJob-S with a slide switch for N, or maybe 2-level and PE always on the main list? Or single-level?

    Added after 3 [minutes]: .

    Here is a cool looking set:
    https://www.youtube.com/watch?v=Dj5SFBTHJA4
  • ADVERTISEMENT
  • #5 18973328
    sk1977

    IT specialist
    tomashbe wrote:
    Raspberry Pi 3B+ with Home Assistant
    - For fun OK, but getting worse from update to update. Especially if you want to use an SD card. If a tiny one then a 4 with SSD is better.
    Another downside is HA integrations and updates - read how many problems arise....
    Overall my impression is that there is an outline of the project - and as they say the devil is in the details. And these details can take you apart the whole project....

    In addition, if you want to do everything from scratch then there is a lot of work ahead of you - and design, and implementation, and subsequent troubleshooting.
    As Col. Kood already mentioned - relay control is not a good idea. I'd like to add that if you connect a relay in parallel - you can only turn the light on. If in series - only turn it off. 2 Relays? Think it over carefully and draw it out, because you can have many surprises....

    How about, instead of relays, some kind of switch - e.g. controlled by Zigbee + candle switches, or just a ready-made switch on Zigbee (without network connection it works "manually")?
    With e.g. a Conbee2 or similar multi-frame you can 'offload' from the manufacturer's cloud and closed ecosystems - maybe worth considering.
    If you want wired then see what you can do on a control panel - https://ropam.com.pl/pliki/an_system_alarmowy_neogsmip.pdf - worth a look at least for inspiration.
    Helpful post? Buy me a coffee.
  • #6 18973903
    tomashbe
    Level 9  
    sk1977 wrote:
    tomashbe wrote:
    Raspberry Pi 3B+ with Home Assistant
    - For fun OK, but getting worse and worse from update to update. Especially if you want to use an SD card. If a tiny one then a 4 with SSD is better.
    Another downside is HA integrations and updates - read how many problems arise....
    Overall my impression is that there is an outline of the project - and as they say the devil is in the details. And these details can take you apart the whole project....

    In addition, if you want to do everything from scratch then there is a lot of work ahead of you - and design, and implementation, and subsequent troubleshooting.
    As Col. Kood already mentioned - relay control is not a good idea. I'd like to add that if you connect a relay in parallel - you can only turn the light on. If in series - only turn it off. 2 Relays? Think it over carefully and draw it out, because you can have many surprises....

    How about instead of relays, some kind of switch - e.g. controlled by Zigbee + candlestick switches, or just a ready-made switch on Zigbee (without network connection it works "manually")?
    With e.g. a Conbee2 or similar multi-frame you can 'offload' from the manufacturer's cloud and closed ecosystems - maybe worth considering.
    If you want wired then see what you can do on a control panel - https://ropam.com.pl/pliki/an_system_alarmowy_neogsmip.pdf - worth a look at least for inspiration.


    I feel I've described the solution too poorly and your suggestions are partly inadequate so to lighten things up - it looks more or less like the image below.
    Each PLUS wire goes through the relay in the NC option and goes to the switch and from there this wire goes to the "bulb" which gives a constant flow of current to the switch and it decides whether the current goes to the "bulb" and I, if I want to, when the switch is in the ON position I can turn off the light by activating the relay e.g.: by phone. This way, the switch has to be in the ON position to be controlled by the phone.
    I would be willing to consider bell switches and the operation of the lighting based on them, but I would like to do this in the next step, when the whole installation will be stable according to expectations and as I understand it, this will be possible thanks to the twisted-pair cable led to the switches...?

    Raspberry Pi 3B+ Home Assistant Setup for Smart Apartment Lighting Control
    .

    Right upgrades can wreck everything so I won't consciously do them and if I do this is the solution that allows me to unplug the Raspberry at any time from the installation and play around with upgrades outside of the project or even hide it in the cupboard because the current will still flow through the relays (NC) ....
    The Raspberry 4 will heat up and the SSD I can from what I read also use in my Raspberry 3B+ (I even have an SSD for that purpose in the cabinet ;) but now I don't have time for that and it works and I have backups so I'm at home ;) )

    I don't understand the idea why I would connect the relays in series or parallel when I can treat it as a PLUS intersection to the destination ? Can I not ???

    Thanks.
  • #7 18973985
    sk1977

    IT specialist
    tomashbe wrote:
    I don't understand the idea why I would connect relays in series or parallel
    .
    tomashbe wrote:
    when the switch is in the ON position then I can switch off the light by activating a relay e.g.: by phone
    .
    So that it can be controlled independently - but if the control is only to work if the switch is on ON then there is no need. But it is a major functional limitation.

    Each wire PLUS goes through a relay in the NC option and goes to the switch [/quote] - do you have a DC installation?

    tomashbe wrote:
    this is what I would like to do in the next step when the whole installation is stable as expected and as I understand it will be possible with a twisted pair run to the switches...?
    - this will become apparent as the details are in place.
    The concept is specific and looks very functionally limited - e.g. this control of the application only possible with the switch on strongly surprised me - I didn't expect that.
    Helpful post? Buy me a coffee.
  • #8 18974124
    Anonymous
    Level 1  
  • #9 18974142
    tomashbe
    Level 9  
    sk1977 wrote:
    sk1977 wrote:
    tomashbe wrote:
    I don't understand the idea why I would connect relays in series or in parallel
    .
    tomashbe wrote:
    when the switch is in the ON position then I can switch off the light by activating a relay e.g.: by phone
    .
    So that it can be controlled independently - but if the control is only to work if the switch is on ON then there is no need. But this is a major functional limitation.

    Each PLUS wire goes through a relay in the NC option and goes to the switch
    - do you have a DC installation?

    tomashbe wrote:
    this is what I would like to do in the next step when the whole installation is stable as expected and I understand this will be possible with a twisted pair run to the switches...?
    - this will become apparent as the details are in place.
    The concept is specific and looks very functionally limited - e.g. this control of the application only possible with the switch on strongly surprised me - I didn't expect that.


    Now you have surprised me :) - what do I mean by DC installation?
    I don't know if this will answer your question, but I will write - the entire electrical installation is being laid anew - the lighting I want to control has its own dedicated wires pulled from the switchboard. By NC here I meant using the conductor connection through the Normally Closed condition in the relay I intend to use, where the current flows through the relay i.e. the contacts in the relay are in this position by default and no current is consumed nor any action required to achieve current flow.

    Regarding developing the functionality, having these dedicated wires and a twisted pair, am I able to read the status of the bell switch ? What would be needed to do this ? I imagine it would be some module hidden in the switch ?

    Thanks.
  • #10 18974185
    sk1977

    IT specialist
    tomashbe wrote:
    what do I mean by a DC installation?
    - one in which there is a "plus". That is, not the kind that should be present in a dwelling according to current regulations, standards, etc, etc.

    tomashbe wrote:
    By NC I meant here the use of the conductor connection through the Normally Closed state in the relay I intend to use, where current flows through the relay, i.e. the contacts in the relay are by default in this position and no current is consumed nor any action needed to achieve current flow.
    - You don't need to explain what NC is, especially in such a convoluted way....
    tomashbe wrote:
    having these dedicated wires and a twisted pair, am I able to read the status of the bell switch
    - and why read it? If you don't hold it down then its status is known.

    What electrical knowledge do you have? With all due respect - I agree with Kol Erbit's first sentence. Making or modifying an installation requires proper knowledge and mistakes can cost someone their health or life.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #11 18974241
    Anonymous
    Level 1  
  • #12 18974752
    Szyszkownik Kilkujadek
    Level 37  
    tomashbe wrote:
    I am very much counting on your help !
    .
    Give yourself a break and buy a ready-made one. It will be cheaper and quicker.
    I know what I'm saying because I've wasted a ton of time on proprietary solutions myself. And now that I am wiser I would buy a ready-made one.
  • #13 18975002
    marcingebus
    Level 11  
    Here you have a bistable relay - two stable states. Switching to the second state when a voltage is momentarily applied. Instead of one of the switches you plug in your Rasbberry Pi, or whatever you come up with one day, and you'll already have everything working without a RaspBerry Pi. I think you've set yourself up for relays that are sold as modules for RaspberyPi/Arduino/ESP. Get out of that circle and use, something that has been invented for lighting. Of course there are plenty of relay manufacturers out there, I don't know if there are bistable SSRs, but since people are using non-SSRs for lighting, non-SSRs should live too. After all, lighting is not controlled every 10 seconds on/off. https://www.youtube.com/watch?v=NgB449q-eJo
  • #14 18975003
    Szyszkownik Kilkujadek
    Level 37  
    Ready-to-assemble systems (random order:
    - Fibaro
    - Zamel Supla
    - Zamel Exta Life
    - Zamel Exta Free
    - Grenton
    - Ferguson
    - El-home
    - Orno smart living

    And an open system that offers a lot of possibilities and is called 'tuya'. It is an application that supports a whole host of dedicated modules. From the simplest relays, to cameras and motion detectors, to quite advanced sensors.

    Have the electrical installation done by an ELECTRICIAN in the standard manner of the so-called "no-ush", i.e. without junction boxes on the walls near the ceiling. It is worth giving deep junction boxes, or even pocket junction boxes. Don't be a hero in your home, because electricity is no joke.

Topic summary

The discussion revolves around setting up a Raspberry Pi 3B+ with Home Assistant for smart lighting control in an apartment. The user seeks advice on the implementation of a lighting control system using relay modules, with a focus on wiring and switchboard configuration. Suggestions include using bistable relays to avoid current draw when lights are off, and integrating motion sensors and smartphone control. Concerns are raised about the complexity of DIY solutions, with recommendations to consider ready-made systems for efficiency and safety. Various brands and systems are mentioned as alternatives to custom setups.
Summary generated by the language model.
ADVERTISEMENT