Add MQTT & Trigger Node (#1705)

*  MQTT-Node

*  Small fix

*  Error when the publish method faile

*  Improvements

*  Improvements

*  Add Send Input Data parameter

*  Minor improvements

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
Ricardo Espinoza
2021-04-30 21:23:25 -04:00
committed by GitHub
parent 0dd760f67d
commit 6c773d7a86
7 changed files with 259 additions and 22 deletions

View File

@@ -3,15 +3,11 @@ import {
NodePropertyTypes,
} from 'n8n-workflow';
export class Mqtt implements ICredentialType {
name = 'mqtt';
displayName = 'MQTT';
documentationUrl = 'mqtt';
properties = [
// The credentials to get from user and save encrypted.
// Properties can be defined exactly in the same way
// as node properties.
{
displayName: 'Protocol',
name: 'protocol',
@@ -55,5 +51,19 @@ export class Mqtt implements ICredentialType {
},
default: '',
},
{
displayName: 'Clean Session',
name: 'clean',
type: 'boolean' as NodePropertyTypes,
default: true,
description: `Set to false to receive QoS 1 and 2 messages while offline.`,
},
{
displayName: 'Client ID',
name: 'clientId',
type: 'string' as NodePropertyTypes,
default: '',
description: 'Client ID. If left empty, one is autogenrated for you',
},
];
}