MqttCogs Settings and Configuration

  • May 3, 2019
  • FAQs

Here are all of the settings that are currently available for mqttcogs.

Most of these are directly related to connecting to your mqtt broker. There are couple of other settings for managing and archiving your data.

MQTT Version

MQTT protocol version. Pick from either 3.1 or 3.1.1. Nothing else is supported.

MQTT Server/Port

This needs to be in one of the following forms.

Either tcp://yourmqttbroker:yourportnumber OR ssl://yourmqttbroker:yourportnumber

Make sure that outgoing tcp connections to yourmqttbroker:yourportnumber are allowed by your hosting provider.

This tripped me up.

MQTT ClientID

Unique identifier. Should be unique for MQTTCogs

MQTT User

Obvious, make sure that this user password combination does actually have access to your mqtt broker and appropriate topics.

MQTT Password

Obvious, make sure that this user password combination does actually have access to your mqtt broker and appropriate topics.

MQTT TopicFilter

Topic filter applied when subscribing to messages. Set to # if you want to get all messages from your broker.

MQTT Read Role

WordPress roles that are allowed to see MqttCogs shortcode data. For example, if you set this to ‘Subscriber’ a user will need to be logged in to be able to see any data.

MQTT Write Role

WordPress roles that are allowed to send Mqtt data via a MqttCogs shortcode. For example, if you set this to ‘Subscriber’ a user will need to be logged in to be able to use your widgets. See Publish Data Using An MqttCogs Shortcode

MQTT Connection Recycle (secs)

How often MqttCogs drops the connection to the broker and reconnects. By default MqttCogs runs a ‘watchdog’ routine every minute. If it detects the connection to the Mqtt broker has dropped it reconnects.

It will also reconnect every MQTT Connection Recycle seconds. I have mine set to 298 seconds as I know that my hosting provider has a timeout of 300 seconds on my php scripts.

Save MQTT data for

MqttCogs prunes saved Mqtt data daily. You can choose how much you want to keep.

MQTT Debug

Set the debugging level. Debug information is written to php_errors.log. Normally found in the root of your site.

Avoid leaving this set to ‘All’ as this will produce very large logs! This is useful short term if you want to diagnose a problem.

MySensors Receive Topic

Only set this if you are using MySensors. This allows support for buffering outgoing messages to nodes that use the MySensors smartSleep function.

If you are receiving data from a MySensors node provide the topic that the node uses when it sends data.

For example, my nodes send to topics like this:

mysensors_out/92/2/1/0/0

I would set this to mysensors_out

MySensors Transmit Topic

Only set this if you are using MySensors. This allows support for buffering outgoing messages to nodes that use the MySensors smartSleep function.

If you are sending data to a MySensors node, provide the topic filter for this.

For example, I can send commands to my nodes in this format

mysensors_in/10/6/1/0/2

I would set this to mysensors_in




No Comments


You can leave the first : )



Leave a Reply

Your email address will not be published. Required fields are marked *