SNTP
SNTP (Simple Network Time Protocol) provides automatic time synchronization for your device. Accurate timekeeping is essential for logging, scheduling, and time-based automation.
Overview
The SNTP feature automatically synchronizes your device's clock with internet time servers, ensuring:
- Accurate timestamps for logs and events
- Reliable scheduled tasks
- Correct time-based automation
- Synchronized time across multiple devices
Configuration
Configure SNTP with these properties:
- NTP Server: Time server hostname (e.g., pool.ntp.org)
- Update Interval: How often to synchronize (in hours)
- Timezone: Device timezone offset from UTC
Default Time Servers
AppBlocks uses reliable public NTP servers by default:
- pool.ntp.org (216.239.35.0)
Linking to Settings
SNTP properties can be linked to settings, allowing devices to be configured for different geographic locations without rebuilding firmware.
Importance for Automation
Accurate time is critical for:
- Scheduler: Running tasks at specific times
- Event Logs: Timestamping system events
- Data Tables: Recording data with timestamps
- Sunrise/Sunset Scheduling: Astronomical time calculations
Related Blocks
Time-related blocks that depend on SNTP:
- DateTime: Get current date and time
- DateTime Format: Format timestamps
- On Scheduled Event: Schedule time-based triggers
Network Requirements
SNTP requires:
- Active internet connection via WiFi, Cellular, or Ethernet
- UDP port 123 access to NTP servers
- Initial synchronization may take 30-60 seconds after boot