Not working Publish %sysname%/ALARM Uebertemperatur

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
edstobi
Normal user
Posts: 44
Joined: 28 May 2020, 20:33

Not working Publish %sysname%/ALARM Uebertemperatur

#1 Post by edstobi » 07 Jul 2024, 20:28

Hi
if I enter this command "Publish %sysname%/ALARM Uebertemperatur " under tools and then press commit, it is displayed in my mqtt. :D
If I enter in rules Set1:

Code: Select all

if [Temp#Temperature] >= 30 
     Publish %sysname%/ALARM Uebertemperatur 
Endif
then nothing happens :shock:

In the log I see
254257: DS : Temperature: 69.1 (28-e2-39-94-97-0c-03-3c [DS18B20])
254290: EVENT: Temp#Temperature=93.1

But no action like HTTP: Publish %sysname%/ALARM Uebertemperatur

Even if i switch a gpio instead of publisch, nothing happens.

Code: Select all

on Temp#Temperature do       // Notabschaltung über 30 Grad
   if [Temp#Temperature] >30
       GPIO,4,0
      Publish %sysname%/status NOTAUS_Uebertemperatur
    endif
Endon
I have the feeling that my rules are not working. Under advancd the rules and Enable Rules Cache: are activated.
Does anyone have any ideas what I can do?
Thx EDSTOBI

User avatar
ThomasB
Normal user
Posts: 1156
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Not working Publish %sysname%/ALARM Uebertemperatur

#2 Post by ThomasB » 07 Jul 2024, 21:01

Your rule syntax does not look correct to me. I use this format:

Typically:
Publish /%sysname%/plugin_name/value_name,[value_name#value]

Or if leading forward slash not used:
Publish %sysname%/plugin_name/value_name,[value_name#value]

- Thomas

User avatar
Ath
Normal user
Posts: 3702
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Not working Publish %sysname%/ALARM Uebertemperatur

#3 Post by Ath » 07 Jul 2024, 21:22

edstobi wrote: 07 Jul 2024, 20:28 If I enter in rules Set1:

Code: Select all

if [Temp#Temperature] >= 30 
     Publish %sysname%/ALARM Uebertemperatur 
Endif
then nothing happens :shock:
A valid example could be:

Code: Select all

On Temp#Temperature do
  If %eventvalue1% >= 30 
     Publish %sysname%/ALARM Uebertemperatur 
  Endif
Endon
Looks much like your code ;)
Did you write your rules code in the web editor of your ESP, or in an external tool?
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8981
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Not working Publish %sysname%/ALARM Uebertemperatur

#4 Post by TD-er » 07 Jul 2024, 22:28

Just to be sure;
- Topic: "%sysname%/ALARM"
- Message: "Uebertemperatur"

That's what is intended?
Maybe best to wrap the command arguments in quotes to make it clear and also not to use a space as argument separator, but rather use a comma.

Like this:

Code: Select all

On Temp#Temperature do
  If %eventvalue1% >= 30 
     Publish,"%sysname%/ALARM","Uebertemperatur"
  Endif
Endon
And make sure you don't have the "send all in single event" checked in the task.

edstobi
Normal user
Posts: 44
Joined: 28 May 2020, 20:33

Re: Not working Publish %sysname%/ALARM Uebertemperatur

#5 Post by edstobi » 07 Jul 2024, 23:40

Hi Ath
I just flashed my ESP with ESP_Easy_mega_20240414_normal_ESP32_4M316k_ETH new
I then have installed to rules1:

Code: Select all

On Temp#Temperature do
  If %eventvalue1% >= 30 
     Publish %sysname%/ALARM Uebertemperatur 
  Endif
Endon
everything now is running.
just changing the code was not working
THY :D

TD-er
Core team member
Posts: 8981
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Not working Publish %sysname%/ALARM Uebertemperatur

#6 Post by TD-er » 08 Jul 2024, 05:44

Hmm what was the old build you were using?
The used code in the suggested rules doesn't use really new commands or variables.

edstobi
Normal user
Posts: 44
Joined: 28 May 2020, 20:33

Re: Not working Publish %sysname%/ALARM Uebertemperatur

#7 Post by edstobi » 08 Jul 2024, 19:43

Hi
It was the ESP_Easy_mega_20220427_normal_ESP32_4M316k_ETH.
I don't want to say that I haven't messed something else up

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests