Building a Self Hosted Smart Lighting System using Node-RED & Zigbee2MQTT

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ม.ค. 2025

ความคิดเห็น • 55

  • @camerongray1515
    @camerongray1515  3 ปีที่แล้ว +6

    You can find the products shown in this video on Amazon (Affiliate):
    UK:
    - Philips Hue Bloom - amzn.to/3w1mLYC
    - Müller-Licht Tint RGBW E14 Bulb - amzn.to/3fiEOUc
    - Ledvance RGBW E27 Bulb - amzn.to/3delrc7
    - CC2531 Zigbee USB Stick - amzn.to/3m4HqGM
    - CC Debugger - amzn.to/3w6Is9C
    - CC Debugger Cable - amzn.to/3ddQIw4
    - Raspberry Pi 3 Model B+ - amzn.to/39kRfLm
    - Raspberry Pi PoE Hat - amzn.to/3tYDslB
    - Kioxia 16gb MicroSD Card - amzn.to/39kMOjN
    US:
    - Philips Hue Bloom - amzn.to/3tT1CxQ
    - CC2531 Zigbee USB Stick - amzn.to/2O4i7bi
    - CC Debugger - amzn.to/3dfwRMK
    - CC Debugger Cable - amzn.to/3u35jRx
    - Raspberry Pi 3 Model B+ - amzn.to/3m0fkwm
    - Raspberry Pi PoE Hat - amzn.to/3lXMHzV
    - Kioxia 16gb MicroSD Card - amzn.to/3da4cJg

    • @__Ben
      @__Ben 3 ปีที่แล้ว +1

      Just wondering why you are running z2m and Node-RED? I use Home Assistant and Node-RED instead - was just wondering the reasons for your choice :)

    • @kbhasi
      @kbhasi 3 ปีที่แล้ว

      @@__Ben
      I think he wanted to bypass the original manufacturer's services entirely.

    • @__Ben
      @__Ben 3 ปีที่แล้ว +1

      @@kbhasi Home Assistant does bypass the original manufacturers services; It's also kind of a null point if you're using Zigbee anyway.

    • @kbhasi
      @kbhasi 3 ปีที่แล้ว

      @@__Ben
      Oh, I see. Thanks for correcting me.

  • @Forke13
    @Forke13 4 หลายเดือนก่อน +1

    This is 100% what I was looking for. Nothing more, nothing less. Thank you very much. Immo go order some stuff...

  • @FranzCritchlow
    @FranzCritchlow 3 ปีที่แล้ว +6

    We would make great neighbors. Until that happens I will continue to incorporate ideas like this into my home. Thanks for spending my money :-)

  • @thereason1010
    @thereason1010 3 ปีที่แล้ว +3

    You have one of my favorite channels on TH-cam! Great job Cameron

  • @jamiechampion299
    @jamiechampion299 3 ปีที่แล้ว +1

    I've never done anything even remotely close to this, but after watching this video I think I might try to tackle something similar. Great video!

  • @maltoNitho
    @maltoNitho 3 ปีที่แล้ว +1

    “...I’m not going about this the normal way...” *crush intensifies* Lol. What a novel approach-I love it!

  • @RonsonDenmark
    @RonsonDenmark ปีที่แล้ว +1

    I couldn't figure out what was going on until I realized this did not involve home assistant :)
    I'm used to ZHA but wanted to try Z2M so I was looking up how to actually use the devices in node-red compared (to ZHA) - spoiler: it's exactly the same..

    • @camerongray1515
      @camerongray1515  ปีที่แล้ว

      Yeah, Home Assistant is a good option but I just don't get on well with it, I think I try and push it too far. I find Node-RED lines up with better with my way of thinking since it's a lot more programmatic. I've actually started using Home Assistant as part of my setup, however I'm using it with helper/virtual entities so that I can use it to create a nicer UI than Node-RED offers and also use it's integrations for interfacing with more propaitery smart devices such as my Nest thermostat and Viesmann boiler. Even then, all of the actual logic is handled in Node-RED using the Home Assistant plugin.

    • @RonsonDenmark
      @RonsonDenmark ปีที่แล้ว

      @@camerongray1515 But can't you just do the exact same things in HA with Node-RED as an add-on? I use Node-RED for all my logic too.

  • @pauldawson360
    @pauldawson360 3 ปีที่แล้ว +1

    thanks for another great video enjoy your take on things. i hate the online account and control grid built in to smart technology so any of your tech solutions to thwart their monitoring is always helpful. keep it up.

  • @seandean8293
    @seandean8293 3 ปีที่แล้ว

    You are the best TH-camr ever Cameron. You can add you Texecom alarm to home assistant using the smartcom or the com IP module.

  • @WMartinNI
    @WMartinNI 2 ปีที่แล้ว

    Looking forward to watching these, I've been thinking for a while that I want to move my heating to something I can control from outside the house but I'm also not keen on using an external server, I'd rather host my own. I was more worried about getting off the shelf hardware that'll work with a self hosted server and thought they might be hard to find then I found your mini series!

  • @briandurward
    @briandurward 3 ปีที่แล้ว +2

    Lidl also have cheap zigbee bulbs plus plugs. LEDs and power strip. You might also be interested in the Bigtimmer node (Pete Scargill) to set on and off control.

    • @camerongray1515
      @camerongray1515  3 ปีที่แล้ว

      I'll need to keep an eye on the ones in Lidl, unfortunately they didn't have any RGB bulbs when I checked but I tend to shop there semi-often so I'll check what they have every so often.

  • @OrangeHex.
    @OrangeHex. 3 ปีที่แล้ว +1

    Thanks Cameron, I've been using Node-red for years doing home power monitoring, temp/openweather stuff and lights on and off. Blynk is a nice app for your phone by the look of it - I don't use it I use MQTT Dash and CloudMQTT - I know it's external !

  • @BillyDickson
    @BillyDickson 3 ปีที่แล้ว +1

    I was going to go the Raspberry Pi route, but after a bit of thought (not time rich), went and purchased a Hubitat, happy with my choice so far.
    Living in the UK and having an older house, it's a bit of a pain trying to find a decent no neutral zigbee light switch.
    Good luck on rabbit hole that is home automation. :-)

    • @__Ben
      @__Ben 3 ปีที่แล้ว

      No neutral Zigbee Light Switches are plentiful and cost around £12-£14 each on Aliexpress. Look for "tuya zigbee no neutral switch" plenty of different style options too.

    • @BillyDickson
      @BillyDickson 3 ปีที่แล้ว

      @@__Ben Thank you Ben, I'll look into that.

  • @alpine7840
    @alpine7840 3 ปีที่แล้ว

    Just love videos, Thank you so much!

  • @David_Phantom
    @David_Phantom 3 ปีที่แล้ว +3

    Something that might be good is to network boot the Pi. You said you want to set and forget the pi, but in my experience the SD cards are prone to filesystem corruption. Granted, you're not going to be doing a lot of reading and writing to the sd card, but this way you can host the storage remotely on your server, and then if you decide to switch the OS for some reason or something goes wrong with the image and you want to restore from a backup, you can swap out the image without needing to remove an sd card. Setting up pxe boot on a Pi isn't the easiest, but it allows for easy image changes without the fear of sd card corruption once it's set up.

    • @camerongray1515
      @camerongray1515  3 ปีที่แล้ว +1

      It's definitely possible and could be useful in an environment where you have a large number of devices where you don't want to have to manage local firmware updates however for a device like this it's probably more hassle than it's worth. I'd then need to run and maintain the network boot server and would need to keep it and the whole network alive in order for the pi to be able to boot. Zigbee2MQTT does need to write at least small amounts of data to persistent storage (e.g. paired devices, device names.etc) so then I'd also need some sort of network file mount for it to write to. The idea behind this was "set and forget" so I'd rather have something that'll definitely boot every time, I don't really have a need to ever change the firmware on it now it's running. The idea with alpine is that it should avoid filesystem corruption, the whole OS runs from RAM with only one directory mounted as a live filesystem, I've generally found that SD cards are killed by writing to them too much rather than just having them powered on long term, I totally killed an SD card years ago running a UniFi controller on it where it was constantly writing to a database. A network booting Pi will probably also be tricky in the event of a power cut, it's likely that the Pi will start network booting long before any of my network hardware or server will have started up fully, unless the Pi has support to retry indefinitely I'd probably need to manually power cycle it to get it back online.

    • @David_Phantom
      @David_Phantom 3 ปีที่แล้ว +2

      @@camerongray1515 Very fair points. When I commented, I hadn't gotten to the Alpine Linux part of the video. I didn't realize, but really should've realized, that Alpine runs on Pis. In fact, my entire experience with it was with containers, so I didn't even think about installing it on actual hardware. What a clever idea.

  • @und4287
    @und4287 3 ปีที่แล้ว +1

    Extra note: If you want to use the official Raspberry Pi PoE HAT, you need a Pi 3B+ or Pi 4. These models have an extra 4-pin header, which the PoE HAT uses to tap into the Ethernet port. There are third-party PoE HATs that support older models of Pi, but those are not as elegant, as you need to plug the Ethernet cable from the PoE source into the HAT, and then connect another Ethernet cable between the PoE HAT and the Pi's Ethernet port.

  • @ncot_tech
    @ncot_tech 3 ปีที่แล้ว +1

    Do any self hosted systems integrate with voice assistants yet? The only way smart lighting exists in our house is because talking to them is far easier than pressing a switch on the wall (or digging out a phone, opening an app, waiting for it to connect... etc...)

    • @camerongray1515
      @camerongray1515  3 ปีที่แล้ว

      It's definitely possible although unless there are premade systems out there you may need to build your own Alexa skill and then have it make a call to an API that you host on your network.

  • @snakesms
    @snakesms 3 ปีที่แล้ว +1

    Hi Cameron, thnx for cool video. Could you clarify how you gut current state of your bulbs before updating them either from MQTT or Z2M please? Or you are actually keeping state in the Node's variable? If so, how you preserve state over raspberry reboot. Thanks in advance

    • @camerongray1515
      @camerongray1515  3 ปีที่แล้ว +1

      You can change individual attributes of the bulbs rather than having to send all the state at once so you don't really need to store it - If you change the brightness you don't need to know the current colour for example. The bulbs then tend to remember their state when power cycled although I think this can be changed. In my setup I do store the current state in Node-RED, of course you could cause it to become inconsistent by changing a bulb outside of Node-RED but this isn't really a big deal for me, it's robust enough for my needs.

  • @joesmith4940
    @joesmith4940 2 ปีที่แล้ว

    Hi Cameron, I should add that I plan to use the Sonoff Zigbee 3.0 USB Dongle Plus configured as a coordinator to control the zigbee mesh. Am I correct that getting ZigBee2MQTT and NodeRED installed are the keys to this, please? Many thanks, Joe

  • @JoshuaFawcett
    @JoshuaFawcett 3 ปีที่แล้ว +3

    Not all Zigbee stuff is created equal, we've got a Hive Heating system which is "Zigbee" but it won't work with anything other than its own hub and app for some bizarre reason.

    • @camerongray1515
      @camerongray1515  3 ปีที่แล้ว +2

      Yeah, you do need to be careful to make sure the device you have is supported by zigbee2mqtt (or at least open enough that you could add your own support). Thankfully there are other Zigbee thermostats that are known to work. That said, looking at the zigbee2mqtt device support list, the hive receiver (the bit that connects to your boiler) does seem to have some endpoints around reading the temperature and setting the heating state so I wonder how usable that would be (may be that you need to talk to the receiver rather than the thermostat itself?) - www.zigbee2mqtt.io/devices/SLR1b.html

  • @joesmith4940
    @joesmith4940 2 ปีที่แล้ว

    Hi Cameron, Great video. I've installed Alpine Linux as a headless installation on to a RPi 4. However, I haven't discovered how to install NodeRED or ZigBee2MQTT - I cannot get past the limitating that Alpine Linux has for its specific apk installation command. Can you provide a step-by-step about how you did this, please?

  • @pineappleroad
    @pineappleroad 3 ปีที่แล้ว

    if i ever went down the route of smart lighting and/or smart heating, after what has happened over the past few days I would DEFINITELY want to go self-hosted, especially after what happened over the past two days (hint: no youtube, no multiplayer games, even some single-player games refused to open)

  • @Sebisation
    @Sebisation 3 ปีที่แล้ว +2

    If you need cheap Zigbee lights buy IKEA Tradfri bulbs - they are even cheaper than the Müller Licht tint lights

    • @__Ben
      @__Ben 3 ปีที่แล้ว

      The Lidl Zigbee lights are cheap too, and in some cases brighter than Hue bulbs.

    • @camerongray1515
      @camerongray1515  3 ปีที่แล้ว +1

      Definitely looking forward to trying other brands, unfortunately Lidl didn't have any RGB bulbs when I checked and IKEA is closed due to covid and delivery times were huge. Will definitely be checking out IKEA stuff in the future though!

  • @pleaseremove
    @pleaseremove 3 ปีที่แล้ว

    Hi Cameron. As someone who is just starting to flirt with Zigbee and had pretty much decided on Zigbee2MQTT, am very interested in the software size of your Pi with Alpine. Alpine sounds like it solves my main concern regarding SD lifespan. I was personally planning on connecting over to Home assistant as some others have mentioned as they provide a better all in one solution for me, but this solution gives me a remote Zigbee module which was the part I was most struggling with. Would you be able to suggest any articles you found helpful in setting this up, even a history dump just to give some pointers. Very keen to replicate, but from a position of less understanding this isn't quite enough. Thanks and appreciate the video, as always, very good

  • @andljoy
    @andljoy 3 ปีที่แล้ว +8

    Your view is not controversial, its sensible. Just because everyone else accepts privacy invading systems like "smart" devices and alexa spy equipment does not mean they are right.

    • @RuuDBoY868
      @RuuDBoY868 3 ปีที่แล้ว

      The main reason (other than cost and time to setup) why I don't use home automation, I don't like putting everything online

  • @drreality1
    @drreality1 3 ปีที่แล้ว

    I guess I’m control freak like you 😅
    Node red is hands down amazing
    The only difference from you ,I have home assisting as the unifying hub with node red inside it for the automations
    Have a look at it has its automation engine which could do simple binary stuff easily
    Good luck

  • @JamiePhonic
    @JamiePhonic 3 ปีที่แล้ว +5

    Another great video!
    Can i suggest you take a look at Home Assistant?
    Its an open source Home Automation server that has integrations for basically anything you can think of, and tonnes of 3rd party community integrations too (Including Node Red)

    • @camerongray1515
      @camerongray1515  3 ปีที่แล้ว

      Definitely an interesting thought, it's something I'd never really considered using previously since it didn't seem "flexible" enough to give me the amount of control that I can get through Node-RED, although using it in addition to Node-RED could be interesting. Not sure how much of a benefit it would give but may be a nicer UI for a dashboard?

    • @JamiePhonic
      @JamiePhonic 3 ปีที่แล้ว +2

      @@camerongray1515 It's come a long way recently. It offeres an insane amount of control (at least for me).
      It's "automations" are fully configurable, down to adding "If Then" statements in.
      For example: when i press {button}, IF its after 8PM but before 7 AM, turn on {light} at 50% brightness with a color temp of X, otherwise, turn on {light} at 100% with a color temp of Y
      It has support for the Netio PDU you reviewed recently too, so im sure you'd come up with some automations for that.
      Wether the UI is nicer for a dashboard is a matter of personal preference, but it is fully themable, and there are loads of community themes to pick from, or you can just make your own!
      Plenty of youtubers have content on Home Assistant (Dr.zzs probably being the most prominant one i know of?)
      I'd be happy to give you a look at my Home Assistant setup if you like? (Always happy to help out a fellow Scotsman!)

    • @citronski
      @citronski 3 ปีที่แล้ว

      @@Niklas2516 Will Siri work offline?

    • @NearCry91
      @NearCry91 3 ปีที่แล้ว

      @@camerongray1515 Another Home Assistant youtuber is The Hook Up. There's also an alternative to Home Assistant called OpenHAB.

    • @willtree8142
      @willtree8142 3 ปีที่แล้ว +1

      +1for HA, even if you don't end up with it, definitely worth checking out as it's pretty flexible and has support for a wide range of IoT garbage

  • @torinstorkey
    @torinstorkey 3 ปีที่แล้ว

    Why smart bulbs not smart switches.

    • @camerongray1515
      @camerongray1515  3 ปีที่แล้ว +2

      My main reasoning for the smart lighting is so that I could have RGB and configurable colour temperature whereas a smart switch would only really give on/off control or possibly dimming (which technically could do temperature control if I used special bulbs that change temperature when dimmed but wouldn't support RGB). In terms of on/off control I'd rather still just fully isolate the power with a physical switch.

    • @Maaniic
      @Maaniic 3 ปีที่แล้ว +1

      @@camerongray1515 Turning the power on and off to the bulbs might keep messing with the zigbee mesh depending on how they are placed in your home. Bulbs should always have power so that they can work as mesh routers. Another thing is that if there are children present at any time and you have physical switches you run the risk of having your bulbs factory reset as most do that by switching the power on/off rapidly 5-6 times.

  • @jonathanInLondonUK
    @jonathanInLondonUK 3 ปีที่แล้ว +1

    Many cheap remote switches are based on Tuya as you mention. You can use tasmota.github.io/docs/Tuya-Convert/ to install Tasmota on many of them (check compatibility list) which converts them to support local MQTT control. I've had success with www.amazon.co.uk/dp/B07ZSDWQQ8 which means I can switch existing appliances off/on.

  • @jasonlee3247
    @jasonlee3247 3 ปีที่แล้ว

    His flat just screams single guy...