rasProject_01 / weSweetHome  R. 116 2026-05-14
process control       /     RasPi software         by   weinert-automation
Loading...
Searching...
No Matches
mosquiSub.c File Reference

A very simple MQTT subsciber. More...

#include <signal.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <mosquitto.h>
#include <getopt.h>

Variables

char clientId [30]
 Id of this MQTT subscriber.
char mqttHost [68]
 The MQTT broker URL or name.
int mqttPort
 MQTT port 1883.
char topicS [60]
 Root of topics to log.

Detailed Description

A very simple MQTT subsciber.

cross-compile by:

program respectively transfer to target machine by:

respectively by the displayed

The building of the application is governed by the make include makeProg_mosquiSub_settings.mk:

Variable Documentation

◆ mqttHost

char mqttHost[68]

The MQTT broker URL or name.

May be set by option –mqttHost meterPi or –mqttBroker 192.168.178.87

default: localhost MQTTBroker (currently localhost !)

◆ clientId

char clientId[30]

Id of this MQTT subscriber.

MQTT client ID.

default value: sweetHomeControl; length: 15; max. length: 36
May be changed before mqttInit().