{ "info": { "author": "myDevices", "author_email": "support@mydevices.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Topic :: Communications", "Topic :: Home Automation", "Topic :: Internet", "Topic :: Software Development", "Topic :: System :: Monitoring" ], "description": "Cayenne MQTT Python Library\n***************************\nThe Cayenne MQTT Python Library provides functions to easily connect to the `Cayenne IoT project builder `_. With it you can send data to and receive data from Cayenne.\n\nRequirements\n============\n* `Python 2.7.9+ or 3.4+ `_.\n* `This library `_.\n* `Eclipse Paho MQTT Python client library `_. This is installed as part of the Cayenne library installation.\n\nGetting Started\n===============\nInstallation\n------------\nThis library can be installed using pip:\n::\n\n pip install cayenne-mqtt\n\nIt can also be installed from the repository:\n::\n\n git clone https://github.com/myDevicesIoT/Cayenne-MQTT-Python\n cd Cayenne-MQTT-Python\n python setup.py install\n \nCayenne Setup\n-------------\n1. Create your Cayenne account at https://mydevices.com.\n2. Add a new device using the Bring Your Own Thing API selection.\n\nExamples\n--------\nSimple examples are available in the repository here: https://github.com/myDevicesIoT/Cayenne-MQTT-Python/tree/master/examples.\n\nBelow is an example of a simple client that publishes some sample data and receives data from Cayenne in a message callback. The Cayenne authentication variables must be modified with the authentication info you received when adding a new device in Cayenne:\n::\n\n import cayenne.client\n import time\n\n # Cayenne authentication info. This should be obtained from the Cayenne Dashboard.\n MQTT_USERNAME = \"MQTT_USERNAME\"\n MQTT_PASSWORD = \"MQTT_PASSWORD\"\n MQTT_CLIENT_ID = \"MQTT_CLIENT_ID\"\n\n # The callback for when a message is received from Cayenne.\n def on_message(message):\n print(\"message received: \" + str(message))\n # If there is an error processing the message return an error string, otherwise return nothing.\n \n client = cayenne.client.CayenneMQTTClient()\n client.on_message = on_message\n client.begin(MQTT_USERNAME, MQTT_PASSWORD, MQTT_CLIENT_ID)\n # For a secure connection use port 8883 when calling client.begin:\n # client.begin(MQTT_USERNAME, MQTT_PASSWORD, MQTT_CLIENT_ID, port=8883)\n\n i=0\n timestamp = 0\n\n while True:\n client.loop()\n \n if (time.time() > timestamp + 10):\n client.celsiusWrite(1, i)\n client.luxWrite(2, i*10)\n client.hectoPascalWrite(3, i+800)\n timestamp = time.time()\n i = i+1\n\nDocumentation\n-------------\nFor more detailed info about the Cayenne client API you can use **pydoc**.\n::\n\n pydoc cayenne.client\n \n\nAdditional Cayenne MQTT Libraries\n=================================\nAdditional libraries are available for connecting to Cayenne with other languages. These can be found at https://github.com/myDevicesIoT.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/myDevicesIoT/Cayenne-MQTT-Python", "keywords": "myDevices Cayenne MQTT", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "cayenne-mqtt", "package_url": "https://pypi.org/project/cayenne-mqtt/", "platform": "", "project_url": "https://pypi.org/project/cayenne-mqtt/", "project_urls": { "Homepage": "https://github.com/myDevicesIoT/Cayenne-MQTT-Python" }, "release_url": "https://pypi.org/project/cayenne-mqtt/1.1.0/", "requires_dist": null, "requires_python": "", "summary": "Cayenne MQTT Python Library", "version": "1.1.0" }, "last_serial": 3589601, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "d27a50fb6e83fa94263fb1973aa55cac", "sha256": "40579be647ffd617c9649b896f54308e7a8c75b8c200a5fb39a736dc3394c8bf" }, "downloads": -1, "filename": "cayenne-mqtt-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d27a50fb6e83fa94263fb1973aa55cac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5391, "upload_time": "2016-12-12T23:49:26", "url": "https://files.pythonhosted.org/packages/7c/77/a530d2a10f2b5fee40930f232f2d4f1799b7b96bd15b1a5f2ed5b61526f0/cayenne-mqtt-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "229522e7b4966ce048863eae552533d9", "sha256": "e5f50ac821d3886d7f09eb65f5d6dbd20419acaa48611fe1ac037b388dfdb60c" }, "downloads": -1, "filename": "cayenne-mqtt-1.0.1.tar.gz", "has_sig": false, "md5_digest": "229522e7b4966ce048863eae552533d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5405, "upload_time": "2017-07-05T18:18:06", "url": "https://files.pythonhosted.org/packages/6d/a5/adeb798f5ca02713234a15f9691322057b7fc07e1da2170eb974f69220e6/cayenne-mqtt-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "fbc317cd6e3da9a096c83ab116870a9b", "sha256": "4a271557809eaa841a5c57c3c879d4ecf7bb868202fad355e51d4810106123e3" }, "downloads": -1, "filename": "cayenne-mqtt-1.1.0.tar.gz", "has_sig": false, "md5_digest": "fbc317cd6e3da9a096c83ab116870a9b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5513, "upload_time": "2018-02-17T02:02:35", "url": "https://files.pythonhosted.org/packages/28/51/e1656ed79c1ddc527873c0ae964ebae92dc4392307f4e06671b7e6df3833/cayenne-mqtt-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fbc317cd6e3da9a096c83ab116870a9b", "sha256": "4a271557809eaa841a5c57c3c879d4ecf7bb868202fad355e51d4810106123e3" }, "downloads": -1, "filename": "cayenne-mqtt-1.1.0.tar.gz", "has_sig": false, "md5_digest": "fbc317cd6e3da9a096c83ab116870a9b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5513, "upload_time": "2018-02-17T02:02:35", "url": "https://files.pythonhosted.org/packages/28/51/e1656ed79c1ddc527873c0ae964ebae92dc4392307f4e06671b7e6df3833/cayenne-mqtt-1.1.0.tar.gz" } ] }