Greetings,
i am very new to mqtt, from what i can see i see messages in topic incease.
Is there any limit?
i have now 3133 topics and 11784 messages from my security alarm system. It is working for 1hour.
Wow. That is not how mqtt is supposed to work.
What are these topics and messages?
What are you plublishing as topics? Time stamps?
You should pick a few topics like, alarm/state, alarm/sensor_1/state, alarm/battery_level, etc… and publish to these topics, not keep on creating new topics every time an event occurs.
The system is publishing by itself,
### MQTT Topics
# MQTT_BASE_TOPIC = 'paradox' # Root of all topics
MQTT_ZONE_TOPIC = 'zones' # Base for zone states
# MQTT_PARTITION_TOPIC = 'partitions' # Base for partition states
# MQTT_BUS_TOPIC = 'buses' # Base for buses states
# MQTT_MODULE_TOPIC = 'bus-module' # Base for bus module states
# MQTT_SYSTEM_TOPIC = 'system' # Base for panel states
# MQTT_REPEATER_TOPIC = 'repeaters' # Base for repeater states
# MQTT_USER_TOPIC = 'users' # Base for user states
# MQTT_EVENTS_TOPIC = 'events' # Base for events
# MQTT_CONTROL_TOPIC = 'control' # Base for control of other elements (ROOT/CONTROL/TYPE)
# MQTT_DEFINITIONS_TOPIC = 'control' # Base for definitions
I found that they have some limit options for topic.
Thank you i will try to figure it out and limit it
/bus_module looks like the chatty root topic. 2544 sub topics.
242 topics in /zones seems excessive too.
yeah,zones are most important what i want.
I need to figure out how to erase history on MQTT.
But for now i go sleep, will figure out next time D:
Zones means when PIR sensor of the room is True/False, But i dont need to have all the history.
Just the last state
Highlight the topic in mqtt explorer and click the yellow trash can icon.
I guess you implemented it wrong way.
Are you storing every new value to new subtopic every time?
If so then it’s wron approach. You should store new values into the same (sub)topic overwriting old one
Do you have 242 zones?
no, but i see what you mean.
The most important is as i said on/off and there are a lot of different stuff
So i will deduct a lot of stuff
You mentioned alarm system?
Does it use door/motion detectors?
If so, my guess is they send a message every time they are triggered.
And the amount of messages is not really something to be bothered by, only if you actually do something with the messages
So one alarm system creating 3133 topics seems normal to you?
As it is on RPI i dont want to have a lot of writing, so i will cut everything down just in case.
Yes door/motion detectors.Yes everytime its triggered.
MQTT is writing on sd card right? Or is it RAM?
It is non volatile (survives a restart) so I’m guessing disk.
depends a bit on how often people move/doors are opened
But that would only be the last message that is retained…so one message for each sensor
As tom adviced correctly that i should cut unneccesary stuff that i dont need.
If i had 3133 PIR sensor that would be different talk
No. That will affect the number of messages, not the number of topics. Number of topics should only depend on the number of sensors. And 3133 is a large amount of topics for one alarm system.
Actualy the message refreshed after restart to 3K. Only topics obviously stay the same.
very true, my mistake…i assumed it was regarding messages, but now that i reread it is topics, and that shouldn’t be that many…