{"id":13488524,"url":"https://github.com/martindenion/dmway","last_synced_at":"2025-03-28T01:36:06.937Z","repository":{"id":201781597,"uuid":"213917241","full_name":"martindenion/dmway","owner":"martindenion","description":"An app that creates a dynamic link between different sensor networks and Thingsboard.","archived":false,"fork":false,"pushed_at":"2019-12-01T11:56:11.000Z","size":698,"stargazers_count":8,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2024-08-01T18:37:57.694Z","etag":null,"topics":["cetic","python","thingsboard","thingsboard-gateway"],"latest_commit_sha":null,"homepage":"https://www.cetic.be/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/martindenion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-10-09T12:49:09.000Z","updated_at":"2022-11-01T05:30:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"d95bd0c2-e832-45b7-a4a1-de86157b96ea","html_url":"https://github.com/martindenion/dmway","commit_stats":null,"previous_names":["martindenion/dmway"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martindenion%2Fdmway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martindenion%2Fdmway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martindenion%2Fdmway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martindenion%2Fdmway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martindenion","download_url":"https://codeload.github.com/martindenion/dmway/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222333976,"owners_count":16968058,"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":["cetic","python","thingsboard","thingsboard-gateway"],"created_at":"2024-07-31T18:01:17.423Z","updated_at":"2025-03-28T01:36:06.929Z","avatar_url":"https://github.com/martindenion.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# dmway\n\n## What is it ?\n\n\u003cimg src=\"./img/dmway2.png?raw=true\" width=\"265\" height=\"159\"\u003e\n\nd for dynamic, m for mapping and way from gateway.\n\nThe objective of this project is to develop an application that links a network of sensors and Thingsboard.\nThis application includes :\n- checking the format of the data received by the sensors\n- data persistence\n- the creation of sensors on Thingsboard\n- the provision of data on Thingsboard\n\nThis approach is a direct alternative to Thingsboard Gateway, offering a more generic view by providing dynamic mapping.\n\nHere is how dmway fits into our network architecture :\n\n\u003cimg src=\"./img/Zolertia-DMWAY-Thingsboard.jpg?raw=true\"\u003e\n\nIf you want a lower-level view to understand how dmway works, a [flowchart](https://github.com/martindenion/dmway/wiki/dmway-flowchart) is available.\n\n## Getting started\n\n### OS tested\n\n* Raspbian Strech (desktop and lite version)\n* Raspbian Buster (desktop and lite version)\n\n### Prerequisites\n\n#### Thingsboard\n\nFirst, you must have Thingsboard platform running.\n\nIf not, you can follow the [Thingsboard installation guides](https://thingsboard.io/docs/guides/#AnchorIDInstallationGuides).\n\n#### Eclipse Mosquitto\n\nYou can install a MQTT broker locally or use a MQTT broker on the cloud.\n\nThese following way use a local Mosquitto broker but you can use your own MQTT broker.\n\n```\n$ sudo apt update\n$ sudo apt install -y mosquitto mosquitto-clients\n```\n\n#### Git tool\n\nYou may also need to install the git tool for cloning the dmway project from Github :\n\n```\n$ sudo apt install -y git\n```\n\n#### Python package\n\ndmway requires at least Python 3.5 version so you don't need to upgrade Python to a newer version : \n\n```\n$ sudo apt install -y python3.5 python3-pip\n```\n\n### Cloning dmway\n\nClone the dmway source code and install dmway dependancies : \n```\n$ git clone https://github.com/martindenion/dmway.git\n$ cd dmway\n$ sudo pip3 install -r requirements.txt\n```\n\n### Running dmway \n\nTo run dmway, 3 methods are possible depending on the needs : \n\n#### For development \n\nThen, you can execute the app.py Python file :\n```\n$ cd dmway\n$ python3 app.py\nOutput: \nConnecting to SQLite database ...\nConnected to SQLite database 2.6.0\nConnected with result code 0\n```\ndmway is now waiting for receiving JSON data by MQTT.\n\n#### For deployment with systemd\n\n```\n$ cd dmway\n$ chmod +x make_service.sh\n$ sudo ./make_service.sh 'dmway' '/home/pi/dmway/app.py' 'dmway.service' yes\nOutput :\nCreated symlink /etc/systemd/system/multi-user.target.wants/dmway.service → /etc/systemd/system/dmway.service.\n$ sudo reboot \n```\ndmway is now waiting for receiving JSON data by MQTT.\n\n#### For deployment with Docker\n\n*TO DO*\n\n### Quick start test\n\n#### Publish json_message with local MQTT broker\n\nConsidering this [format](https://github.com/martindenion/dmway/wiki/JSON-message-and-topic-format), execute the following command line :\n\n```\n$ mosquitto_pub -h localhost -m \"json_message\" -t \"topic\"\n```\n\nNote : if you ran dmway using the development way, execute the previous command line from another duplicated shell to let dmway running correctly.\n\nIn order to better understand what does this command in the dmway context, see this [diagram](https://github.com/martindenion/dmway/wiki/Pub-and-Sub-command-around-dmway).\n\n## Sources\n\n* https://thingsboard.io/docs/iot-gateway/what-is-iot-gateway/\n* https://www.startupbootcamp.org/startups/zolertia/\n* https://obrienlabs.net/how-to-setup-your-own-mqtt-broker/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartindenion%2Fdmway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartindenion%2Fdmway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartindenion%2Fdmway/lists"}