{"id":16219796,"url":"https://github.com/dontsovcmc/blynk_image_widget_server","last_synced_at":"2025-06-10T19:39:47.480Z","repository":{"id":78360570,"uuid":"223775631","full_name":"dontsovcmc/blynk_image_widget_server","owner":"dontsovcmc","description":"Storage for Blynk application widget images used Flask Python framework","archived":false,"fork":false,"pushed_at":"2019-11-26T09:24:37.000Z","size":41,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T23:44:54.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dontsovcmc.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-24T16:36:21.000Z","updated_at":"2020-01-17T23:11:50.000Z","dependencies_parsed_at":"2023-05-26T14:30:13.780Z","dependency_job_id":null,"html_url":"https://github.com/dontsovcmc/blynk_image_widget_server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dontsovcmc%2Fblynk_image_widget_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dontsovcmc%2Fblynk_image_widget_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dontsovcmc%2Fblynk_image_widget_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dontsovcmc%2Fblynk_image_widget_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dontsovcmc","download_url":"https://codeload.github.com/dontsovcmc/blynk_image_widget_server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dontsovcmc%2Fblynk_image_widget_server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259137642,"owners_count":22810751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T11:56:06.124Z","updated_at":"2025-06-10T19:39:47.431Z","avatar_url":"https://github.com/dontsovcmc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Сервер для хранения фотографий, которые вы хотите видеть в приложении Blynk. \n\nПринцип работы\n==============\n1. Устройство шлёт изображение в POST запросе, сервер сохраняет её и возвращает уникальный URL.\n2. Устройство шлёт в Blynk этот URL\n3. Blynk обновляет изображение в своем приложении\n\n![Принцип работы blynk_image_widget_server](https://github.com/dontsovcmc/blynk_image_widget_server/blob/master/assets/diag.png)\n\nИспользование\n=============\n1. Добавляем в проект Blynk виджет «Image Gallery»\n\n2. В прошивке:\n\nа. Отправляем изображение на сервер POST запросом:\n\nОтправка esp_http_client (отрывок!):\n\n```\n# image_buffer - буфер с изображением\n# image_size - размер изображения в байтах\n\nesp_http_client_set_post_field(http_client, (const char *)image_buffer, image_size);\nesp_http_client_set_header(http_client, \"Content-Type\", \"image/jpg\");\nesp_http_client_set_header(http_client, \"Content-Length\", String(data.frame_size).c_str());\nesp_http_client_set_header(http_client, \"Blynk-Token\", settings.blynk_key);  //добавится к имени файла\n```\n\n\nб. Шлем в Blynk новую ссылку:\n\n```\nBlynk.virtualWrite(V20, 1); \nBlynk.setProperty(V20, \"urls\", image_url);  //image_url - полный URL к изображению\nBlynk.virtualWrite(V20, 1);\n```\n\n3. Открываем приложение и видим новое изображение. Profit!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdontsovcmc%2Fblynk_image_widget_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdontsovcmc%2Fblynk_image_widget_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdontsovcmc%2Fblynk_image_widget_server/lists"}