You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Note that I initially posted this request to the "Community Forum" but the moderators helpfully suggested that I post here instead.)
I would like to be able to filter out invalid MQTT messages at the Mosquitto broker level.
For example, my temperature sensors which involve 4 entities (temperature, humidity, RSSI, batter) often get invalid data which I can detect by humidity > 100.
I would like to filter these out wholesale at the broker level by doing something like:
function acl_check(clientid, username, topic, payload, qos, retain)
local json = require("cjson") -- Make sure Lua JSON library is available
local data = json.decode(payload)
-- Reject if "humidity" exists and is greater than 100
if data.humidity and tonumber(data.humidity) > 100 then
return mosq.AUTH_DENIED
end
return mosq.AUTH_GRANTED
end
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the issue you are experiencing
(Note that I initially posted this request to the "Community Forum" but the moderators helpfully suggested that I post here instead.)
I would like to be able to filter out invalid MQTT messages at the Mosquitto broker level.
For example, my temperature sensors which involve 4 entities (temperature, humidity, RSSI, batter) often get invalid data which I can detect by humidity > 100.
I would like to filter these out wholesale at the broker level by doing something like:
And then modifying
mosquitto.conf
by adding:My understanding is that this is not possible currently since you can't add plugins to the add-on.
Is that correct?
If so, is there any way to add the plugin capability to the broker add-on?
What type of installation are you running?
Home Assistant OS
Which operating system are you running on?
Home Assistant Operating System
Which add-on are you reporting an issue with?
Mosquitto broker
What is the version of the add-on?
6.5.0
Steps to reproduce the issue
As above
System Health information
NA
Anything in the Supervisor logs that might be useful for us?
Anything in the add-on logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: