vThings Forums

Full Version: [Solved] MQTT fails since yesterday
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

for some time now I am using a vThings - Air Quality Monitor v3 without problems.
Since yesterday unfortunately it does not work anymore, looks like the MQTT connection always fails.
No changes done, publishing to the MQTT server with other tools works fine.
In addition I also do use one of the older CO2 sensors CM1102 which still works fine (same MQTT setup).
Please find below the  messages from the vThings configuration tool:
Code:
[PDest::process
SerialDumpDest::process
IP    : 192.168.0.150
CHIPID    : D022D3
RUNTIME    : 1999
CO2    : 1020.00
TEMP    : 22.39
TEMPR    : 22.39
HUM    : 43
MQTTDest::process]
[Sending via MQTT: 192.168.0.119,1883]
[Connecting to server :WZDG_CO2TH]
[_SENS01,,
MQTT Connected]
[Failed!]

and some more info:
Code:
[Scheduling command: crc40prop_list
Scheduling command: nop
crc40prop_list
Scheduling command: prop_list
PowerManager timeout: 0
PowerManager disabled
prop_list
---vESPrinoCFG_start---
cubic.co2.missing=present
ds18b20.port=missing
rf.CO2=136
rf.PM25=137
rf.PM10=138
rf.TEMP=140
rf.HUM=141
rf.PRES=142
rf.GEN=143
wifi.ssid=secret
wifi.p1=secret
oh.cfg={"ohHost":"","ohPort":"","ohCO2":"","ohTEMP":"","ohHUM":"","ohPRES":"","ohPM25":"","ohPM10":"","ohLUX":""}
send.interval=60
debug=true
mqtt.server=192.168.0.119
mqtt.port=1883
mqtt.client=WZDG_CO2TH_SENS01
mqtt_msg_arr0=/CO2SENSORS/WZDG_CO2TH_SENS01/temperature:%TEMP%
mqtt_msg_arr1=/CO2SENSORS/WZDG_CO2TH_SENS01/humidity:%HUM%
mqtt_msg_arr2=/CO2SENSORS/WZDG_CO2TH_SENS01/CO2ppm:%CO2%]
[---vESPrinoCFG_end---
ready >

If any additional information is required I am happy to provide it.
Thanks for any hint resolving the problem,

Andreas
can you please send me the log file from the beginning - after you connect or reboot the device
it is weird, why it connects to the server, but then fails to send
Hi Vladimir,

below is a complete log, hope everything is included:
Code:
Searching for v.Air Trying : COM7

.  . [Hppjd2à´@>häü]
[„•…ÁHeap at start: 37392]
. [DEBUG is: 1]
.  .  . [vESPrino v1.16 build20170103]

vESPrino found on : COM7
[Trying : 13,12
Getting CO2 Sensor Software Version]
[10,FE,FE,3F,A8,FD,FE,3F,E4,2D,FF,3F,2E,54,20,40,14,93,FE,3F,A8,FD,FE,3F,
Trying : 12,13
Getting CO2 Sensor Software Version]
[16,C,1E,42,53,20,56,33,2E,30,32,39,20,30,69,40,14,93,FE,3F,AA,FD,FE,3F,
CO2 Sensor SW Ver: BS V3.029 0i
done
CM1102 Dual Beam NDIR sensor
CO2 now:]
[1240]
[Scheduling command: nop 0
Scheduling command: nop 0
Scheduling command: nop
nop 0
PowerManager timeout: 0
PowerManager disabled
nop 0
PowerManager timeout: 0
PowerManager disabled
PowerManager timeout: 0
PowerManager disabled
ready >
TEST
SI7021
Found SI7021 - Temperature/Humidity Sensor]
[Scheduling command: info
Scheduling command: nop
info

vESPrino v1.16 build20170103
IP address: 0.0.0.0
Chip ID: D022D3
PowerManager timeout: 0
PowerMan]
[ager disabled
ready >
BME280]
[BME280 - init failed!
Scheduling command: crc40prop_list
Scheduling command: nop
crc40prop_list
Scheduling command: prop_list
PowerManager timeout: 0
Powe]
[rManager disabled
prop_list
---vESPrinoCFG_start---
cubic.co2.missing=present
ds18b20.port=missing
rf.CO2=136
rf.PM25=137
rf.PM10=138
rf.TEMP=140
rf.HUM=141
rf.PRES=142
rf.GEN=143
wifi.ssid=secret
wifi.p1=secret
oh.cfg={"ohHost":"","ohPort":"","ohCO2":"","ohTEMP":"","ohHUM":"","ohPRES":"","ohPM25":"","ohPM10":"","ohLUX":""}
send.interval=60
debug=true
mqtt.server=192.168.0.119
mqtt.port=1883
mqtt.client=WZDG_CO2TH_SENS01
mqtt_msg_arr0=/CO2SENSORS/WZDG_CO2TH_SENS01/temperature:%TEMP%
mqtt_msg_arr1=/CO2SENSORS/WZDG_CO2TH_SENS01/humidity:%HUM%
mqtt_msg_arr2=/CO2SENSORS/WZDG_CO2TH_SENS01/CO2ppm:%CO2%
---vESPrinoCFG_end---
ready >
BMP085]
[BMP085 - init failed!
PM2005]
[CDM7160]
[DS18B20
DS18B20 is on: missing
TSL2561]
[TSL2561 - init failed!
BH1750]
[BH1750 - init failed!
APDS9960
APDS9960 - init failed!

--- Setup DESTINATIONS ---
CustomHTTP
SerialDump
MQTT
RFX10]
[Blynk]
[Heap At setup end: 34320
schedule commands from prop: event.setupEnd
------State changed to: 6
Scheduling command: sendNowCond
sendNowCond]
[--- DestHanlder: sendValue --- 1]
[16,5,1,4,D8,1,0,7,8,3B,FF,3F,68,24,20,40,AC,3A,FF,3F,1,0,0,0,
sss:1240
Scheduling command: ledcolor green
Found SI7021 - Temperature/Humidity Sensor]
[Decimal Separator is: .]
[BME280 - init failed!]
[BMP085 - init failed!]
[TSL2561 - init failed!]
[BH1750 - init failed!
CustomHTTPDest::process
SerialDumpDest::process
IP    : 192.168.0.150
CHIPID    : D022D3
RUNTIME    : 9
CO2    : 1240.00
TEMP    : 22.40
TEMPR    : 22.40
HUM    : 46
MQTTDest::process]
[Sending via MQTT: 192.168.0.119,1883]
[Connecting to server :WZDG_CO2TH_SENS01,,
MQTT Connected]
[Failed!]
[Heap : 34016
ledcolor green
ready >
------State changed to: 3
IP address: 192.168.0.150 in 14978 ms
GOT IP]
[Scheduling command: ledbrg 98
Scheduling command: ledcolor black
ledbrg 98
ledcolor black
ready >]
[Scheduling command: sendNowCond
sendNowCond]
[--- DestHanlder: sendValue --- 0]
[16,5,1,4,E2,1,0,FD,C8,3A,FF,3F,68,24,20,40,6C,3A,FF,3F,2,0,0,0,
sss:1250
Found SI7021 - Temperature/Humidity Sensor]
[BME280 - init failed!]
[BMP085 - init failed!]
[TSL2561 - init failed!]
[BH1750 - init failed!
Heap : 34096
ready >]
[Scheduling command: sendNowCond
sendNowCond]
[--- DestHanlder: sendValue --- 1]
[16,5,1,4,D8,1,0,7,E0,3B,FF,3F,68,24,20,40,84,3B,FF,3F,2,0,0,0,
sss:1240
Found SI7021 - Temperature/Humidity Sensor]
[BME280 - init failed!]
[BMP085 - init failed!]
[TSL2561 - init failed!]
[BH1750 - init failed!
CustomHTTPDest::process
SerialDumpDest::process
IP    : 192.168.0.150
CHIPID    : D022D3
RUNTIME    : 78
CO2    : 1245.00
TEMP    : 22.42
TEMPR    : 22.42
HUM    : 45
MQTTDest::process]
[Sending via MQTT: 192.168.0.119,1883]
[Connecting to server :WZDG_CO2TH]
[_SENS01,,
MQTT Connected]
[Failed!]
[Heap : 33904
ready >]
[Scheduling command: sendNowCond
sendNowCond]
[--- DestHanlder: sendValue --- 0]
[16,5,1,4,E2,1,0,FD,E8,3B,FF,3F,68,24,20,40,8C,3B,FF,3F,3,0,0,0,
sss:1250
Found SI7021 - Temperature/Humidity Sensor]
[BME280 - init failed!]
[BMP085 - init failed!]
[TSL2561 - init failed!]
[BH1750 - init failed!
Heap : 33928
ready >]
[Scheduling command: sendNowCond
sendNowCond]
[--- DestHanlder: sendValue --- 1]
[16,5,1,4,E2,1,0,FD,E0,3B,FF,3F,68,24,20,40,84,3B,FF,3F,3,0,0,0,
sss:1250
Found SI7021 - Temperature/Humidity Sensor]
[BME280 - init failed!]
[BMP085 - init failed!]
[TSL2561 - init failed!]
[BH1750 - init failed!
CustomHTTPDest::process
SerialDumpDest::process
IP    : 192.168.0.150
CHIPID    : D022D3
RUNTIME    : 146
CO2    : 1250.00
TEMP    : 22.44
TEMPR    : 22.44
HUM    : 45
MQTTDest::process]
[Sending via MQTT: 192.168.0.119,1883]
[Connecting to server :WZDG_CO2TH]
[_SENS01,,
MQTT Connected]
[Failed!]
[Heap : 33904
ready >]
[Scheduling command: sendNowCond
sendNowCond]
[--- DestHanlder: sendValue --- 0]
[16,5,1,4,E2,1,0,FD,E8,3B,FF,3F,68,24,20,40,8C,3B,FF,3F,3,0,0,0,
sss:1250
Found SI7021 - Temperature/Humidity Sensor]
[BME280 - init failed!]
[BMP085 - init failed!]
[TSL2561 - init failed!]
[BH1750 - init failed!
Heap : 33928
ready >]
[Scheduling command: sendNowCond
sendNowCond]
[--- DestHanlder: sendValue --- 1]
[16,5,1,4,E2,1,0,FD,E0,3B,FF,3F,68,24,20,40,84,3B,FF,3F,3,0,0,0,
sss:1250
Found SI7021 - Temperature/Humidity Sensor]
[BME280 - init failed!]
[BMP085 - init failed!]
[TSL2561 - init failed!]
[BH1750 - init failed!
CustomHTTPDest::process
SerialDumpDest::process
IP    : 192.168.0.150
CHIPID    : D022D3
RUNTIME    : 216
CO2    : 1250.00
TEMP    : 22.49
TEMPR    : 22.49
HUM    : 45
MQTTDest::process]
[Sending via MQTT: 192.168.0.119,1883]
[Connecting to server :WZDG_CO2TH_SENS01,,
MQTT Connected]
[Failed!]
[Heap : 33904
ready >]
Thanks for your help,
Andreas
aahhh, now i saw it.. in fact it is a bug that a fellow already reported, but i was fixing other stuff and still havent got to it.
basically after the firmware replaces the mqtt value string %CO2% with the actual value
then another part checks if there are unreplaced stuff.. but it searches for CO2 and not for %CO2%
so if you have CO2 in the topic value (e.g. your topic) then this check fails.
i will fix it in the current firmware, but i need a couple days more to finalize testing.

maybe you got the last automatic update that caused this troubles
it is also interesting why your other is still working... in general firmware update happens after restart, so if for some reason one of the sensors rebooted - it got the firmware update, which is 20161217
and if you updated then using OTAH, this is how you got the latest.. but both of them have this bug
Yes, that's it, changed to something different than "CO2" and it reports happily again over MQTT.
Smile  
No worries about the other sensor, it works perfectly and if it stops I know why now.
Wink

Andreas

PS: How can one get notified about new firmware versions?
about the firmware updates, i am not quite sure Smile
for now there are two types
1. Forced - such that i push to all devices, and they get them once they reboot
2. Manual - using the "otah" command - this gets a newer version, but not necessary better than the Forced

(though also the Forced as we see is not too good)
as for the new features in each - i try to keep track here:
http://forum.vair-monitor.com/showthread.php?tid=10

all in all the process is not yet clarified, which would be the best