GET /api/files -- получить список файлов
GET /api/files?path=/
{
"success": true,
"result": [
{| const { | |
| fromZigbeeConverters, | |
| toZigbeeConverters, | |
| } = require('zigbee-herdsman-converters'); | |
| const ATTRID_MS_PRESSURE_MEASUREMENT_MEASURED_VALUE_HPA = 0x0200; // non standart attribute, max precision | |
| const ZCL_DATATYPE_UINT32 = 0x23; | |
| const bind = async (endpoint, target, clusters) => { | |
| for (const cluster of clusters) { |
| const zigbeeHerdsmanConverters = require('zigbee-herdsman-converters'); | |
| const getKey = (object, value) => { | |
| for (const key in object) { | |
| if (object[key] == value) return key; | |
| } | |
| }; | |
| const bind = async (endpoint, target, clusters) => { | |
| for (const cluster of clusters) { | |
| await endpoint.bind(cluster, target); |
| # IAR C-STAT and C-RUN | |
| # Comment this out if you use C-Stat or C-Run to compile/analyze your project | |
| *.ewt | |
| # IAR Debugger files | |
| *.ewd | |
| # IAR Workspace files | |
| *.eww |
| <main role="main" class="h-100"> | |
| <div class="w-100 mb-2" role="group"> | |
| <a class="btn btn-primary" href="/zigbee">Refresh</a> | |
| <a class="btn btn-primary" href="/zigbee/groups">Groups</a> | |
| <a class="btn btn-primary" href="/zigbee/map">Map</a> | |
| <a class="btn btn-info" href="/zigbee/config">Setup</a> | |
| <a class="btn btn-success" href="/zigbee?join=255">Join</a> | |
| </div> | |
| <div data-widget-host="zigbee"></div> | |
| </main> |
| #include <Arduino.h> | |
| #include "WiFi.h" | |
| // #include <WebServer.h> | |
| #include <ArduinoJson.h> | |
| #include <StreamUtils.h> | |
| #include <esp_wifi.h> | |
| #include <esp_event.h> | |
| #include <esp_log.h> | |
| #include <esp_system.h> |
| <script>document.querySelector('.custom-file-input').addEventListener('change', function (e) { var fileName = document.getElementById("customFile").files[0].name; var nextSibling = e.target.nextElementSibling;nextSibling.innerText = fileName })</script> |
| #!/usr/bin/env python3 | |
| import socket | |
| HOST = '' | |
| PORT = 26732 | |
| with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: | |
| try: | |
| s.bind((HOST, PORT)) | |
| s.listen() | |
| conn, addr = s.accept() |