Home Automation MQTT

HOW TO ACCESS MQTT SERVICE WINDOWS 7

Step 1: Stop mosquitto service running

Step 2: Modifile passwd file in the mqtt folder by running : mosquitto_passwd -c pwfile [username] [password]

Step 3: Moifi mosquitto,config file as follow

# Defaults to true.

allow_anonymous false

# In addition to the clientid_prefixes, allow_anonymous and TLS 

# authentication options, username based authentication is also 

# possible. The default support is described in "Default 

# authentication and topic access control" below. The auth_plugin 

# allows another authentication method to be used.

# Specify the path to the loadable plugin and see the 

# "Authentication and topic access plugin options" section below.

#auth_plugin

# -----------------------------------------------------------------

# Default authentication and topic access control

# -----------------------------------------------------------------

# Control access to the broker using a password file. This file can be

# generated using the mosquitto_passwd utility. If TLS support is not compiled

# into mosquitto (it is recommended that TLS support should be included) then

# plain text passwords are used, in which case the file should be a text file

# with lines in the format:

# username:password

# The password (and colon) may be omitted if desired, although this 

# offers very little in the way of security.

# See the TLS client require_certificate and use_identity_as_username options

# for alternative authentication options.

password_file c:\program files\mosquitto\[password file]