Power Schedule
N8N

Power Schedule

Don't want your Pixel clock to be on 24/7? Schedule off and on times with this simple n8n Workflow.
A flow by Brian Lovelace

Download flow

Flow Details

Since my clock lives on my desk at home and I'm only there between certain hours of the day, I figured it would be great if I could easily trigger my Pixel clock to turn off during my away (sleeping) hours. This is a very simple n8n workflow that can be customized for your needs, and expanded, if say, you keep your clock at work and you're not at the office on Saturdays and Sundays.

This is probably the simplest n8n workflow to set up, and is a great place for beginners to start their pixel clock and n8n workflow journey.

Setup

Step 1: Changing the Clock IP Address

Under each node for "Clock On" and "Clock Off" you'll need to ensure the the clock IP address is correct under the URL field.

Step 2: Changing the trigger times

This is as easy as going into each Trigger Node (Night Trigger & Day Trigger) and adjusting their run times.

Customization

You can duplicate any of the triggers and HTTP Request nodes to create your own on/off triggers. Since these run independently, you don't need to create extra workflows, just add any other trigger days/times into their own separate trigger sequences and let the magic happen.

{ "name": "Pixel Clock Power Control", "nodes": [ { "parameters": { "rule": { "interval": [ { "triggerAtHour": 9 } ] } }, "id": "51a45109-3019-4563-b0c1-b35ff0ca07ae", "name": "Morning Trigger", "type": "n8n-nodes-base.scheduleTrigger", "typeVersion": 1, "position": [ 1000, 640 ] }, { "parameters": { "rule": { "interval": [ { "triggerAtMinute": 15 } ] } }, "id": "bd18a7aa-212b-4cd5-8acd-c4cbc5cc3a6d", "name": "Night Trigger", "type": "n8n-nodes-base.scheduleTrigger", "typeVersion": 1, "position": [ 1000, 460 ] }, { "parameters": { "method": "POST", "url": "http://192.168.1.255/api/power", "sendBody": true, "contentType": "raw", "body": "{ \"power\": false }", "options": {} }, "id": "be9be5db-53e3-4af3-8d12-2990b9c38859", "name": "Clock Off", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.1, "position": [ 1220, 460 ] }, { "parameters": { "method": "POST", "url": "http://192.168.1.255/api/power", "sendBody": true, "contentType": "raw", "body": "{ \"power\": true }", "options": {} }, "id": "1fb660ea-149c-4539-b724-7e27aa713303", "name": "Clock On", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.1, "position": [ 1220, 640 ] } ], "pinData": {}, "connections": { "Night Trigger": { "main": [ [ { "node": "Clock Off", "type": "main", "index": 0 } ] ] }, "Morning Trigger": { "main": [ [ { "node": "Clock On", "type": "main", "index": 0 } ] ] } }, "active": true, "settings": {}, "versionId": "2dccbc10-6e4c-45d9-bdbf-036a001508d1", "id": "9", "meta": { "instanceId": "fad48ee50ab295e27486d400f427ed5b50baff0c1dc235dc9413ccebae5358c7" }, "tags": [] }
-- Flow first published on June 12, 2023.