Anyone an idea why publishing isn't working? I use the default user_main.c and I'm publishing to the (existing) broker Ubuntu server. The server doesn't need auth. I'm running emonCMS and Node-RED on it.
/*DEFAULT CONFIGURATIONS*/
#define MQTT_HOST "192.168.2.120" //or "mqtt.yourdomain.com"
#define MQTT_PORT 1880
#define MQTT_BUF_SIZE 1024
#define MQTT_KEEPALIVE 120 /*second*/
//#define MQTT_CLIENT_ID "DVES_%08X"
//#define MQTT_USER "DVES_USER"
//#define MQTT_PASS "DVES_PASS"
//#define MQTT_CLIENT_ID "ESP8266_%8X"
#define MQTT_CLIENT_ID ""
#define MQTT_USER ""
#define MQTT_PASS ""
#define STA_SSID "mywifissid"
#define STA_PASS "mywifipassword"
#define STA_TYPE AUTH_WPA2_PSK
COM2 log wrote:
Connected to COM2 at 115200 baud
connected with WiFi2011AP1, channel 4
dhcp client start...
STATION_IDLE
STATION_IDLE
STATION_IDLE
ip:192.168.2.110,mask:255.255.255.0,gw:192.168.2.1
TCP: Connect to ip 192.168.2.120:1880
MQTT: Connected to broker 192.168.2.120:1880
MQTT: Sending, type: 0, id: 0000
TCP: Disconnected callback
MQTT: Disconnected
Free memory
TCP: Connect to ip 192.168.2.120:1880
TCP: Reconnect to: 192.168.2.120:1880
MQTT: Connected to broker 192.168.2.120:1880
MQTT: Sending, type: 0, id: 0000
TCP: Disconnected callback
MQTT: Disconnected
Free memory
TCP: Connect to ip 192.168.2.120:1880
TCP: Reconnect to: 192.168.2.120:1880
MQTT: Connected to broker 192.168.2.120:1880
MQTT: Sending, type: 0, id: 0000
TCP: Disconnected callback
MQTT: Disconnected
Free memory