# Christmas Tree Light control

**URL:** <https://discourse.nodered.org/t/christmas-tree-light-control/99939>\
**Category:** Share Your Projects\
**Created:** [13 December 2025 01:00 UTC](https://discourse.nodered.org/t/christmas-tree-light-control/99939 "2025-12-13T01:00:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [13 December 2025 01:00 UTC](https://discourse.nodered.org/t/christmas-tree-light-control/99939/1 "2025-12-13T01:00:17Z")

</div>

I bought some `Kasa Smart WiFi Plug Mini, Model: HS103` last year and I created a small flow to control the string of LED's I have on our Christmas tree. It is a small flow:

 ![Screenshot 2025-12-12 at 7.54.20 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/2/42824bf05c216dfd627bc5937b1d81f23bc1e477.png)

You just need the IP address of the Smart Plug and enter the Lat/Lon of your location and add the start and stop times for when the lights should be on.

You can also use the dashboard (dashboard 1, I need to do a dashboard 2 version) switch to turn the lights on or off.

Here is the flow if anyone wants to use it.

```auto
[{"id":"269fb1c8360b2bd0","type":"smalltimer","z":"9b047591bc61cbf5","name":"Small timer","position":"fe79e9bbdb1298e5","startTime":"5108","endTime":"1380","startOffset":0,"endOffset":0,"topic":"","sendEmptyPayload":false,"onMsg":"true","onMsgType":"bool","onTimeout":"0","minimumOnTime":0,"offMsg":"false","offMsgType":"bool","offTimeout":"1440","rules":[{"type":"include","month":"12","day":"0"}],"repeat":false,"repeatInterval":60,"wrapMidnight":false,"injectOnStartup":false,"debugEnable":false,"outputs":1,"timeout":1440,"x":550,"y":180,"wires":[["957dc8c5def893ad","e87cc436b7dc48b9"]]},{"id":"fe79e9bbdb1298e5","type":"position","name":"Foxboro","latitude":"42.09091052","longitude":"-71.22795671"}]

```

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [13 December 2025 11:08 UTC](https://discourse.nodered.org/t/christmas-tree-light-control/99939/2 "2025-12-13T11:08:40Z")

</div>

I've long put our Christmas tree lights on smart plugs controlled by Node-RED. I generally just use a timer though since having them on is more about when we are about to see them than anything related to sun position. 😃 I do use sunrise/set timings for other lights around the house though. However, there are certain times of year when really, they need an additional adjustment, I should really wire up a light sensor instead which would be much better, I just never seem to quite get that job to the top of my stack. 🤷

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [13 December 2025 11:38 UTC](https://discourse.nodered.org/t/christmas-tree-light-control/99939/3 "2025-12-13T11:38:18Z")

</div>

> [@TotallyInformation](#):
>
> wire up a light sensor

Yeah, a light sensor compensates very well for weather conditions and can be used as a complementary sensor to sunrise/sunsets if prefered. For lights around the house it is also nice to use offsets, i.e. lights are on a short period before sunset and after sunrise. Is just that tasklist that never seems to end...

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [13 December 2025 13:10 UTC](https://discourse.nodered.org/t/christmas-tree-light-control/99939/4 "2025-12-13T13:10:39Z")

</div>

> [@krambriw](#):
>
> For lights around the house it is also nice to use offsets

Yes, I do use offsets, largely because our Victorian house has some dark spots that need more help.

> [@krambriw](#):
>
> a light sensor compensates very well for weather conditions and can be used as a complementary sensor to sunrise/sunsets if prefered

I did have one running, connected to the office window on the 1st floor (the 2nd floor for our US floor counting challenged friends! 😃) but it failed a while back and I've had more important issues and disasters on my hands this year so haven't yet managed to replace it.

Ideally, you need a sensor that measures both general light level AND sunlight. Though that is harder and probably easier just to use a weather forecast for that last part.
