How to use a simulated temperature sensor in WebCore


#1

1) Give a description of the problem
I’m trying to set the temperature of an ST simulated temperature sensor based on the temperature of other physical sensors.

2) What is the expected behavior?
I’d like the simulated sensor to report the max temperature of few other physical sensors.

3) What is happening/not happening?
I have not been able to implement the desired behavior. I have setup the simulated sensor and I know how to assign a fix value to it.

**4) Post a Green Snapshot of the piston!
N/A

**5) Attach any logs
N/A


#2

Have you seen this thread? Maybe similar to what you’re doing.


#3

Thanks for the link, that’s helpful! Do you know if WebCore has a max or min function, as I’m looking at calculating the max and min of several sensors? Thx!


#4

Yes, they’re in the wiki.
https://wiki.webcore.co/Functions#max


#5

Thanks, I guess I should have check the wiki first :frowning:


#6

The max and min function are both returning the sum… what am I missing? Here is my expression with two physical temp sensors:
decimal(max([Fleur’s Room MultiSensor : temperature] [Living Room MultiSensor : temperature]))

Both sensor shows approximately 70 but the expression returns 140 (the sum rather than the max). What am I doing wrong? Thx.


#7

Missing a comma in between your values.


#8

Thanks!