SY-3764: Support HTTP devices in Driver#1993
Merged
Conversation
This RFC documents the design for integrating an HTTP driver into the Synnax Driver system, enabling REST API polling and control capabilities. Key features: - Read Tasks: Poll HTTP endpoints and write JSON data to Synnax channels - Write Tasks: Send HTTP requests based on Synnax channel values - Scan Tasks: Health monitoring of HTTP endpoints - Type conversion between JSON and Synnax data types - Support for authentication (none, API key, basic, bearer) The specification includes configuration schemas, implementation details, Python client API, integration testing approach, and a 19-PR delivery plan organized by feature (Device → Read → Write → Scan). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…x-value-conversion-utilities
emilbon99
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Pull Request
Linear Issue
SY-3764
Description
Support HTTP devices in the Driver by adding a mock HTTP server, and support for device configuration and connection.
Basic Readiness
Greptile Overview
Greptile Summary
Added comprehensive HTTP device support to the Driver framework, enabling HTTP-based device integration alongside existing protocols like Modbus and EtherCAT.
Major changes:
driver::http::device::Clientusing libcurl with support for all HTTP methods, multiple authentication schemes (bearer token, basic auth, API key), custom headers, and SSL verificationJSONFile::opentoJSONFile::open_file(likely to avoid name conflicts with newopenfunction from HTTP libraries)The implementation is well-structured with proper error handling, efficient multi-handle support for parallel requests, and pre-configured curl handles to minimize hot-path overhead.
Confidence Score: 5/5
Important Files Changed
Class Diagram
classDiagram class Client { -ConnectionConfig config_ -void* multi_handle_ -vector~Handle~ handles_ +make(config, requests) pair~Client, Error~ +request(bodies) pair~vector~Response~, Error~ } class ConnectionConfig { +string base_url +uint32_t timeout_ms +AuthConfig auth +map~string,string~ headers +bool verify_ssl } class AuthConfig { +string type +string token +string username +string password +string header +string key } class RequestConfig { +Method method +string path +map~string,string~ query_params +map~string,string~ headers +string response_content_type +string request_content_type } class Response { +int status_code +string body +TimeRange time_range } class Handle { -CURL* handle -curl_slist* headers -string response_body -bool accepts_body -string expected_content_type -CURLcode result_code } class Server { -unique_ptr~Impl~ impl_ +start() Error +stop() +base_url() string +received_requests() vector~ReceivedRequest~ } class Factory { +name() string +configure_task() pair~Task, bool~ +configure_initial_tasks() vector~pair~Task, Task~~ } Client --> ConnectionConfig : uses Client --> RequestConfig : uses Client --> Handle : contains Client --> Response : returns ConnectionConfig --> AuthConfig : contains Server --> ReceivedRequest : logs Factory --|> task__Factory : implementsLast reviewed commit: 38ad3e2