publish temperature

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

publish temperature

#1 Post by uxhamby » 02 Feb 2021, 21:11

I have a thermocouple reporting temperature. I'd like to publish the temperature to mqtt only when the temperarure value exceeds 100 deg.

I have set up a rule base as follows:

on Celcius#Corrected>100
Publish,EnzoStuff/%sysname%/,T=%eventvalue%
endon

but from the mqtt broker, I get:

T=%eventvalue%

Where am I going wrong?

Where is this documented in detail?

Thanks,

Brian H.

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

Re: publish temperature

#2 Post by TD-er » 02 Feb 2021, 22:03

Hmm that's strange... I don't see yet why that %eventvalue% is not replaced. (except from the missing "do" in the first line)

Can you try this:

Code: Select all

on Celcius#Corrected do 
  if %eventvalue% > 100
    Publish,EnzoStuff/%sysname%/,T=%eventvalue%
  endif
endon

User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

Re: publish temperature

#3 Post by uxhamby » 02 Feb 2021, 23:51

Thanks, that seems to work better.

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

Re: publish temperature

#4 Post by TD-er » 03 Feb 2021, 00:04

I think it may have been the missing "do"

Post Reply

Who is online

Users browsing this forum: No registered users and 116 guests