{"id":15907727,"url":"https://github.com/laggui/connected-factory","last_synced_at":"2025-10-07T12:32:33.269Z","repository":{"id":80591048,"uuid":"187394830","full_name":"laggui/connected-factory","owner":"laggui","description":"Remote Monitoring and Data Logging System","archived":false,"fork":false,"pushed_at":"2019-05-19T22:06:22.000Z","size":883,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T23:42:09.622Z","etag":null,"topics":["data-logging","monitoring","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/laggui.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-18T18:57:02.000Z","updated_at":"2019-05-19T22:06:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"c580294c-99eb-4744-98d3-e13329f5f551","html_url":"https://github.com/laggui/connected-factory","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"45df651566694fd140c423bca8cc2a8fa1d6da22"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/laggui/connected-factory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laggui%2Fconnected-factory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laggui%2Fconnected-factory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laggui%2Fconnected-factory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laggui%2Fconnected-factory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laggui","download_url":"https://codeload.github.com/laggui/connected-factory/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laggui%2Fconnected-factory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271143335,"owners_count":24706344,"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","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["data-logging","monitoring","php"],"created_at":"2024-10-06T14:02:35.079Z","updated_at":"2025-10-07T12:32:28.233Z","avatar_url":"https://github.com/laggui.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Connected Factory\n## A Remote Monitoring and Data Logging System\n\nThis project was realized in **2015** for the end of my college studies \nand as part of the **CRÉE TA VILLE** (CREATE YOUR CITY) contest, which \nchallenged the participants to carry out innovative projects aimed at \nimproving the city of today and creating the city of tomorrow.\n\nMy proposed project, the **Connected Factory**, allows the user to \nmonitor each of his connected devices simultaneously and download the \nreading history (logged data) in csv format for each device. From the \nweb page, the devices can also be configured (e.g., delete the data \nhistory, change device name, change device range, change device output \ntype). In industrial process control, analog 4–20 mA current loops are \ncommonly used for electronic signalling, with the two values of 4 \u0026 20 \nmA representing 0–100% of the range of measurement or control. Based on \nthis de facto standard, the modules can be used on any existing \nequipment that follows this standard, or that outputs a direct current \nvoltage.\n\n![Connected Factory Diagram](docs/diagram.jpg)\n\n### Data Capture Module\n\nThe data capture module reads the input data every five seconds and \ntransmits if wirelessly to the data processing module.\n\nThis module is composed of a power supply circuit, a conversion circuit \n(for 4-20 mA input readings), a protection circuit and a microcontroller \n(PIC18F4620) connected to a [Digi XBee RF module][digi-xbee] with a \n[regulator][xbee-explorer]. With the help of its internal ADC, the \nmicrocontroller reads the input voltage every five seconds using a timer \ninterrupt and communicates the digital value to the XBee module with his \nbuilt-in UART module, adding the device ID to the message transmitted \n(format: `\u003cID-Data\u003e`). The XBee module relays the message wirelessly to \nthe data processing module.\n\n![Data Capture Module Schematic](docs/schematic.png)\n\nFor every equipment the user wants to monitor, simply add a data capture \nmodule and connect it to the equipment's output. Once connected and \npowered, the module will start transmitting the data immediately to the \nmaster XBee module (data processing module), and the new equipment will \nautomatically appear on the monitoring web page.\n\n### Data Processing Module\n\nOn the data processing side, the master XBee module continuously \nreceives the data from the data capture modules and transmits it to the \nmicrocontroller ([Arduino Uno][arduino]). The Arduino Uno was used with \nan [Ethernet shield][ethernet-shield] to communicate the data to the \nserver, which helped rapidly prototype this project for the timeframe \nimposed.\n\nWhenever the microcontroller receives a packet on its serial port, the \npacket is read and its content is stored in a buffer until the packet is \nreceived completely. With the help of the delimiters (`\u003c`, `-`, `\u003e`), \nthe device ID and data are parsed and transmitted to the server via \nEthernet with the help of GET requests.\n\n### Server Side + Remote Access\n\nAlthough the server can be run on pretty much any compatible machine \nwith MySQL, a [BeagleBone Black][bbb] was used and configured to run \nthe server-side scripts. The embedded computer was running under the \nDebian Linux distribution, and automatically assigned itself a static IP \non your private network when powered on.\n\nOn the front-end, the web page is developped in HTML5 with Bootstrap for \na responsive monitoring system. Different PHP5 scripts are executed on \nthe back-end side whenever the user accesses the web page, tries to \nmodify a device's configuration, or downloads/deletes the logged data \nhistory.\n\nOn the main page, the different devices connected are displayed along \nwith their current readings, which are updated every 5 seconds. Each \ndevice connected is automatically displayed when accessing the page, so \na simple page refresh suffices for a newly connected device to appear. \nBecause all of the reading data is automatically stored in the server's \nMySQL database, the data history for each device can easily be \ndownloaded in csv format.\n\n![Web Demo](docs/demo.gif)\n\n*Disclaimer: prior to this project (2015), I had no web programming \nexperience (and basically had just started programming in C). Throughout \nthis project, I improved my programming abilities and learned HTML, PHP \n\u0026 SQL.* \n\n\u003c!-- Links --\u003e\n[digi-xbee]:https://www.digi.com/products/embedded-systems/rf-modules/2-4-ghz-modules/xbee-digimesh-2-4\n[xbee-explorer]:https://www.sparkfun.com/products/11373\n[arduino]:https://store.arduino.cc/usa/arduino-uno-rev3\n[ethernet-shield]: https://www.arduino.cc/en/Reference/Ethernet\n[bbb]:https://beagleboard.org/black\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaggui%2Fconnected-factory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaggui%2Fconnected-factory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaggui%2Fconnected-factory/lists"}