Thermostat pour piloter jusqu'à 4 radiateurs avec fil pilote
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
850 B

// SPDX-License-Identifier: GPL-3.0-or-later
/*
* Qt mutizone MQTT thermostat
*
* Copyright (C) 2019 Richard Genoud
*
*/
#ifndef MQTTCLIENT_H
#define MQTTCLIENT_H
#include <QHostAddress>
#include "qmqtt.h"
class MQTTSubcriber: public QMQTT::Client
{
Q_OBJECT
public:
explicit MQTTSubcriber(const QHostAddress& host = QHostAddress::LocalHost,
const quint16 port = 1883,
QObject* parent = NULL);
virtual ~MQTTSubcriber();
public slots:
void onConnected();
void onSubscribed(const QString& topic);
void onReceived(const QMQTT::Message& message);
signals:
void new_temperature(unsigned idx, double val);
void new_hygro(unsigned idx, double val);
void new_battery(unsigned idx, double val);
void new_availability(unsigned idx, bool ok);
};
#endif
/* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */