Hello,
I couldn’t find any existing literature on this topic so I decided to post a question. I would like to retrieve the RSSI value via MQTT when a button is pushed. My current setup works and relays the RSSI but it sends it much too frequently and floods my log. I want the ability to retrieve the RSSI when I push a button.
My current code is this:
Number Stove_Burner_RSSI "Stovetop Burner: RSSI [%d %%]" <qualityofservice> (gRSSI)
{ mqtt="<[broker:tele/stoveburner/STATE:state:JSONPATH($.Wifi.RSSI)]" }
This works fine and updates the RSSI of the sonoff but it is way too frequent.
The button code I setup looks like this:
Switch getrssi "Get RSSI" <qualityofservice> (gRSSI) [ "Switchable" ]
I already have a few number items setup to have the RSSI placed into them but am unable to figure out how to do it.
The rule is as follows:
rule "get rssi"
when
Item getrssi changed from OFF to ON or
Item getrssi changed from ON to OFF
then
Stove_Burner_RSSI = { mqtt="<[broker:tele/stoveburner/STATE:state:JSONPATH($.Wifi.RSSI)]" }
end
I know this is not correct but what would the correct code look like? Thank you.