-
Notifications
You must be signed in to change notification settings - Fork 10
Description
It looks like PubSubClient has updated code which break the SecuritySensor4ToMQTT code
What is required now by PubSubClient is the following:
PubSubClient (server, port, [callback], client, [stream])
Creates a fully configured client instance.
Parameters
server : the address of the server (IPAddress, uint8_t[] or const char[])
port : the port to connect to (int)
callback : optional a pointer to a message callback function called when a message arrives for a subscription created by this client.
client : an instance of Client, typically EthernetClient.
stream : optional an instance of Stream, used to store received messages. See the mqtt_stream example for more information.
I was able to get it to compile by changing the callback method to the following:
void callback(
char* topic,
byte* payload,
unsigned int length) {
And changing the constructor to the following:
// Instantiate MQTT client
EthernetClient ethClient;
PubSubClient client(server, 1883, callback, ethClient);