展示HN:我用C++为ESP32/Arduino构建了一个失效闭锁看门狗。
Show HN: Show HN: I built a fail-closed watchdog for ESP32/Arduino in C++

原始链接: https://github.com/weareqrystal/qrystal_uplink_sdks

## Qrystal Uplink SDK 摘要 Qrystal Uplink 提供官方SDK,方便监控您的物联网设备(特别是基于ESP32的系统)的健康和连接状态。这些SDK简化了向Qrystal Uplink服务发送定期“心跳”信号,以实现实时状态跟踪。 主要功能包括自动SSL/TLS加密、连接池和NTP时间同步。SDK适用于 **Arduino**(适合初学者原型设计)、**ESP-IDF**(生产部署,性能)和 **MicroPython**(Python开发者,广泛的板卡支持)。 入门需要注册Qrystal Uplink并获取设备ID和令牌。SDK会返回特定的状态码来指示心跳成功或失败——涵盖WiFi连接、凭证错误和服务器问题等问题——从而实现强大的错误处理。该项目是开源的,并采用MIT许可证。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Show HN: 我用 C++ 为 ESP32/Arduino 构建了一个失效闭锁看门狗 (github.com/weareqrystal) 4 点赞 by mikayelgr 4 小时前 | 隐藏 | 过去 | 收藏 | 讨论 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文
Qrystal Partners Logo

Official SDKs for Qrystal Uplink — a device monitoring service for IoT devices.

Qrystal Uplink allows you to monitor the health and connectivity of your IoT devices in real-time. These SDKs provide a simple way to send heartbeat signals from your ESP32 devices to the Qrystal Uplink service.

  • Lightweight heartbeat API
  • Automatic SSL/TLS encryption
  • Connection pooling for efficient resource usage
  • Automatic time synchronization via NTP
  • Comprehensive error handling
  • Arduino SDK: Best for beginners and rapid prototyping. Uses the Arduino framework and is easy to integrate into existing Arduino projects.
  • Native ESP-IDF SDK: Best for production deployments and projects already using ESP-IDF. Offers more control and slightly better performance.
  • MicroPython SDK: Best for Python developers and rapid prototyping. Works on any MicroPython board with WiFi (ESP32, ESP8266, Raspberry Pi Pico W, etc.).

Sign up at Qrystal Uplink and create a device to get your device-id and token.

Follow the setup guide for your preferred framework:

Once configured, your device will send periodic heartbeats. When the Qrystal Uplink dashboard shows your device status as "Healthy", you're all set.

Both SDKs return status codes to indicate the result of each heartbeat:

Status Code Description
Q_OK Heartbeat sent successfully
Q_QRYSTAL_ERR Server returned an error (check credentials)
Q_ERR_NO_WIFI WiFi not connected
Q_ERR_TIME_NOT_READY NTP time sync not complete (retry shortly)
Q_ERR_INVALID_CREDENTIALS Credentials format invalid (expected device-id:token)
Q_ERR_INVALID_DID Device ID has invalid length
Q_ERR_INVALID_TOKEN Token is too short
Q_ESP_HTTP_INIT_FAILED HTTP client initialization failed
Q_ESP_HTTP_ERROR HTTP request failed (connection lost)

This project is licensed under the MIT License. See LICENSE for details.

联系我们 contact @ memedata.com