Display Tasmota Rules??

12,361 views
Skip to first unread message

smill...@gmail.com

unread,
Jan 27, 2021, 9:05:09 AM1/27/21
to TasmotaUsers

I am working on a setup for the ESP8266 to send MQTT messages when it receives serial string messages from another microcontroller.    Of course, it is not working correctly and I am trying to debug it.    High probability that I have errors in my Rules.   I wanted to dump out the rules on the Tasmota Console to review them and look for problems or typos.   However, after lots of searching,  I have not been able to find a command that does that. 

Is there a command to dump out the Rules contents?
Is there a command to dump out all the Option flags? 

Both of these would be handy in my troubleshooting to figure out what I have set incorrectly or what typos I have fat fingered into the system.

Thanks.
---- Steve

Erix

unread,
Jan 27, 2021, 9:09:20 AM1/27/21
to TasmotaUsers, smill...@gmail.com
Hi,
do you mean
Rule0  ?
hope it helps a bit
Erix

--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/c71d641b-d2c8-4f44-b52b-babf419924d8n%40googlegroups.com.

lexxai

unread,
Jan 27, 2021, 6:06:22 PM1/27/21
to sonof...@googlegroups.com
dump out all the Option flags? 
status 0
var
mem
timers
ruletimer

27.01.21 16:08, Erix

Philip Knowles

unread,
Jan 27, 2021, 7:13:35 PM1/27/21
to sonof...@googlegroups.com, lexxai
A good idea is to write the rules into notepad (or another text editor) and then copy and paste into Console. You can easily tweak the rules and can spot obvious typos .
You can also type rule0 to get a list of all rules and/or list individual rules and copy and paste into notepad to fix errors.

Regards

Phil K


From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of lexxai <lex...@gmail.com>
Sent: Wednesday, January 27, 2021 11:06:17 PM
To: sonof...@googlegroups.com <sonof...@googlegroups.com>
Subject: Re: Display Tasmota Rules??
 

smill...@gmail.com

unread,
Jan 28, 2021, 8:53:04 AM1/28/21
to TasmotaUsers
Yes,  "rules1 ?"   worked for me.   Thank you.  I did not try the other variants yet.   It would be helpful if these were listed in the documentation on the web.   I was using the link

 
I don't find the  ?  option detailed there.   

I am copying and pasting my rules from a text file into the console.  The problem is I suspect my at least one of my rules might be too long.  When I run "rule2 ?"  it prints most of the rule and then prints a ".   It does not have all the text.   Still need to troubleshoot that.   I tried trimming down this rule, but so far have not been able to get it to fire.   It is a spare time at home project and my time is kind of short now, so I don't get alot of time to debug.

Thanks for the help.

Philip Knowles

unread,
Jan 28, 2021, 8:58:22 AM1/28/21
to smill...@gmail.com, TasmotaUsers

There isn’t a rules1 ? command. The command without a parameter lists the rule so

Rule0 will list all rules

Rule1 will list the content of rule1

Regards

 

Phil K

 

Sent from Mail for Windows 10

 

From: smill...@gmail.com
Sent: 28 January 2021 13:53
To: TasmotaUsers
Subject: Re: Display Tasmota Rules??

 

Yes,  "rules1 ?"   worked for me.   Thank you.  I did not try the other variants yet.   It would be helpful if these were listed in the documentation on the web.   I was using the link

 

 

I don't find the  ?  option detailed there.   

 

I am copying and pasting my rules from a text file into the console.  The problem is I suspect my at least one of my rules might be too long.  When I run "rule2 ?"  it prints most of the rule and then prints a ".   It does not have all the text.   Still need to troubleshoot that.   I tried trimming down this rule, but so far have not been able to get it to fire.   It is a spare time at home project and my time is kind of short now, so I don't get alot of time to debug.

 

Thanks for the help.

 

On Wednesday, January 27, 2021 at 6:13:35 PM UTC-6 knowles...@gmail.com wrote:

A good idea is to write the rules into notepad (or another text editor) and then copy and paste into Console. You can easily tweak the rules and can spot obvious typos .

You can also type rule0 to get a list of all rules and/or list individual rules and copy and paste into notepad to fix errors.

Regards

Phil K

Philip Knowles

unread,
Jan 28, 2021, 9:10:07 AM1/28/21
to smill...@gmail.com, TasmotaUsers

The rules ‘float’ in that the space can be allocated across rulesets and, with compression, unless your rules are very long you shouldn’t run out of space. If the text is very long you could use rule1+ to append part of rule to a previous one.

 

Regards

 

Phil K

 

Sent from Mail for Windows 10

 

From: smill...@gmail.com
Sent: 28 January 2021 13:53
To: TasmotaUsers

Subject: Re: Display Tasmota Rules??

 

Yes,  "rules1 ?"   worked for me.   Thank you.  I did not try the other variants yet.   It would be helpful if these were listed in the documentation on the web.   I was using the link

 

 

I don't find the  ?  option detailed there.   

 

I am copying and pasting my rules from a text file into the console.  The problem is I suspect my at least one of my rules might be too long.  When I run "rule2 ?"  it prints most of the rule and then prints a ".   It does not have all the text.   Still need to troubleshoot that.   I tried trimming down this rule, but so far have not been able to get it to fire.   It is a spare time at home project and my time is kind of short now, so I don't get alot of time to debug.

 

Thanks for the help.

 

On Wednesday, January 27, 2021 at 6:13:35 PM UTC-6 knowles...@gmail.com wrote:

A good idea is to write the rules into notepad (or another text editor) and then copy and paste into Console. You can easily tweak the rules and can spot obvious typos .

You can also type rule0 to get a list of all rules and/or list individual rules and copy and paste into notepad to fix errors.

Regards

Phil K

Michael Ingraham

unread,
Jan 28, 2021, 9:12:44 AM1/28/21
to TasmotaUsers
Steve,

See - https://tasmota.github.io/docs/Commands/#how-to-use-commands

"Every command used without a parameter (payload) returns the current setting."

Reply all
Reply to author
Forward
0 new messages