{"id":19081075,"url":"https://github.com/allthingstalk/csharp-client","last_synced_at":"2025-11-12T05:30:46.271Z","repository":{"id":26509300,"uuid":"29961956","full_name":"allthingstalk/Csharp-client","owner":"allthingstalk","description":"[deprecated] [Raspberry Pi Windows 10] C# client library to connect to the AllThingsTalk platform","archived":false,"fork":false,"pushed_at":"2017-10-23T10:16:52.000Z","size":1310,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-22T06:11:38.192Z","etag":null,"topics":["deprecated"],"latest_commit_sha":null,"homepage":"http://maker.allthingstalk.com","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"qmk/qmk_firmware","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/allthingstalk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-28T10:18:43.000Z","updated_at":"2024-03-30T08:20:01.000Z","dependencies_parsed_at":"2022-09-08T09:40:48.292Z","dependency_job_id":null,"html_url":"https://github.com/allthingstalk/Csharp-client","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/allthingstalk%2FCsharp-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allthingstalk%2FCsharp-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allthingstalk%2FCsharp-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allthingstalk%2FCsharp-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/allthingstalk","download_url":"https://codeload.github.com/allthingstalk/Csharp-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240131748,"owners_count":19752727,"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":["deprecated"],"created_at":"2024-11-09T02:32:56.684Z","updated_at":"2025-11-12T05:30:46.256Z","avatar_url":"https://github.com/allthingstalk.png","language":"C#","readme":"### This library is deprecated\n\nCsharp-client library is deprecated, and will not receive any further updates.\n\n---\n\n# Csharp-client\n\n## Description\n\nC# Client library for connecting internet of things applications to the AllThingsTalk platform\n\n## Features\nsupports: \n\n- creating, updating \u0026 deleting devices\n- creating \u0026 updating assets\n- sending and receiving asset values, supported formats:\n\t- json \n\t- csv\n- uses events for incomming asset values \u0026 commands\n\nDepends on:\n\n- [Newtonsoft.json](https://www.nuget.org/packages/Newtonsoft.Json/) for working with Json data.\n- [m2mqtt](https://m2mqtt.codeplex.com/) mqtt library for pub-sub communication.\n\n## Installation\nThere's a nuget package available at: [https://www.nuget.org/packages/att.iot.client/](https://www.nuget.org/packages/att.iot.client/) for easy installation.\n\n## Usage\n\n### Full demo app\nThe following application will create a new device, add 2 assets to it and will wait for an incomming asset command or until you press a key upon which it will send an asset value to the cloud.  \nThe 'MyLogger' object that is used, is a interface implementation that simply writes the text to the console screen (Console.WriteLn)\n\n    class Program\n    {\n        static Device _device;\n        static MyLogger _logger;\n\n        private static void Init()\n        {\n            //provide a logger object\n            _logger = new MyLogger();\n            //create the device object with your account details\n            _device = new Device(\"testjan\", \"5i4duakv2bq\", _logger);\n            _device.DeviceId = \"your device id\";\n            _device.ActuatorValue += _device_ActuatorValue;\n        }\n\n\n\n        static void Main(string[] args)\n        {\n            Init();\n            //update or create the assets on the device. \n\t\t\t_device.UpdateAsset(\"1\", \"test actuator\", \"a test actuator\", true, \"boolean\");\n            //the id of the asset can be string, integer,...  \n\t\t\t_device.UpdateAsset(2, \"test sensor\", \"a test sensor\", false, \"boolean\");\n            _device.UpdateAsset(3, \"test sensor 2\", \"a test sensor without type, defaults to string, does not overwrite manual changes on platform\", false, null);\n\n            //wait to continue so that we can send a value from the cloud to the app.\n            Console.ReadKey();                                          \n\n\t\t\t//send a value to the platform\n\t\t\t_device.Send(2, \"true\");\n        }\n\n        static void _device_ActuatorValue(object sender, ActuatorData e)\n        {\n            _logger.Trace(\"incomming value found: {0}\", e.ToString());\n\n            //check the actuator for which we received a command\n            if (e.Asset == 1)\n            {\n                //actuators can send simple strings or complex json values. \n                StringActuatorData data = (StringActuatorData)e;\n                //do something with the value\n                if(data.AsBool() == true)\n                    _logger.Trace(\"actuating sensor\");\n            }\n        }\n    }\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallthingstalk%2Fcsharp-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallthingstalk%2Fcsharp-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallthingstalk%2Fcsharp-client/lists"}