{"id":18688467,"url":"https://github.com/mycontroller-org/mycontrollerdevice","last_synced_at":"2025-04-12T05:36:11.412Z","repository":{"id":107577676,"uuid":"69578998","full_name":"mycontroller-org/MyControllerDevice","owner":"mycontroller-org","description":"MyController supported MQTT ESP8266 library","archived":false,"fork":false,"pushed_at":"2018-05-15T08:17:48.000Z","size":401,"stargazers_count":4,"open_issues_count":7,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T01:01:48.942Z","etag":null,"topics":["automation","esp8266","esp8266-arduino","iot","mqtt","remote","sensor"],"latest_commit_sha":null,"homepage":"http://www.mycontroller.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mycontroller-org.png","metadata":{"files":{"readme":"README.adoc","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":"2016-09-29T15:05:18.000Z","updated_at":"2023-05-12T16:58:19.000Z","dependencies_parsed_at":"2023-06-08T13:15:38.840Z","dependency_job_id":null,"html_url":"https://github.com/mycontroller-org/MyControllerDevice","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mycontroller-org%2FMyControllerDevice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mycontroller-org%2FMyControllerDevice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mycontroller-org%2FMyControllerDevice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mycontroller-org%2FMyControllerDevice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mycontroller-org","download_url":"https://codeload.github.com/mycontroller-org/MyControllerDevice/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248524433,"owners_count":21118611,"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":["automation","esp8266","esp8266-arduino","iot","mqtt","remote","sensor"],"created_at":"2024-11-07T10:36:57.316Z","updated_at":"2025-04-12T05:36:11.198Z","avatar_url":"https://github.com/mycontroller-org.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"= MyControllerDevice\n\n\n**IMPOERTANT**: For now this library supports up to `ESP 8266 community version: 2.3.0` If you compile with `2.4.0` or greater version. This code will not work as expected.\n\n== About\n\n*MyControllerDevice* is network driver for embedded devices to communicate with MyController. You can make your own sensors network on top of embedded hardwares. Currently this library supports for ESP8266 via MQTT protocol\n\n=== Dependencies\nWhen you compile you have to change the following settings on dependencies,\n\n==== https://github.com/knolleary/pubsubclient[pubsubclient]\n* Change `MQTT_MAX_PACKET_SIZE` to 512 bytes on https://github.com/knolleary/pubsubclient/blob/master/src/PubSubClient.h[PubSubClient.h]\n\n== Quick start\n* Download dependencies to your arduino environment.\n* Download this library to your arduino library location\n* Have a look on example\n* Implement your code\n\n\n=== Add your code on this default code\n```\n#include \u003cMyController.h\u003e\n\nMyController mc;\n\nvoid before(){\n  //Your code before this library inialize\n}\n\nvoid presentation(){\n  //Presentation code, to send available sensors detail\n}\n\nvoid receiveTime(unsigned long mcTimestamp){\n  //Do something with received time\n}\n\nvoid receive(McMessage \u0026message) {\n   //If MyController sends some data, you will receive here.\n}\n\n\nvoid setup() {\n  if(!isSystemConfigured()){\n    //You can check, does this node/device configured. If no you can display/blink some led from here.\n  }\n}\n\nvoid loop() {\n  mc.loop();\n  //You can add your logic here.\n}\n```\n\n==== Compile and update code to ESP8266\n* Select target board\n* click on compile and update\n\n==== OTA support\nIf you have 4M of program space you can do OTA program. To use OTA you need MyController and very first you have burn firmware for your device from computer.\n\n== First time configuration\nWe have to create gateway entry on MyController server and we have supply those settings to node/esp8266 one time.\n\n=== Gateway settings on MyController server\nPlease note, here I have used MyController inbuilt MQTT broker. Which will not allow `anonymous` by defaylt. We have to enable `anonymous`. We can use with user details also. In the following screenshot I have shown as `anonymous`.\nWe can use any MQTT broker.\n\n===== Allow anonymous\nimage::extra/images/mc_02.png[Enable Anonymous on MyController MQTT broker]\n\n===== Gateway settings for ESP8266\nimage::extra/images/mc_01.png[Gateway settings for ESP8266 device]\n\n=== Configuration on ESP8266\nOnce the firmware successfully uploaded to ESP8266, When you turn on the device. We can see a Access Point(AP) somthing like `ESP_XXXXXX`(default password: `mycontroller`) this is your device AP. You have to connect your mobile or computer to update MyController and actual AP settings for your ESP8266. Once you have connected to ESP device AP, you have to enter the following IP on your browser `192.168.4.1`. Annd follow these steps,\n\n===== WiFi ESP_XXXXXX\nimage::extra/images/esp_01.png[ESP AP on WiFi settings, height=720]\n\n===== On browser open `192.168.4.1`\nimage::extra/images/esp_02.png[192.168.4.1 on browser, height=320]\n\n===== To know about device information click on `Info`\nimage::extra/images/esp_03.png[ESP device info, height=420]\n\n===== Configure actual AP settings and MQTT broker settings\nimage::extra/images/esp_04.png[Ap and ESP settings, height=720]\n\n===== When you save the settings, Self AP will get disabled and ESP8266 will connect with your AP and connect with MQTT broker (Here we use inbuilt MQTT broker)\nimage::extra/images/esp_05.png[Final message, height=220]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmycontroller-org%2Fmycontrollerdevice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmycontroller-org%2Fmycontrollerdevice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmycontroller-org%2Fmycontrollerdevice/lists"}