Looking for Tasmota 102 instruction/tutorial

Hey All,
I'm trying out Tasmota for the first time. I've found videos on what it is and how to flash a board; I've done that. I've logged on to the board and played around with the configuration.

Now I'm trying to figure out how to blink the onboard LED or connect a DS18B20 and can't find a tutorial on how to do it. I've read through some of the documentation but haven't gotten anywhere.

Where can I learn about actually using a board with Tasmota on it?

Thanks
Rich

The tasmota documentation is quite extensive. They have a dedicated page for the DS18x20

What device do you have Tasmota on?
Have you configured the MQTT settings?
In Node-red connect an mqtt-in node to a debug. The topic should be
stat/<topic frome device MQTT setup>/#
eg stat/wemos/#

Now in the device console enter status.
Do you see the device status message in Node-red?

If you send "toggle" to cmnd/<topic frome device MQTT setup> you should see the device switch between ON and OFF on the main menu.
If it includes a relay, and you have it fully setup, you should hear the relay switch too.

Thanks Jbudd,
I tried this and got nowhere. I'm still missing the basics.

I'm using a generic esp8266.

I don't understand this

Topic = %topic% (tasmota_C59E35)

Does that mean I should use "%" signs when I define my topic? does it mean that "(tasmota_C59E35)" will be appended to the end of my topic?

What is a "Full Topic"?

Full Topic (%prefix%/%topic%/)

Is the mqtt host the Mosquitto install I have running on my Raspberry Pi? or something else.

I've played with all kinds of hardware over the years and there is usually a "hello world" example to get things up and running. What does that look like for Tasmota?

I'm looking for a resource/tutorial for a newbie who has flashed a board, got it on the network and a hello world or blink example.

Thanks
Rich

To try and answer your questions, here is a pic of one of my Tasmota devices' MQTT config

Host is the IP address of my Mosquitto broker, which uses the default port 1883.
Every MQTT Client should have a unique ID. I never change this setting, everything works.
My mosquitto is setup to require login id and password. My login is "admin" and password "password1". You have to tick the little box to enter a password.

This device lives in my kitchen and it turns my coffee machine on and off, so I have topic kitchen/coffee
That means I send commands from Node-red to topic cmnd/kitchen/coffee and I get responses to stat/kitchen/coffee/#

Full Topic - I never use it, can't remember what it's for!

Once you have wifi and MQTT setup, the next step depends on what the board comes with.
You have to configure the template to match the device. I have smart plugs so I need to tell Tasmota which GPIO the relay is on. Once that's done I can toggle it from Node-red.

2 Likes

The fulltopic is exactly that, the
cmnd/....
stat/....

I always set it up like %topic%/%prefix%, ie. some-room/some-device/cmnd as the concept works better in my mind.

Tasmota is usually used in conjunction with mqtt for its communication, but you can use the http interface as well (ie. with a http request node in node-red).

1 Like

OK,
I've made some progress but still not there. I have GPIO 2 set to LED and it's turned ON/HIGH on the board, I can see it in the real world ;).

One question about the board setup. What does the dropdown 1-4 in the LED setup mean?

In Node Red I set up a test inject on the subject /chickenMan I tried a bunch of variations, you can see some of them in the pic below. But the Tasmota console remained silent/unresponsive.

How can I send commands and turn the LED off?

Thanks
Rich

Note that you have neither shared the make/model of your esp nor shown us the mqtt setup, so I can only guess.

In your second picture you have an mqtt-out node and you seem to be feeding commands to the topics

/chickenMan
cmd/chickenMan/
stat/chickenMan/
stat/chickenMan/#
cmd/chickenMan/blink/#

So...

  1. An mqtt topic should not start with a / EDIT: Nor should it end with a /
  2. To send a command you should use a topic cmnd/... not cmd/...
  3. A hash character at the end of an MQTT command is a wildcard. I'm not sure that it makes any sense when you are using mqtt-out (publishing)
  4. stat/chickenMan is (I think) valid. But it's not as much use as (for example) topic cmnd/chickenMan/status and payload 0
  5. cmd/chickenMan/blink/# I don't think this is valid.

You send commands through an mqtt-out node using topic cmnd/chickenMan/~command~
where is one of the commands documented at https://tasmota.github.io/docs/Commands/. Avoid wildcards here. If the command takes a parameter (like the status command I posted above), put the parameter in msg.payload.

You get responses from the esp via an mqtt-in node on topic stat/chickenMan/~whatever~ . It's quite useful to use the wildcard # instead of specifying ~whatever~

Tasmota will also send some status info from time to time on tele/chickenMan/#

Cool, so what's the command to turn the led pin low? I've tried a bunch of variations and get nothing. Note I'm trying these from the Tasmota console, I suspect if they work there they'll work in Node.

cmnd/chickenMan/ 0
or 
cmnd/chickenMan/ off

I'm using these boards, I call them generic because that's how I program them in Arduino.
generic esp8266

It does appear that GPIO 2 is the built-in blue LED on the ESP8266.
I don't have that sort of ESP board, I use a Witty Cloud board for experimenting because it has an RGB LED and a light dependent resistor onboard. It's probably worthwhile getting one while you learn to use Tasmota.

On the Tasmota main menu, do you have a Toggle button?
If not, go to Configuration | Configure Module and set GPIO 2 as Relay_i 1 and try again.
(relay_i indicates inverse logic - you send "ON" to turn the "relay" off. It doesn't really matter for this test.)

Does the button turn the LED on/off?

Assuming it does, go to the console and enter power. Just the command, not the MQTT topic!
It should tell you if it is ON or OFF.
You can append "ON", "OFF", "TOGGLE" and probably 1 or 0 to the power command like this

If that's working, try from Node-red via MQTT. The topic should be "cmnd/chickenMan/power" and the payload ON, OFF or TOGGLE (It's not case sensitive)
Does the led turn on?
Does anything appear in the console when you send a message?
Do you receive stat messages in Node-red?

1 Like

Jbudd!
Thanks for spending the day helping me with this. I appreciate it!

Now to learn how to hook up a PIR and a dimmer for the LEDs.
Thanks again!

FYI, There are a bunch of us that use Tasmota and node-red hanging out on discord at the digiblur server. Lots of help to be gotten there too.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.