{"id":19385745,"url":"https://github.com/waziup/wazigate-edge","last_synced_at":"2025-07-25T06:36:40.029Z","repository":{"id":41085484,"uuid":"184266372","full_name":"Waziup/wazigate-edge","owner":"Waziup","description":"Waziup Edge Server for Waziup Gateway - Basic endpoints do retrieve, upload and change device, sensor and actuator data","archived":false,"fork":false,"pushed_at":"2025-04-16T06:31:39.000Z","size":16166,"stargazers_count":8,"open_issues_count":4,"forks_count":7,"subscribers_count":6,"default_branch":"v3","last_synced_at":"2025-04-16T08:09:34.471Z","etag":null,"topics":["iot","raspberry-pi","wazigate","waziup"],"latest_commit_sha":null,"homepage":"https://www.waziup.io/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Waziup.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,"zenodo":null}},"created_at":"2019-04-30T13:24:04.000Z","updated_at":"2025-04-16T06:31:43.000Z","dependencies_parsed_at":"2023-02-08T18:31:03.029Z","dependency_job_id":"2af7bffd-773f-4409-badb-eb5b705bd27f","html_url":"https://github.com/Waziup/wazigate-edge","commit_stats":{"total_commits":235,"total_committers":9,"mean_commits":26.11111111111111,"dds":0.5787234042553191,"last_synced_commit":"e5f8f240cee2b4bb06b06a79680a0fddcc0bc52c"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waziup%2Fwazigate-edge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waziup%2Fwazigate-edge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waziup%2Fwazigate-edge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waziup%2Fwazigate-edge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Waziup","download_url":"https://codeload.github.com/Waziup/wazigate-edge/tar.gz/refs/heads/v3","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250527145,"owners_count":21445312,"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":["iot","raspberry-pi","wazigate","waziup"],"created_at":"2024-11-10T10:02:55.464Z","updated_at":"2025-04-23T22:32:05.765Z","avatar_url":"https://github.com/Waziup.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Waziup Edge Server *for Waziup Gateway*\n\nThe edge server provides basic endpoints do retrieve, upload and change device, sensor and actuator data.\n\nYou can use REST and MQTT on all endpoints.\n\n![Waziup Structure](./assets/waziup_structure.svg)\n\n\n# Table of Contents\n\n* [Usage](#usage)\n* [Development](#development)\n* [Examples](#examples)\n  * [create a new device](#create-a-new-device)\n  * [change a device name](#change-a-device-name)\n  * [delete a device](#delete-a-device)\n  * [list all devices](#list-all-devices)\n  * [create a new sensor or actuator](#create-a-new-sensor-or-actuator)\n  * [change a sensor or actuator name](#change-a-sensor-or-actuator-name)\n  * [list all sensors or actuators](#create-a-new-device)\n  * [delete a sensor or actuator](#delete-a-sensor-or-actuator)\n  * [upload a sensor or actuator value](#upload-a-sensor-or-actuator-value)\n  * [upload multiple sensor or actuator values](#upload-multiple-sensor-or-actuator-values)\n  * [get-the-last-sensor-or-actuator-value](#get-the-last-sensor-or-actuator-value)\n* Clouds and Synchronization\n  * [add a Waziup Cloud for synchronization](#add-a-waziup-cloud-for-synchronization)\n  * [list all configured clouds](#list-all-configured-clouds)\n  * [pause \u0026 resume cloud synchronization](#pause--resume-cloud-synchronization)\n  * [change cloud credentials (username and password)](#change-cloud-credentials-username-and-password)\n  * [change the cloud url (rest or mqtt)](#change-the-cloud-url-rest-or-mqtt)\n* [Use MQTT!](#use-mqtt)\n* [System Settings](#system-settings)\n  * [Log Files](#log-files)\n* [Configuration](#configuration)\n\n\n# Usage\n\nThis project is part of the [Waziup Open Innovation Platform](https://www.waziup.eu/). In most cases you do not want to use this repository without the\nwaziup platform, so have a look the [**Waziup Gateway**](https://github.com/Waziup/waziup-gateway) at [github.com/Waziup/waziup-gateway](https://github.com/Waziup/waziup-gateway).\n\n\n# Development\n\n## with go (golang) from source\n\nYou can compile this project from source with golang and git.\nGrab yourself the go language from [golang.org](https://golang.org/) and the\ngit command line tools with `apt-get git` or from [git-scm.com/download](https://git-scm.com/download).\n\nNow build the wazigate-edge executable:\n\n```bash\ngit clone https://github.com/Waziup/wazigate-edge.git\ncd wazigate-edge\nGOOS=linux GOARCH=arm64 go build -ldflags \"-s -w -X main.branch=v2 -X main.version=2.3.3 -X main.buildNr=12 -X main.buildtime=156587\" -o wazigate .\n```\n\nAnd run the wazigate-edge server with:\n\n\n```bash\nwazigate-edge\n```\n\n## with docker\n\nIf you like to use docker you can use the public waziup docker containers at [the Docker Hub](https://hub.docker.com/u/waziup/).\nFor development you can build this repo on your own using:\n\n```bash\ngit clone https://github.com/Waziup/wazigate-edge.git\ncd wazigate-edge\ndocker build --tag=wazigate-edge .\ndocker run -p 4000:80 wazigate-edge\n```\n\n# Examples\n\n... with JavaScript and [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch).\n\n### get this Gateway's ID\n\n```javascript\nvar resp = await fetch(`/device/id`);\nvar id = await resp.text();\nconsole.log(`device id: ${id}`);\n```\n\nConsole output will be like:\n```\ndevice id: 201c85cdbda3\n```\n\n### create a new device\n\n```javascript\nvar resp = await fetch(\"/devices\", {\n    method: \"POST\",\n    headers: {\n\t\t'Content-Type': 'application/json'\n\t},\n    body: JSON.stringify({\n        // id: \"5cde6d034b9f61\" // let the server choose an id\n        name: \"My Device 1\",    // readable device name\n        sensors: [{             // sensors list:\n\t\t\tid: \"6f840f0b1\",       // sensor id (hardware id)\n\t\t\tname: \"My Sensor 1\",   // readable name\n        }, {\n\t\t\tid: \"df34b9f612\",\n\t\t\tname: \"My Sensor 2\",\n        }],\n        actuators: [{           // actuators list:\n\t\t\tid: \"40f034\",\n\t\t\tname: \"My Actuator 1\",\n        }],\n    })\n});\n// the device id will be returned\nvar deviceId = await resp.json();\nalert(`new device.id: ${deviceId}`);\n```\n\nConsole output will be like:\n```\nnew device.id: 5cde6d034b9f610ff8373bdb\n```\n\n### change a device name\n\n```javascript\nvar deviceId = \"5cde6d034b9f610ff8373bdb\";\nawait fetch(`/devices/${deviceId}/name`, {\n    method: \"POST\",\n    headers: {\n\t\t'Content-Type': 'application/json'\n\t},\n    body: JSON.stringify(\"New Device Name\")\n});\n```\n\n### delete a device\n\n```javascript\nvar deviceId = \"5cde6d034b9f610ff8373bdb\";\nfetch(`/devices/${deviceId}`, {\n    method: \"DELETE\",\n});\n```\n\n### list all devices\n\n```javascript\nvar resp = await fetch(\"/devices\");\nvar devices = await resp.json();\nconsole.log(devices);\n```\n\nConsole output will be like: (without comments)\n\n```javascript\n[{\n  name: \"My Device 1\",\n  id: \"5cde6d034b9f61\",\n  // Sensors List\n  sensors: [{\n    // unique sensor id\n    id: \"6f840f0b1\",\n    // Sensor name\n    name: \"My Sensor 1\",\n    // time when last modified\n    modified: \"2019-06-03T12:31:34.331Z\",\n    // time when created\n    created: \"2019-06-03T12:31:34.331Z\",\n    // time last value received\n    time: \"2019-06-03T12:15:47.971Z\",\n    // last value\n    value: null\n  },{\n    id: \"df34b9f612\",\n    name: \"My Sensor 2\",\n    modified: \"0001-01-01T00:00:00Z\",\n    created: \"2019-06-03T12:31:34.331Z\",\n    time: \"2019-06-03T12:15:47.971Z\",\n    value: null\n  }],\n  // Actuators List\n  actuators: [{\n    id: \"40f034\",\n    name: \"My Actuator 1\",\n    modified: \"2019-06-03T12:30:52.106Z\",\n    created: \"2019-06-03T12:31:34.331Z\",\n    time: \"2019-06-03T12:15:47.971Z\",\n    value: null\n  }],\n  modified: \"2019-06-03T12:30:52.106Z\",\n  created: \"2019-06-03T12:31:34.331Z\"\n}]\n```\n\n* Modified-times for devices get updated when the device name changes (using POST .../name) but not if a new sensor or actuator gets added or deleted.\n* Modified-times on sensors or actuators get updated when the sensor or actuator name changes, but not if a new value gets posted.\n* Time and Value for each sensor are the same as at GET .../value\n\n### create a new sensor *or actuator*\n\n```javascript\nvar deviceId = \"5cde6d034b9f610ff8373bdb\";\nawait fetch(`/devices/${deviceId}/sensors`, {\n    method: \"POST\",\n    headers: {\n\t\t'Content-Type': 'application/json'\n\t},\n    body: JSON.stringify({\n        id: \"0ff8373bd\",       // sensor id (hardware id)\n        name: \"My Sensor 3\",   // readable name\n    })\n});\n```\n\nThe same goes for actuators. Just replace `sensors` with `actuators`.\n\n### change a sensor *or actuator* name\n\n```javascript\nvar sensorId = \"0ff8373bd\";\nvar deviceId = \"5cde6d034b9f610ff8373bdb\";\nawait fetch(`/devices/${deviceId}/sensors/${sensorId}/name`, {\n    method: \"POST\",\n    headers: {\n\t\t'Content-Type': 'application/json'\n\t},\n    body: JSON.stringify(\"New Sensor Name\")\n});\n```\n\n### list all sensors *or actuators*\n\n```javascript\nvar deviceId = \"5cde6c194b9f610ff8373bda\";\nvar resp = await fetch(`/devices/${deviceId}/sensors`);\nvar sensors = await resp.json();\nconsole.log(sensors);\n```\n\n### delete a sensor *or actuator*\n\n```javascript\nvar sensorId = \"0ff8373bd\";\nvar deviceId = \"5cde6d034b9f610ff8373bdb\";\nfetch(`/devices/${deviceId}/sensors/${sensorId}`, {\n    method: \"DELETE\",\n});\n```\n\n### upload a sensor *or actuator* value\n\n```javascript\nvar sensorId = \"0ff8373bd\";\nvar deviceId = \"5cde6d034b9f610ff8373bdb\";\n\nvar value = 42; // numeric value\n// or\nvar value = \"Temp45%23\"; // string value\n// or\nvar value = {lat: 52, long: 7}; // complex value\n// or\nvar value = {\n  time: new Date(),  // value at specific time\n  value: 42          // value\n};\n\nfetch(`/devices/${deviceId}/sensors/${sensorId}/value`, {\n  method: \"POST\",\n  headers: {\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify(value)\n});\n```\n\n\n### upload multiple sensor *or actuator* values\n\n```javascript\nvar sensorId = \"0ff8373bd\";\nvar deviceId = \"5cde6d034b9f610ff8373bdb\";\n\nvar values = [42, 45, 47]; // values array\n// or\nvar values = [\"a\", 0x0b, \"cde\"]; // ...\n// or\nvar values = [\n  { // values with timestamp\n    time: new Date(),\n    value: 42,\n  }, {\n    time: new Date(),\n    value: 43,\n  }\n]\n\nfetch(`/devices/${deviceId}/sensors/${sensorId}/values`, {\n  method: \"POST\",\n  headers: {\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify(values)\n});\n```\n\n### get the last sensor *or actuator* value\n\n```javascript\nvar sensorId = \"0ff8373bd\";\nvar deviceId = \"5cde6d034b9f610ff8373bdb\";\nvar resp = await fetch(`/devices/${deviceId}/sensors/${sensorId}/value`);\nvar value = await resp.json();\nconsole.log(value);\n```\n\n### get multiple sensor *or actuator* values\n\n```javascript\nvar sensorId = \"0ff8373bd\";\nvar deviceId = \"5cde6d034b9f610ff8373bdb\";\nvar resp = await fetch(`/devices/${deviceId}/sensors/${sensorId}/values`);\nvar values = await resp.json();\nconsole.log(values);\n```\n\n### add a Waziup Cloud for synchronization\n\n```javascript\nfetch(`/clouds`, {\n  method: \"POST\",\n  headers: {\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    rest: \"api.waziup.io/api/v2\",\n    mqtt: \"api.waziup.io\",\n    paused: true, // default false\n    credentials: {\n      username: \"myUsername\",\n      token: \"myPassword\"\n    }\n  })\n});\n// the cloud id will be returned\nvar cloudId = await resp.json();\nalert(`new cloud.id: ${cloudId}`);\n```\n\nConsole output will be like:\n```\nnew cloud.id: 5ce2793d4b9f612a04a7951d\n```\n\n### list all configured clouds\n\n```javascript\nvar resp = await fetch(\"/clouds\");\nvar clouds = await resp.json();\nconsole.log(clouds);\n```\n\nOutput will be like:\n```javascript\n{\n  \"5ce2793d4b9f612a04a7951d\": {\n    id: \"5ce2793d4b9f612a04a7951d\",\n    paused: true,\n    rest: \"api.waziup.io/api/v2\",\n    mqtt: \"api.waziup.io\",\n    credentials: {\n      username: \"myUsername\",\n      token: \"myPassword\"\n    },\n    // bytes in queue waiting for sync with server\n    queue: 136,\n    // sync status code (200 = OK)\n    statusCode: 200,\n    // readable status text or error, if any\n    statusText: \"MQTT connected for persistent sync.\"\n  }\n}\n```\n\n*statusCode* can be one of:\u003cbr\u003e\n`200` OK. The synchronization is active.\u003cbr\u003e\n`0` The synchronization is paused.\u003cbr\u003e\nAny other code: There was a problem with this synchronization.\n\n### pause \u0026 resume cloud synchronization\n\n```javascript\nvar cloudId = \"5ce2793d4b9f612a04a7951d\";\nfetch(`/clouds/${cloudId}/paused`, {\n  method: \"POST\",\n  headers: {\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify(false) // or true\n});\n```\n\n### change cloud credentials (username and password)\n\n```javascript\nvar cloudId = \"5ce2793d4b9f612a04a7951d\";\nfetch(`/clouds/${cloudId}/credentials`, {\n  method: \"POST\",\n  headers: {\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    username: \"myNewUserName\",\n    token: \"myNewPassword\",\n  })\n});\n```\n\n### change the cloud url (rest or mqtt)\n\n```javascript\nvar cloudId = \"5ce2793d4b9f612a04a7951d\";\nfetch(`/clouds/${cloudId}/mqtt`, {\n  method: \"POST\",\n  headers: {\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify(\"waziup.myserver.com\")\n});\n```\n\n```javascript\nvar cloudId = \"5ce2793d4b9f612a04a7951d\";\nfetch(`/clouds/${cloudId}/rest`, {\n  method: \"POST\",\n  headers: {\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify(\"waziup.myserver.com\")\n});\n```\n\n# Use MQTT!\n\nWith MQTT you can publish values for the sensor, which is more efficient than the REST interface.\nYou will need a MQTT client like [Eclipse Mosquitto](https://mosquitto.org/man/mosquitto_sub-1.html) (commandline) or\n[HiveMQ MQTT Websocket Client](http://www.hivemq.com/demos/websocket-client/). For the following examples we will use the HiveMQ Client.\n\nSubscriptions are especially usefull if you want to listen for changes and want to get notified when new sensor values arrive. They will be triggered by both Publishes (via MQTT) and Post (via REST).\n\nConnect to your Waziup Gateway using the connection settings:\n\n\n* Host: Gateway IP\n* Port: 80 (for in-browser MQTT via Websocket) or default 1883\n* Client: (any)\n* MQTT Version: 3.1.1 (MQTT) or 3.1.0 (MQIsdp)\n\nYou can now publish and subscribe topics like sensor-values or actuator-values.\n\nTo make a new subscription, click \"Add New Topic Subscription\" and enter a valid\ntopic, like the values-topic from an **existing sensor**. If you have completed the previous examples, you could use `devices/5cd92df34b9f6126f840f0b1/sensors/6f840f0b1/value`.\n\nRemember that messages must be valid JSON, so enquote strings like `\"my string\"`.\n\n\n![Hive MQTT Websocket Client](assets/hive_mqtt.png)\nSee http://www.hivemq.com/demos/websocket-client/.\n\nEquivalent mosquitto calls look like:\n\n```bash\n# Publish Values:\nmosquitto_pub \\\n  -t \"devices/5cd92df34b9f6126f840f0b1/sensors/df34b9f612/value\" \\\n  -m 456\n\n# Subscribe to topics:\nmosquitto_sub \\\n  -t \"devices/5cd92df34b9f6126f840f0b1/sensors/df34b9f612/value\" \\\n\n# Subscribe to all sensors of one device:\nmosquitto_sub \\\n  -t \"devices/5cd92df34b9f6126f840f0b1/sensors/*/value\" \\\n\n# Subscribe to actuating-data of all devices:\nmosquitto_sub \\\n  -t \"devices/*/actuator/*/value\" \\\n\n# Subscribe to all changes on one device:\nmosquitto_sub \\\n  -t \"devices/5cd92df34b9f6126f840f0b1/#\" \\\n\n# Subscribe to literally everything on devices:\nmosquitto_sub \\\n  -t \"devices/#\" \\\n```\n\nMosquitto is available for both Linux and Windows.\n\nThere are a few things to keep in mind when using MQTT:\n\n* Use port 80 when using MQTT via REST in your browser and port 1883 otherwise. Most clients will have these ports already configured.\n* Topics are equivalent to URLs from the REST API. You can use any url as topic and vice versa.\n* Subscriptions will be triggered by both Publishes (via MQTT) and Post (via REST).\n* Topics do not start with a slash '/'.\n* Use only valid JSON objects as payload! (Don't forget to enquote strings!)\n\n# System Settings\n\nThe following APIs are for system settings and debugging.\n\n### uptime\n\n```javascript\nvar resp = await fetch(\"/sys/uptime\");\nvar uptime = await resp.text();\nconsole.log(uptime);\n```\n\nConsole output will be like `6m29.5201577s`.\n\n### clear all\n\n*Attention!* This call will clear the local database, removing all devices and all data values.\n\nThis can not be undone!\n\n```javascript\nvar resp = await fetch(\"/sys/clear_all\", {method: \"PUT\"});\nconsole.log(resp.ok);\n```\n\n## Log Files\n\nFor every session, the wazigate-edge will create a log file at `./logs` that equals the cmd output (your console output).\n\n### list all logs\n\n```javascript\nvar resp = await fetch(\"/sys/logs\");\nvar logs = await resp.json();\nconsole.log(logs);\n```\n\nConsole output will be like:\n\n```javascript\n[\n  {name: \"5cff90374b9f6139d44193e6.txt\", time: \"2019-06-11T13:27:51+02:00\", size: 2187},\n  {name: \"5cff92874b9f6136541f4aaa.txt\", time: \"2019-06-11T13:37:43+02:00\", size: 523},\n  ...\n]\n```\n\nThe last file in this list will be the current log file. This file can not be deleted.\n\n### read a log file\n\n```javascript\nvar file = \"5cff92874b9f6136541f4aaa.txt\";\nvar resp = await fetch(\"/sys/log/\"+file);\nvar log = await resp.text();\nconsole.log(log);\n```\n\nThe file is text only and will look like:\n\n```\n[WWW  ] Serving from \"/var/www\"\n[DB   ] Dialing MongoDB at \"localhost:27017\"...\n[     ] Local device id is \"309c23cdbda6\".\n[CLOUD] 1 clouds from config:\n[CLOUD] \"5cebcfa04b9f6119688b3cdc\" \"//api.waziup.io/api/v2\" (pause:false)\n[UP   ] Dialing REST \"https://api.waziup.io/api/v2\"...\n[MQTT ] MQTT Server at \":1883\".\n[HTTP ] HTTP Server at \":80\". Use \"http://\".\n[WS   ] MQTT via WebSocket Server at\":80\". Use \"ws://\".\n[UP   ] Authentication successfull.\n[MQTT ] Connect \"mosqsub|12576-DESKTOP-L\" \u003cnil\u003e\n[MQTT ] Subscribe \"mosqsub|12576-DESKTOP-L\" \"sys/log\" QoS:0\n[UP   ] Device \"5cde6d034b9f61\" found. Checking for updates.\n[UP   ] Dialing MQTT \"api.waziup.io:1883\"...\n[HTTP ] [::1]:62660 200 GET \"/sys/logs\" s:0\n[HTTP ] [::1]:62660 200 GET \"/sys/log/5cff90374b9f6139d44193e6.txt\" s:0\n```\n\n### subscribe to `sys/log`\n\nYou can subscribe to the system log topic to monitor the log in real-time!\n\n```bash\nmosquitto_sub -t \"sys/log\" -V \"mqttv311\"\n```\n\nWith [HiveMQ](http://www.hivemq.com/demos/websocket-client/) use port 80, click *connect* and subscribe to *sys/log*.\n\nThe first result will always be `[MQTT ] Subscribe \"...\" \"sys/log\" QoS:0` which is the log generated from the mqtt subscription you just made.\n\n### delete a log file\n\n```javascript\nvar file = \"5cff92874b9f6136541f4aaa.txt\";\nfetch(\"/sys/log/\"+file, {\n    method: \"DELETE\",\n});\n```\n\n# Configuration\n\n**The application is ready to use with no configration needed!**\n\nYou might want to change some variables if you\n- run multiple wazigate-edge applications on the same machine (maybe for testing) or if you\n- use wazigate-edge inside a docker-container.\n\n**Env Variables**\n\n```\nWAZIUP_HTTP_ADDR  = :80      HTTP Listen Address\nWAZIUP_HTTPS_ADDR = :443     HTTPS Listen Address\nWAZIUP_MQTT_ADDR  = :1883    MQTT Listen Address\nWAZIUP_MQTTS_ADDR = :8883    MQTTS Listen Address\n\nWAZIUP_TLS_CRT =             TLS Cert File (.crt)\nWAZIUP_TLS_KEY =             TLS Key File (.key)\n\nWAZIUP_MONGO = localhost:27017     MongoDB Address\n\nWAZIUP_CLOUDS_FILE = clouds.json    Clouds Config File\n\nWAZIUP_LOG = date,time,verbose      Log Settings, see below\n```\n\nNote that MQTT via Websocket is available together with the REST API on HTTP and HTTPS. To disable serving static files of *www*, use -www \"\" (an empty string).\n\n**Commandline Arguments**\n\n```\n-crt     TLS Cert File (.crt)\n-key     TLS Key File (.key)\n-www     HTTP files root, default \"/var/www\"\n-db      MongoDB address, default \"localhost:27017\"\n```\nCommandline arguments override env variables!\nSecure connections will only be used if -crt and -key are present.\n\n**Config Files**\n\n```\nclouds.json   Saves /clouds setttings\n```\n\n**Logging Files**\n\nAll files at `log/*.txt` are log files generated with each session.\n\nUne can use the `WAZIUP_LOG` env variable to control what is logged.\nTo log date and time, use `date` and `time`. For more or less logging use one of `error`, `warn`, `normal`, `verbose`, `debug`.\n\nThe default log settings are: `WAZIUP_LOG = normal` (with no date and time).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaziup%2Fwazigate-edge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaziup%2Fwazigate-edge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaziup%2Fwazigate-edge/lists"}