Automate Your Zigbee Backups with n8n and MQTT
detail.loadingPreview
Effortlessly schedule and automate secure backups of your Zigbee2MQTT configuration. This workflow triggers backups weekly, uploads them to an SFTP server, and ensures your smart home data is always protected.
About This Workflow
This n8n workflow provides a robust solution for safeguarding your Zigbee2MQTT setup. By leveraging a scheduled trigger, it initiates a backup process every Monday morning. The workflow then listens for the backup response via MQTT, parses the received data, converts the base64 encoded zip file to binary, and securely uploads it to an SFTP server with a timestamped filename. This ensures your critical Zigbee network configuration is regularly backed up and readily available in case of any issues, providing peace of mind for your smart home infrastructure.
Key Features
- Scheduled Automation: Automatically backs up your Zigbee2MQTT configuration every Monday at 2:45 AM.
- Secure Offsite Storage: Uploads encrypted backup files to an SFTP server for secure, remote storage.
- Real-time Monitoring: Utilizes MQTT to trigger and receive backup responses.
- Data Integrity: Parses and converts the backup data to a usable binary format.
- Timestamped Files: Generates uniquely named backup files with ISO timestamps for easy identification.
How To Use
- Schedule Trigger: Configure the 'CRON Monday 2:45 am' node to define your desired backup schedule (currently set to
45 2 * * 1). - MQTT Request: Set up the 'Send Zigbee2MQTT backup request' node with your MQTT broker credentials and the topic
zigbee2mqtt/bridge/request/backupto send thegetbackupcommand. - MQTT Response Trigger: Configure the 'MQTT Trigger - Backup Response' node with your MQTT broker credentials to listen on the topic
zigbee2mqtt/bridge/response/backup. - Data Parsing: In the 'Parse JSON Object from Message Text' node, ensure the JavaScript code correctly extracts the
dataproperty from the incoming MQTT message. This assumes the message is a JSON object containing a 'data' field with the base64 encoded backup. - Binary Conversion: Use the 'Convert to File - base64 to binary' node to transform the base64 string from the previous step into a binary file, targeting the
zipproperty. - SFTP Upload: Configure the 'SFTP zip file content' node with your SFTP credentials and set the
pathparameter to define the destination directory and filename on your SFTP server. The path is dynamically generated usingzigbee_backups/zigbee_backup_{{ new Date().toISOString().replaceAll(':','_') }}.zip.
Apps Used
Workflow JSON
{
"id": "c97e4db1-cf0a-419f-b9a1-5a51a076de23",
"name": "Automate Your Zigbee Backups with n8n and MQTT",
"nodes": 11,
"category": "DevOps",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: c97e4db1-cf0a...
About the Author
Free n8n Workflows Official
System Admin
The official repository for verified enterprise-grade workflows.
Statistics
Related Workflows
Discover more workflows you might like
Effortless Bug Reporting: Slack Slash Command to Linear Issue
Streamline your bug reporting process by instantly creating Linear issues directly from Slack using a simple slash command. This workflow enhances team collaboration by providing immediate feedback and a structured approach to logging defects, saving valuable time for development and QA teams.
Automated PR Merged QA Notifications
Streamline your QA process with this automated workflow that notifies your team upon successful Pull Request merges. Leverage AI and vector stores to enrich notifications and ensure seamless integration into your development pipeline.
Visualize Your n8n Workflows: Interactive Dashboard with Mermaid.js
Gain unparalleled visibility into your n8n automation landscape. This workflow transforms your n8n instance into a dynamic, interactive dashboard, leveraging Mermaid.js to visualize all your workflows in one accessible place.