10 * Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
11 *
12 * Documentation: http://www.mysensors.org
13 * Support Forum: http://forum.mysensors.org
14 *
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * version 2 as published by the Free Software Foundation.
18 *
19 *******************************
20 *
21 * REVISION HISTORY
22 * Version 1.0 - Rait Lotamõis
23 *
24 * DESCRIPTION
25 * The TinyGSM MQTT gateway sends radio network (or locally attached sensors) data to your MQTT broker using a GSM modem or optionally an ESP8266 as a WiFi modem.
26 * The node also listens to MY_MQTT_TOPIC_PREFIX and sends out those messages to the radio network
27 *
28 * LED purposes:
29 * - To use the feature, uncomment WITH_LEDS_BLINKING in MyConfig.h
30 * - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
31 * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
32 * - ERR (red) - fast blink on error during transmission error or recieve crc error
33 */
34
35
36// Enable debug prints to serial monitor
37#define MY_DEBUG
38
39// Enables and select radio type (if attached)
40#define MY_RADIO_RF24
41//#define MY_RADIO_RFM69
42//#define MY_RADIO_RFM95
43
44#define MY_GATEWAY_MQTT_CLIENT
45
46// Enable GSM modem support
47#define MY_GATEWAY_TINYGSM
48
49// Define your modem
50#define TINY_GSM_MODEM_SIM800
51// #define TINY_GSM_MODEM_SIM808
52// #define TINY_GSM_MODEM_SIM900
53// #define TINY_GSM_MODEM_A6
54// #define TINY_GSM_MODEM_A7
55// #define TINY_GSM_MODEM_M590
56// #define TINY_GSM_ESP8266
57
58// leave empty anything that does not apply
59#define MY_GSM_APN "internet"
60//#define MY_GSM_PIN "1234"
61#define MY_GSM_USR ""
62//If using a GSM modem, this stands for your GSM connection password. If using WiFi, it's your wireless password.
63#define MY_GSM_PSW ""
64//#define MY_GSM_SSID ""
65
66// Use Hardware Serial on Mega, Leonardo, Micro
67//#define SerialAT Serial1
68// or Software Serial on Uno, Nano
69#include <SoftwareSerial.h>
70#define MY_GSM_RX 4
71#define MY_GSM_TX 5
72
73// If your Mosquitto is old fashioned and does not support 3.1.1
74//#define MQTT_VERSION MQTT_VERSION_3_1
75
76// Set this node's subscribe and publish topic prefix