diff --git a/README.md b/README.md index e68b3a8..bcfc303 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,20 @@ def foo(): As soon the data is send, your payload is cleared and waiting for the next sending. +### Advanced payload feautres ### +```Python + #add "model" property to your message + lo.addModel("exampleName") + + #Add "tag" property to your message + lo.addTag("kitchen") + lo.addTags(["humidity","bathroom"]) + + #Use your object as payload (this function doesn't append current paylod) + obj = ["example":"value", "example2":"value2" ] + lo.setObjectAsPayload(obj) +``` + ### Connect, disconnect and loop ### You can control the connection and disconnection of your device using `connect()` and `disconnect()`. @@ -157,7 +171,7 @@ def foo(): # Installation guide for uPython # - +## Example for ESP8266 ## ## Requirements ## 1. [ampy](https://learn.adafruit.com/micropython-basics-load-files-and-run-code/install-ampy) 2. [umqttsimple, umqttrobust and ssl](https://github.com/micropython/micropython-lib) @@ -175,7 +189,7 @@ def foo(): ``` ampy -pCOMXX put main.py ``` -3. Setup internet connection in boot.py file and upload it into device. Example for esp8266 +3. Setup internet connection in boot.py file and upload it into device. ```Python # This file is executed on every boot (including wake-boot from deepsleep) #import esp diff --git a/THIRD_PARTY.txt b/THIRD_PARTY.txt new file mode 100644 index 0000000..869fd15 --- /dev/null +++ b/THIRD_PARTY.txt @@ -0,0 +1,4 @@ +COMPONENT | VERSION | LICENCE | URL +------------------------------------------------------------------------------------------------------------------------------------------------- +Paho-mqtt | Latest | BSD + EPL/EDL | https://github.com/eclipse/paho.mqtt.python/blob/master/LICENSE.txt +simple, robust, ssl micropython modules | Latest | MIT License | https://github.com/micropython/micropython-lib/blob/master/LICENSE