{ "info": { "author": "Johan Barthelemy", "author_email": "johan@uow.edu.au", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: MicroPython" ], "description": "cayenneLPP\n==========\n\nA Python module for the Cayenne Low Power Packet format\n\nIt aims to facilate the conversion of values typically read from sensors\nto a sequence of bits (the payload) that can be send over a network\nusing the Cayenne Low Power Packet format. This format is particularly\nsuited for LPWAN networks such as LoRaWAN.\n\nThe payload can then be send for instance to an application of The\nThings Network, a LoRaWAN-based community network, which will then\nforward the data to a Cayenne application thanks to its Cayenne\nintegration.\n\nThe module consists of constants defining the different sensors and\ntheir size and one class CayenneLPP containing the methods to build a\npayload.\n\nThe constants have the format NAME\\_SENSOR = (LPP id, Data size) where\nLPP id is the IPSO id - 3200 and Data size is the number of bytes that\nmust be used to encode the reading from the sensor.\n\nMore info here:\nhttps://mydevices.com/cayenne/docs/lora/#lora-cayenne-low-power-payload-overview\n\nCayenneLPP class\n----------------\n\nThe class contains the methods to pack data from sensors in a Cayenne\nLPP format. The payload structure for the Cayenne LPP format is data\nframe of the form: [SENSOR\\_1, SENSOR\\_2, ... SENSOR\\_N], where the\nformat for one sensor is defined by: [CHANNEL, SENSOR TYPE, DATA].\n\nThe channel is an unique identifier for each sensor in the data frame.\n\nThe type of sensors compatible with this class are: - digital\ninput/output; - analog input/output; - luminosity (or illuminance)\nsensor; - presence sensor; - temperature sensor; - humidity sensor; -\naccelerometer; - barometer; - gyrometer; - gps.\n\nAn object of this class has 3 attributes: - payload: the data from one\nor more senors formatted with the Cayenne LPP format; - size: the\nmaximum size of the payload (depends on the network on which the data\nwill be send to); - socket: a socket via which we can send the payload.\n\nThe constructor will generate an object with an empty payload and with a\nmaximum size.\n\nIt is possible to reset the payload with the 'reset' method and change\nthe maximum size with the 'change\\_size' method.\n\nThe current payload and maximum size can be obtained with the methods\n'get\\_payload' and 'get\\_size' methods.\n\nYou can send the payload via the socket using the 'send' method. The\nsocket can be set using the 'set\\_socket' method.\n\nTo add the data from a sensor, the methods 'add\\_sensor\\_name' are\nprovided.\n\nThe documentation is provided in the directory ``doc`` of the GitHub\nrepository.\n\nExample\n~~~~~~~\n\n::\n\n # importing the module\n import cayenneLPP\n\n # create a LoRa socket\n s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)\n s.setsockopt(socket.SOL_LORA, socket.SO_DR, 0)\n s.setblocking(True)\n\n # creating Cayenne LPP packet\n lpp = cayenneLPP.CayenneLPP(size = 100, sock = s)\n\n # adding 2 digital outputs, the first one uses the default channel\n lpp.add_digital_input(True)\n lpp.add_digital_input(False, channel = 112)\n\n # sending the packet via the socket\n lpp.send()\n\nScripts to test the module with a LoPy (https://www.pycom.io/) and The\nThings Network is provided in the ``test_lopy`` directory. Note that you\nneed to update the values of ``app_eui`` and ``app_key`` with the\ncorrect credentials.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jojo-/py-cayenne-lpp", "keywords": "Cayenne,Low Power Payload,LPP", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "cayenneLPP", "package_url": "https://pypi.org/project/cayenneLPP/", "platform": "", "project_url": "https://pypi.org/project/cayenneLPP/", "project_urls": { "Homepage": "https://github.com/jojo-/py-cayenne-lpp" }, "release_url": "https://pypi.org/project/cayenneLPP/0.5b3/", "requires_dist": null, "requires_python": "", "summary": "A module for the Cayenne Low Power Packet format", "version": "0.5b3" }, "last_serial": 3533843, "releases": { "0.5b2": [ { "comment_text": "", "digests": { "md5": "ebe7db087356823e0766e5424aa73f03", "sha256": "28134248e2ab49182409e0c365c9ecf1e54e44cb48e71270c55c89bb6c41f3a9" }, "downloads": -1, "filename": "cayenneLPP-0.5b2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ebe7db087356823e0766e5424aa73f03", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8951, "upload_time": "2018-01-30T03:30:54", "url": "https://files.pythonhosted.org/packages/f9/8e/1236c9b2c293308868439495588a41fb3c146d584f300b6e41d79253b27d/cayenneLPP-0.5b2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9ec56615ee30ff3c4901867b342261eb", "sha256": "4efef2fd7043df43993bb5abcbb45e36ce6e4a9ad366fd676812024bca47f944" }, "downloads": -1, "filename": "cayenneLPP-0.5b2.tar.gz", "has_sig": false, "md5_digest": "9ec56615ee30ff3c4901867b342261eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5983, "upload_time": "2018-01-30T03:30:55", "url": "https://files.pythonhosted.org/packages/2f/52/4064561716d29f5b000a02d7b5ed0594eb2c1bc8eecf52045cb453294494/cayenneLPP-0.5b2.tar.gz" } ], "0.5b3": [ { "comment_text": "", "digests": { "md5": "e95ac6c868a4701d0f90fdaef1a8db04", "sha256": "2df71d93bc1bc79797357b5483565dcf0a6a1d32ced849346f4a756f6c77a950" }, "downloads": -1, "filename": "cayenneLPP-0.5b3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e95ac6c868a4701d0f90fdaef1a8db04", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8973, "upload_time": "2018-01-30T03:47:00", "url": "https://files.pythonhosted.org/packages/17/31/1cfed93fe2d6c779bca4c81bf497ce6dbd0a9ff4f1cadb8e7aa8cdf6164d/cayenneLPP-0.5b3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e9354e33cbcfe40b48a05162f6c2cbb3", "sha256": "b1e58694b38d94fdc969ce764e391704907b92fbd2143ac579d882ec5c390202" }, "downloads": -1, "filename": "cayenneLPP-0.5b3.tar.gz", "has_sig": false, "md5_digest": "e9354e33cbcfe40b48a05162f6c2cbb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5916, "upload_time": "2018-01-30T03:47:02", "url": "https://files.pythonhosted.org/packages/4d/a7/4f00b1a8e1f11de8125950a8c3762469dbc589517dc4ecd94f05ac8c490f/cayenneLPP-0.5b3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e95ac6c868a4701d0f90fdaef1a8db04", "sha256": "2df71d93bc1bc79797357b5483565dcf0a6a1d32ced849346f4a756f6c77a950" }, "downloads": -1, "filename": "cayenneLPP-0.5b3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e95ac6c868a4701d0f90fdaef1a8db04", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8973, "upload_time": "2018-01-30T03:47:00", "url": "https://files.pythonhosted.org/packages/17/31/1cfed93fe2d6c779bca4c81bf497ce6dbd0a9ff4f1cadb8e7aa8cdf6164d/cayenneLPP-0.5b3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e9354e33cbcfe40b48a05162f6c2cbb3", "sha256": "b1e58694b38d94fdc969ce764e391704907b92fbd2143ac579d882ec5c390202" }, "downloads": -1, "filename": "cayenneLPP-0.5b3.tar.gz", "has_sig": false, "md5_digest": "e9354e33cbcfe40b48a05162f6c2cbb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5916, "upload_time": "2018-01-30T03:47:02", "url": "https://files.pythonhosted.org/packages/4d/a7/4f00b1a8e1f11de8125950a8c3762469dbc589517dc4ecd94f05ac8c490f/cayenneLPP-0.5b3.tar.gz" } ] }