Episode 4, Learning Tasmota, Part 3: MQTT

テクノロジー



Thanks for watching the 4th episode of MarkTroyer.Tech.

Previous Episodes
Episode 1, Learning Tasmota, Part 1 : https://youtu.be/4CtUpvBF1U8
Episode 2, Learning Tasmota, Part 2 : https://youtu.be/nsMcXmTql3w
Episode 3, WiFi vs LoRa for fermentation use cases https://youtu.be/PWEo5E_pLlo

If you would like to create your own Learning Tasmota PCB, click on this link and you can order one directly from PCBWay https://www.pcbway.com/project/shareproject/Tasmota_Testing_and_Learning_Reference_Device.html

Big changes in my video set up as I come to grips with OBS and the chroma key mechanism. Production is still taking longer than expected but shorter than other episodes. The next major focus will be on audio quality using features in OBS. There continues to be much to Learn, Master and Apply. I am in my element.

Referenced Links:

https://mosquitto.org/download/ – client libraries. Executables for windows. Packages for RPI.
Mosquitto Test Broker at test.mosquitto.org

Chrome ウェブストア
Google Chrome のすばらしいアプリ、ゲーム、拡張機能、テーマをぜひご利用ください。

Tasmota Topic Nomenclature

Telemetry Topics: tele/device/type
e.g. tele/tasmota_C69654/SENSOR

Status Topics: stat/device/type
e.g. stat/tasmota_C69654/RESULT

Command Topics: cmd/device/type
e.g. cmnd/tasmota_C69654/LEDPOWER3

Example Message for Sensors
Topic: tele/tasmota_C69654/SENSOR
{
“Time”: “2020-12-26T19:16:58”,
“Switch1”: “OFF”,
“ANALOG”: {
“Illuminance”: 1761
},
“DS18B20”: {
“Id”: “3C01B556866B”,
“Temperature”: 21.8
},
“TempUnit”: “C”
}

Set Telemtry period to something different than the 5 minute default
teleperiod 30

Resulting status updates from pressing momentary push button.
1: stat/tasmota_C69654/RESULT
{“Switch1”:
{“Action”:”ON”}
}

2: stat/tasmota_C69654/RESULT
{“LedPower3″:”ON”}

3: stat/tasmota_C69654/RESULT
{“Switch1”:
{“Action”:”OFF”}
}

4: stat/tasmota_C69654/RESULT
{“LedPower3″:”OFF”}

Actuation command examples sent from the MQTTlens client
1: cmnd/tasmota_C69654/LEDPOWER3
ON

2: cmnd/tasmota_C69654/BUZZER
5,1

3: cmnd/tasmota_C69654/DIMMER
50

Tasmota console command line examples to publish an MQTT message
1: publish cmnd/tasmota_C69654/LEDPOWER3 OFF

2: publish cmnd/tasmota_C69654/BUZZER 5,1

3: publish cmnd/tasmota_C69654/DIMMER 75

4: publish cmnd/MarkTroyer.Tech/message “This message was published from the Learning Tasmota PCB”.

Bonus Rule!
rule2
on Switch1#Action=ON
do publish cmnd/marktroyer.tech/message “Thanks for watching the bonus section in episode 4”
endon
rule2 on

Additional notes and resources at https://marktroyer.tech

Comments

Copied title and URL