@@ -138,6 +138,20 @@ def foo():
138
138
139
139
As soon the data is send, your payload is cleared and waiting for the next sending.
140
140
141
+ ### Advanced payload feautres ###
142
+ ``` Python
143
+ # add "model" property to your message
144
+ lo.addModel(" exampleName" )
145
+
146
+ # Add "tag" property to your message
147
+ lo.addTag(" kitchen" )
148
+ lo.addTags([" humidity" ," bathroom" ])
149
+
150
+ # Use your object as payload (this function doesn't append current paylod)
151
+ obj = [" example" :" value" , " example2" :" value2" ]
152
+ lo.setObjectAsPayload(obj)
153
+ ```
154
+
141
155
142
156
### Connect, disconnect and loop ###
143
157
You can control the connection and disconnection of your device using ` connect() ` and ` disconnect() ` .
@@ -157,7 +171,7 @@ def foo():
157
171
158
172
159
173
# Installation guide for uPython #
160
-
174
+ ## Example for ESP8266 ##
161
175
## Requirements ##
162
176
1 . [ ampy] ( https://learn.adafruit.com/micropython-basics-load-files-and-run-code/install-ampy )
163
177
2 . [ umqttsimple, umqttrobust and ssl] ( https://github.com/micropython/micropython-lib )
@@ -175,7 +189,7 @@ def foo():
175
189
```
176
190
ampy -pCOMXX put main.py
177
191
```
178
- 3 . Setup internet connection in boot.py file and upload it into device. Example for esp8266
192
+ 3 . Setup internet connection in boot.py file and upload it into device.
179
193
``` Python
180
194
# This file is executed on every boot (including wake-boot from deepsleep)
181
195
# import esp
0 commit comments