Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tam
setChannel 10 0
addChannel 10 $CH11
publishFloat myAverageResult $CH10/5
setChannel 10 0
startDriver SHT3X
SHT_Calibrate 0 0
addEventHandler OnHold 20 SafeMode 3
waitFor WiFiState 4
waitFor MQTTState 1
SHT_Measure
delay_s 1
addChannel 10 $CH2
publishFloat "temperature" $CH10/10
delay_s 1
publishInt "humidity" $CH3
delay_s 1
SendGET http://192.168.0.222:80/sensorTemp?id=10178502&t=$CH2&h=$CH3&p=1000&v=1
delay_s 5
DeepSleep 120
p.kaczmarek2 wrote:SHT30, not STH30. In addition, remember that this sensor has a selectable address, so you need to use the same as on the PCB.... I think so.
// addRepeatingEvent [IntervalSeconds][RepeatsOr-1][CommandToRun]
addRepeatingEvent 10 1 setChannel 1 0
addRepeatingEvent 30 1 DeepSleep 900
erdeidominik1999 wrote:@p.kaczmarek2 I think it is the same as retain with another payload, if the retain flag is set you should add the retain to the publish.]
erdeidominik1999 wrote:
So if the repeating event is clear to me, if I add this before the wait for mqtt state 1 for example, if it fails to connect in 30 seconds it will go to sleep for 15 mins?addRepeatingEvent 30 1 DeepSleep 900