01-23-2017, 09:44 PM
I have setup another MQTT broker, this time Mosquitto and configured it to accept any incoming connection.
I have successfully established connections explicitly using both version 3.1 and version 3.1.1 with both a self written python script and the java based MQTT client MQTT.fx, (and multiple android apps). I can publish messages from any client and will see it immediately in the other clients. I also montior the log file of Mosquitto and can see the connections and message exchange there also. In summary, I'm pretty sure that my MQTT setup is correct and functional and that clients can connect using both protocol versions.
Unfortunately, still no luck with the vAir. I can see no connection attempt of the vAir in the Mosquitto log files.
Here is another log output:
[quote]
Searching for v.Air . . . . . . . . . . . . . . . . . . . Searching for v.Air Trying : COM7
[5]
. . [?HÌkèDXà?]
[ðb(?ðø]
[???ÁHeap at start: 37392]
. [vESPrino v1.16 build20170103]
vESPrino found on : COM7
[IP address: 192.168.178.233
Chip ID: D549B3
ready >
Waiting for auto-connect]
[Found i2c bus on SDA:SCL = D51 (14:5)]
[I2C Bus on SDA:SCA (14:5)
--- Setup PLUGINS ---
Neopixel
crc40prop_list
prop_list]
[---vESPrinoCFG_start---
temp.adjustment=-0.4
cubic.co2.missing=missing
ds18b20.port=missing
rf.CO2=136
rf.PM25=137
rf.PM10=138
rf.TEMP=140
rf.HUM=141
rf.PRES=142
rf.GEN=143
send.interval=120
wifi.staticip=192.168.178.233
wifi.gateway=192.168.178.1
wifi.subnet=255.255.255.0
wifi.dns1=192.168.178.1
wifi.ssid=[hidden]
wifi.p1=[hidden]
mqtt.server=<hostname of my public mqtt broker>
mqtt.port=31883
mqtt.client=vair
mqtt.user=vair
mqtt.pass=vair123
mqtt_msg_arr0=vair/temp:%TEMP%
mqtt_msg_arr1=test/test:hello from vair
mqtt_msg_arr2=test:air is %CO2%
custom_url_arr0=http://192.168.178.47:8000/service?co2=%CO2%
custom_url_arr1=http://192.168.178.47:8000/service?hum=%HUM%
custom_url_arr2=http://192.168.178.47:8000/service?temp=%TEMP%
custom_url_arr3=http://192.168.178.47:8000/service?pres=%PRES%
custom_url_arr4=http://192.168.178.47:8000/service?pm25=%PM25%
custom_url_arr5=http://192.168.178.47:8000/service?pm10=%PM10%]
[---vESPrinoCFG_end---
ready >
DweetIO]
[crc61nop 0
nop 0
ready >
WebServer]
[WebSocketServer]
[PowerManager
GPIO]
[Servo]
[Annemometer]
[TimerManager
--- Setup SENSORS ---
CO2
TEST]
[SI7021
Found SI7021 - Temperature/Humidity Sensor]
[BME280]
[BMP085]
[PM2005
Found PM2005 - Dust / Particle Sensor]
[50,16,7,4,1,68,0,7C,
CDM7160
Found CDM7160 CO2 Sensor
DS18B20
TSL2561]
[BH1750]
[APDS9960]
[--- Setup DESTINATIONS ---
CustomHTTP
SerialDump
MQTT
RFX10]
[Blynk]
[Heap At setup end: 34520]
[------State changed to: 3
IP address: 192.168.178.233 in 8094 ms
GOT IP
sendNowCond]
[--- DestHanlder: sendValue --- 1
Found SI7021 - Temperature/Humidity Sensor]
[Decimal Separator is: .]
[Raw CO2: 1814]
[CustomHTTPDest::process]
[Calling HTTP: [http://192.168.178.47:8000/service?co2=1814]]
[Response Code: 404
CLOSED
Response Code: 404]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 1979]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 2053]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 2049]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 1
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 2028]
[CustomHTTPDest::process]
[Calling HTTP: [http://192.168.178.47:8000/service?co2=2024]
Response Code: 404
CLOSED
Response Code: 404]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 2016]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 2014]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 2012]
[ready >]
[crc71nop
ready >]
[crc00mqtt_msg_clean
mqtt_msg_clean]
[ready >]
[crc01mqtt_setup "<hostname of my public mqtt broker>","31883","vair","vair","vair123"
mqtt_setup "<hostname of my public mqtt broker>","31883","vair","vair","vair123"]
[MQTT Configuration Stored
<hostname of my public mqtt broker>,31883,vair,vair,vair123
DONE
ready >]
[crc0Dmqtt_msg_add "0"vair/temp:%TEMP%
mqtt_msg_add "0"vair/temp:%TEMP%
Mqtt line:vair/temp:%TEMP%]
[ready >]
[crc0Cmqtt_msg_add "1"vair/co2:%CO2%
mqtt_msg_add "1"vair/co2:%CO2%
Mqtt line:vair/co2:%CO2%]
[ready >]
[crc0Emqtt_msg_add "2"jochen/test:hallo vom vair
mqtt_msg_add "2"jochen/test:hallo vom vair
Mqtt line:jochen/test:hallo vom vair]
[ready >]
[crc40mqtt_msg_add "3"test:air is %CO2%
mqtt_msg_add "3"test:air is %CO2%
Mqtt line:test:air is %CO2%]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 1
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 2010]
[CustomHTTPDest::process]
[Calling HTTP: [http://192.168.178.47:8000/service?co2=2022]
Response Code: 404
CLOSED
Response Code: 404]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 1996]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 1995]
[ready >]
[quote]
As you can see, I've tried to set up HTTP requests too.
If entered the following "URLs to invoke":
[code]
http://192.168.178.47:8000/service?co2=%CO2%
http://192.168.178.47:8000/service?hum=%HUM%
http://192.168.178.47:8000/service?temp=%TEMP%
http://192.168.178.47:8000/service?pres=%PRES%
http://192.168.178.47:8000/service?pm25=%PM25%
http://192.168.178.47:8000/service?pm10=%PM10%
[code]
But the log output of the http server shows that only one URL is called:
[code]
C:\Users\user>python -m http.server
Serving HTTP on 0.0.0.0 port 8000 ...
192.168.178.233 - - [23/Jan/2017 22:34:05] code 404, message File not found
192.168.178.233 - - [23/Jan/2017 22:34:05] "GET /service?co2=1988 HTTP/1.1" 404 -
192.168.178.233 - - [23/Jan/2017 22:36:18] code 404, message File not found
192.168.178.233 - - [23/Jan/2017 22:36:18] "GET /service?co2=2004 HTTP/1.1" 404 -
192.168.178.233 - - [23/Jan/2017 22:36:58] code 404, message File not found
192.168.178.233 - - [23/Jan/2017 22:36:58] "GET /service?co2=1960 HTTP/1.1" 404 -
[code]
This is in accordance to the logfile which also only reports CO2 values. and MQTT strings for CO2, even though %TEMP% is configured too as a MQTT message:
[code]
vair/temp:%TEMP%
vair/co2:%CO2%
jochen/test:hallo vom vair
test:air is %CO2%
[code]
So there seem to be two problems:
1) MQTT client does not connect to a MQTT broker
2) Only CO2 sensor values show up in the log file and are send via HTTP GET
I hope you can help with this.
I have successfully established connections explicitly using both version 3.1 and version 3.1.1 with both a self written python script and the java based MQTT client MQTT.fx, (and multiple android apps). I can publish messages from any client and will see it immediately in the other clients. I also montior the log file of Mosquitto and can see the connections and message exchange there also. In summary, I'm pretty sure that my MQTT setup is correct and functional and that clients can connect using both protocol versions.
Unfortunately, still no luck with the vAir. I can see no connection attempt of the vAir in the Mosquitto log files.
Here is another log output:
[quote]
Searching for v.Air . . . . . . . . . . . . . . . . . . . Searching for v.Air Trying : COM7
[5]
. . [?HÌkèDXà?]
[ðb(?ðø]
[???ÁHeap at start: 37392]
. [vESPrino v1.16 build20170103]
vESPrino found on : COM7
[IP address: 192.168.178.233
Chip ID: D549B3
ready >
Waiting for auto-connect]
[Found i2c bus on SDA:SCL = D51 (14:5)]
[I2C Bus on SDA:SCA (14:5)
--- Setup PLUGINS ---
Neopixel
crc40prop_list
prop_list]
[---vESPrinoCFG_start---
temp.adjustment=-0.4
cubic.co2.missing=missing
ds18b20.port=missing
rf.CO2=136
rf.PM25=137
rf.PM10=138
rf.TEMP=140
rf.HUM=141
rf.PRES=142
rf.GEN=143
send.interval=120
wifi.staticip=192.168.178.233
wifi.gateway=192.168.178.1
wifi.subnet=255.255.255.0
wifi.dns1=192.168.178.1
wifi.ssid=[hidden]
wifi.p1=[hidden]
mqtt.server=<hostname of my public mqtt broker>
mqtt.port=31883
mqtt.client=vair
mqtt.user=vair
mqtt.pass=vair123
mqtt_msg_arr0=vair/temp:%TEMP%
mqtt_msg_arr1=test/test:hello from vair
mqtt_msg_arr2=test:air is %CO2%
custom_url_arr0=http://192.168.178.47:8000/service?co2=%CO2%
custom_url_arr1=http://192.168.178.47:8000/service?hum=%HUM%
custom_url_arr2=http://192.168.178.47:8000/service?temp=%TEMP%
custom_url_arr3=http://192.168.178.47:8000/service?pres=%PRES%
custom_url_arr4=http://192.168.178.47:8000/service?pm25=%PM25%
custom_url_arr5=http://192.168.178.47:8000/service?pm10=%PM10%]
[---vESPrinoCFG_end---
ready >
DweetIO]
[crc61nop 0
nop 0
ready >
WebServer]
[WebSocketServer]
[PowerManager
GPIO]
[Servo]
[Annemometer]
[TimerManager
--- Setup SENSORS ---
CO2
TEST]
[SI7021
Found SI7021 - Temperature/Humidity Sensor]
[BME280]
[BMP085]
[PM2005
Found PM2005 - Dust / Particle Sensor]
[50,16,7,4,1,68,0,7C,
CDM7160
Found CDM7160 CO2 Sensor
DS18B20
TSL2561]
[BH1750]
[APDS9960]
[--- Setup DESTINATIONS ---
CustomHTTP
SerialDump
MQTT
RFX10]
[Blynk]
[Heap At setup end: 34520]
[------State changed to: 3
IP address: 192.168.178.233 in 8094 ms
GOT IP
sendNowCond]
[--- DestHanlder: sendValue --- 1
Found SI7021 - Temperature/Humidity Sensor]
[Decimal Separator is: .]
[Raw CO2: 1814]
[CustomHTTPDest::process]
[Calling HTTP: [http://192.168.178.47:8000/service?co2=1814]]
[Response Code: 404
CLOSED
Response Code: 404]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 1979]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 2053]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 2049]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 1
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 2028]
[CustomHTTPDest::process]
[Calling HTTP: [http://192.168.178.47:8000/service?co2=2024]
Response Code: 404
CLOSED
Response Code: 404]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 2016]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 2014]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 2012]
[ready >]
[crc71nop
ready >]
[crc00mqtt_msg_clean
mqtt_msg_clean]
[ready >]
[crc01mqtt_setup "<hostname of my public mqtt broker>","31883","vair","vair","vair123"
mqtt_setup "<hostname of my public mqtt broker>","31883","vair","vair","vair123"]
[MQTT Configuration Stored
<hostname of my public mqtt broker>,31883,vair,vair,vair123
DONE
ready >]
[crc0Dmqtt_msg_add "0"vair/temp:%TEMP%
mqtt_msg_add "0"vair/temp:%TEMP%
Mqtt line:vair/temp:%TEMP%]
[ready >]
[crc0Cmqtt_msg_add "1"vair/co2:%CO2%
mqtt_msg_add "1"vair/co2:%CO2%
Mqtt line:vair/co2:%CO2%]
[ready >]
[crc0Emqtt_msg_add "2"jochen/test:hallo vom vair
mqtt_msg_add "2"jochen/test:hallo vom vair
Mqtt line:jochen/test:hallo vom vair]
[ready >]
[crc40mqtt_msg_add "3"test:air is %CO2%
mqtt_msg_add "3"test:air is %CO2%
Mqtt line:test:air is %CO2%]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 1
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 2010]
[CustomHTTPDest::process]
[Calling HTTP: [http://192.168.178.47:8000/service?co2=2022]
Response Code: 404
CLOSED
Response Code: 404]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 1996]
[ready >]
[sendNowCond]
[--- DestHanlder: sendValue --- 0
Found SI7021 - Temperature/Humidity Sensor]
[Raw CO2: 1995]
[ready >]
[quote]
As you can see, I've tried to set up HTTP requests too.
If entered the following "URLs to invoke":
[code]
http://192.168.178.47:8000/service?co2=%CO2%
http://192.168.178.47:8000/service?hum=%HUM%
http://192.168.178.47:8000/service?temp=%TEMP%
http://192.168.178.47:8000/service?pres=%PRES%
http://192.168.178.47:8000/service?pm25=%PM25%
http://192.168.178.47:8000/service?pm10=%PM10%
[code]
But the log output of the http server shows that only one URL is called:
[code]
C:\Users\user>python -m http.server
Serving HTTP on 0.0.0.0 port 8000 ...
192.168.178.233 - - [23/Jan/2017 22:34:05] code 404, message File not found
192.168.178.233 - - [23/Jan/2017 22:34:05] "GET /service?co2=1988 HTTP/1.1" 404 -
192.168.178.233 - - [23/Jan/2017 22:36:18] code 404, message File not found
192.168.178.233 - - [23/Jan/2017 22:36:18] "GET /service?co2=2004 HTTP/1.1" 404 -
192.168.178.233 - - [23/Jan/2017 22:36:58] code 404, message File not found
192.168.178.233 - - [23/Jan/2017 22:36:58] "GET /service?co2=1960 HTTP/1.1" 404 -
[code]
This is in accordance to the logfile which also only reports CO2 values. and MQTT strings for CO2, even though %TEMP% is configured too as a MQTT message:
[code]
vair/temp:%TEMP%
vair/co2:%CO2%
jochen/test:hallo vom vair
test:air is %CO2%
[code]
So there seem to be two problems:
1) MQTT client does not connect to a MQTT broker
2) Only CO2 sensor values show up in the log file and are send via HTTP GET
I hope you can help with this.