Git Product home page Git Product logo

kike-canaries / canairio_firmware Goto Github PK

View Code? Open in Web Editor NEW
100.0 7.0 23.0 25.09 MB

CanAirIO is a citizen science initiative. We are developing a mobile application that is able to set a PM2.5 or CO2 sensors, and other related sensors, as a fixed station using WiFi or mobile station with an smartphone by using a Bluetooth connection.

Home Page: https://canair.io

License: GNU General Public License v3.0

C++ 84.39% C 11.40% Shell 2.98% Dockerfile 0.19% Python 1.04%
firmware esp32 android arduino airquality covid-19 canairio-firmware platformio

canairio_firmware's Issues

save i2c sensor that was be detected

Maybe we need save i2c sensor that was be detected and show it maybe in the device info GUI for possible feedback or user support. Main part of this feature should be in the CanAirIO Sensorslib

Panasonic return zero and non response with soft reset

Description

In the last version rev872 dev, Panasonic sensor after some time (many hours for example), it be only returning zero, and the output is clean:

17:43:11.412 > -->[SLIB] GCJA5 read > done!
17:43:11.442 > -->[SLIB] PM1:000 PM25:000 PM10:000 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:35.653255% T:20.121174°C
17:43:11.488 > -->[MQTT] Anaire sensor payload published. (size: 201)
17:43:12.142 > -->[IFDB] write done.
17:43:16.424 > -->[SLIB] GCJA5 read > done!
17:43:16.455 > -->[SLIB] PM1:000 PM25:000 PM10:000 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:35.653255% T:20.121174°C
17:43:17.181 > -->[MQTT] Hass sensor payload published. (size: 176)

If you try to reenable sending a soft reboot from the Android app, the sensor will not detected anymore, only with a hard reset.

Device config

board: please choose any TTGO T7, TTGO T-Display, ESP32DevKit, WemosOLED, etc
firmware version: rev872 dev
sensors: Panasonic + BME680
TFT: yes
Power: USB

Additional context

The Panasonic device has more the two years working

MQTT Hass status subscription

Summary.

When the main Hass server go to off or the MQTT broker, maybe we should have a Hass status subscription for try to improve speed after this kind of trouble.

core panic on OLED version TTGO-T7

Description

Sometimes the OLED version have a crash.

To reproduce

After some minutes, with all clouds enable.

Debug output

Stack trace:

0x400902f0:0x3fffc170 0x4009056d:0x3fffc190 0x40087279:0x3fffc1b0 0x400873a5:0x3fffc1e0 0x4010d273:0x3fffc200 0x40105fd1:0x3fffc4c0 0x40105f59:0x3fffc510 0x40094edd:0x3fffc540 0x400823ca:0x3fffc560 0x40087171:0x3fffc580 0x4000bec7:0x3fffc5a0 0x401e14c7:0x3fffc5c0 0x401e1d55:0x3fffc5e0 0x401d9729:0x3fffc600 0x401d977d:0x3fffc620 0x401d9895:0x3fffc640 0x401df1fe:0x3fffc660 0x40213981:0x3fffc680 0x401dfbf9:0x3fffc6a0 0x401dfcf2:0x3fffc6c0 0x402139c6:0x3fffc6e0 0x401dfe29:0x3fffc700 0x40213a21:0x3fffc720 0x401df3e1:0x3fffc750 0x401df441:0x3fffc770 0x400e2cc9:0x3fffc790 0x400915e2:0x3fffc7b0

Exception decoder

/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:156
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:171
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/locks.c:143
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/locks.c:171
/Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/vfprintf.c:860 (discriminator 2)
/Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/fiprintf.c:50
/Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:59 (discriminator 8)
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c:218 (discriminator 1)
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c:268
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/syscalls.c:42
??:0
/mnt/opt/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-i2c.c:1612
/mnt/opt/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-i2c.c:1635
/mnt/opt/platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.cpp:144
/mnt/opt/platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.cpp:169
/mnt/opt/platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.cpp:327
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/U8g2/src/U8x8lib.cpp:1339
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/U8g2/src/clib/u8x8_byte.c:61
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/U8g2/src/clib/u8x8_cad.c:433
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/U8g2/src/clib/u8x8_cad.c:539
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/U8g2/src/clib/u8x8_cad.c:110
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/U8g2/src/clib/u8x8_d_ssd1306_64x48.c:159
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/U8g2/src/clib/u8x8_display.c:89
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/U8g2/src/clib/u8g2_buffer.c:63 (discriminator 1)
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/U8g2/src/clib/u8g2_buffer.c:119
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/U8g2/src/U8g2lib.h:180 (discriminator 1)
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:143

Device config

board: TTGO_T7
firmware version: rev863
sensors: Sensirion SPS30 I2C, DHT22
OLED: yes
Power: USB

Extract battery value from each GUI type

Summary.

For each kind of board/display we have a battery implementation. Maybe we need join that to unified interface or callback, for try to have the battery level for whole device

Split wiki guides in md files

Summary.
Separate the current guide on md files by section, for example App usage section on separated in a specific md file

Flashing ESP32DEV after flashing with wrong board

Steps to Reproduce

I flashed the device with the wrong board firmware TTGO_T7 instead of ESP32DevKit (via platform io on MAC)
I have tried to reflash on top but it does not boot! Do I need to factory reset first if so how?

Logs

canairio_firmware % pio run -e ESP32DEVKIT --target upload

Processing ESP32DEVKIT (platform: espressif32; board: lolin32; framework: arduino)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/lolin32.html
PLATFORM: Espressif 32 (3.3.1) > WEMOS LOLIN32
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:

  • framework-arduinoespressif32 3.10006.210326 (1.0.6)
  • tool-esptoolpy 1.30100.210531 (3.1.0)
  • tool-mkspiffs 2.230.0 (2.30)
  • toolchain-xtensa32 2.50200.97 (5.2.0)
    LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 61 compatible libraries
    Scanning dependencies...
    Dependency Graph
    |-- 6.18.3
    |-- 3.8.0
    | |-- 1.2
    | | |-- 1.0
    | | |-- 1.0
    | | | |-- 1.0
    |-- 0.1.4+sha.d1bbc3f
    | |-- 1.0
    | | |-- 1.0
    | |-- 6.18.3
    | |-- 1.2
    | | |-- 1.0
    | | |-- 1.0
    | | | |-- 1.0
    | |-- 1.0
    | |-- 1.0
    |-- 1.1.4
    |-- 1.1.4
    | |-- 1.1.4
    | |-- 1.0.1
    |-- 2.2.0
    | |-- 1.8.3
    | | |-- 1.0.1
    | | |-- 1.0
    | |-- 1.0.1
    | |-- 1.0
    | |-- 1.1.4
    |-- 2.0.1
    | |-- 1.8.3
    | | |-- 1.0.1
    | | |-- 1.0
    | |-- 1.0.1
    | |-- 1.0
    | |-- 1.1.4
    |-- 1.8.3
    | |-- 1.0.1
    | |-- 1.0
    |-- 2.0.0
    | |-- 1.8.3
    | | |-- 1.0.1
    | | |-- 1.0
    | |-- 1.0.1
    |-- 1.1.0
    | |-- 1.0.1
    |-- <DHT_nonblocking> 1.0.0+sha.999fd0d
    |-- 1.4.11
    | |-- 1.0.1
    |-- 1.5.3
    |-- 1.0.13
    | |-- 1.0.1
    |-- 1.0.0+sha.abada3a
    |-- 1.0.1+sha.f261968
    | |-- 1.0.1
    |-- 0.0.1+sha.a2b8c30
    |-- 0.2.8+sha.ae7ec79
    | |-- 1.1.4
    | |-- 1.1.4
    | | |-- 1.1.4
    | | |-- 1.0.1
    | |-- 1.4.11
    | | |-- 1.0.1
    | |-- 2.2.0
    | | |-- 1.8.3
    | | | |-- 1.0.1
    | | | |-- 1.0
    | | |-- 1.0.1
    | | |-- 1.0
    | | |-- 1.1.4
    | |-- 1.1.0
    | | |-- 1.0.1
    | |-- 1.8.3
    | | |-- 1.0.1
    | | |-- 1.0
    | |-- 2.0.0
    | | |-- 1.8.3
    | | | |-- 1.0.1
    | | | |-- 1.0
    | | |-- 1.0.1
    | |-- <DHT_nonblocking> 1.0.0+sha.999fd0d
    | |-- 1.5.3
    | |-- 1.0.13
    | | |-- 1.0.1
    | |-- 2.0.1
    | | |-- 1.8.3
    | | | |-- 1.0.1
    | | | |-- 1.0
    | | |-- 1.0.1
    | | |-- 1.0
    | | |-- 1.1.4
    | |-- 1.0.1+sha.f261968
    | | |-- 1.0.1
    | |-- 1.0.0+sha.abada3a
    | |-- 0.0.1+sha.a2b8c30
    |-- 2.28.8
    | |-- 1.0
    | |-- 1.0.1
    |--
    | |-- 6.18.3
    | |-- 1.0
    |--
    | |--
    | | |-- 2.28.8
    | | | |-- 1.0
    | | | |-- 1.0.1
    |--
    |-- 1.0.1
    |--
    | |-- 1.0
    | | |-- 1.0
    | | |-- 1.0
    | | |-- 1.0
    | | | |-- 1.0
    | |-- 1.0
    | | |-- 1.0
    | |-- 1.0
    | |-- 0.1.4+sha.d1bbc3f
    | | |-- 1.0
    | | | |-- 1.0
    | | |-- 6.18.3
    | | |-- 1.2
    | | | |-- 1.0
    | | | |-- 1.0
    | | | | |-- 1.0
    | | |-- 1.0
    | | |-- 1.0
    |-- 1.0
    Building in release mode
    Retrieving maximum program size .pio/build/ESP32DEVKIT/firmware.elf
    Checking size .pio/build/ESP32DEVKIT/firmware.elf
    Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
    RAM: [== ] 18.7% (used 61320 bytes from 327680 bytes)
    Flash: [========= ] 88.8% (used 1746480 bytes from 1966080 bytes)
    Configuring upload protocol...
    AVAILABLE: esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
    CURRENT: upload_protocol = esptool
    Looking for upload port...
    Auto-detected: /dev/cu.usbserial-0001
    Uploading .pio/build/ESP32DEVKIT/firmware.bin
    esptool.py v3.1
    Serial port /dev/cu.usbserial-0001
    Connecting....
    Chip is ESP32-D0WDQ6 (revision 1)
    Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
    Crystal is 40MHz
    MAC: 24:0a:c4:ef:59:c8
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 1500000
    Changed.
    Configuring flash size...
    Auto-detected Flash size: 4MB
    Flash will be erased from 0x00001000 to 0x00005fff...
    Flash will be erased from 0x00008000 to 0x00008fff...
    Flash will be erased from 0x0000e000 to 0x0000ffff...
    Flash will be erased from 0x00010000 to 0x001bafff...
    Compressed 17104 bytes to 11191...
    Writing at 0x00001000... (100 %)
    Wrote 17104 bytes (11191 compressed) at 0x00001000 in 0.4 seconds (effective 315.6 kbit/s)...
    Hash of data verified.
    Compressed 3072 bytes to 129...
    Writing at 0x00008000... (100 %)
    Wrote 3072 bytes (129 compressed) at 0x00008000 in 0.1 seconds (effective 281.6 kbit/s)...
    Hash of data verified.
    Compressed 8192 bytes to 47...
    Writing at 0x0000e000... (100 %)
    Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 440.1 kbit/s)...
    Hash of data verified.
    Compressed 1746592 bytes to 1041615...
    Writing at 0x00010000... (1 %)
    Writing at 0x0001ad29... (3 %)
    Writing at 0x000250bc... (4 %)
    Writing at 0x00031a87... (6 %)
    Writing at 0x00037486... (7 %)
    Writing at 0x000425b9... (9 %)
    Writing at 0x0005a6bd... (10 %)
    Writing at 0x000681cb... (12 %)
    Writing at 0x0006deba... (14 %)
    Writing at 0x00073c15... (15 %)
    Writing at 0x0007a009... (17 %)
    Writing at 0x0007fd46... (18 %)
    Writing at 0x00085c73... (20 %)
    Writing at 0x0008aeb3... (21 %)
    Writing at 0x000901b4... (23 %)
    Writing at 0x0009564d... (25 %)
    Writing at 0x0009abfe... (26 %)
    Writing at 0x0009ffaf... (28 %)
    Writing at 0x000a76f8... (29 %)
    Writing at 0x000aeed7... (31 %)
    Writing at 0x000b544d... (32 %)
    Writing at 0x000bab30... (34 %)
    Writing at 0x000c0b13... (35 %)
    Writing at 0x000c762f... (37 %)
    Writing at 0x000cda3c... (39 %)
    Writing at 0x000d36e5... (40 %)
    Writing at 0x000d9440... (42 %)
    Writing at 0x000e0761... (43 %)
    Writing at 0x000e67ed... (45 %)
    Writing at 0x000ec765... (46 %)
    Writing at 0x000f26b2... (48 %)
    Writing at 0x000f859c... (50 %)
    Writing at 0x000feaa1... (51 %)
    Writing at 0x00104d3a... (53 %)
    Writing at 0x0010a7f9... (54 %)
    Writing at 0x0011055a... (56 %)
    Writing at 0x001163a9... (57 %)
    Writing at 0x0011ca04... (59 %)
    Writing at 0x0012279a... (60 %)
    Writing at 0x00128475... (62 %)
    Writing at 0x0012d7ed... (64 %)
    Writing at 0x0013313d... (65 %)
    Writing at 0x00138f66... (67 %)
    Writing at 0x0013eacc... (68 %)
    Writing at 0x00144e92... (70 %)
    Writing at 0x0014a9e1... (71 %)
    Writing at 0x001508fc... (73 %)
    Writing at 0x001569c6... (75 %)
    Writing at 0x0015c753... (76 %)
    Writing at 0x00162bfa... (78 %)
    Writing at 0x00168d7e... (79 %)
    Writing at 0x0016e74d... (81 %)
    Writing at 0x00174607... (82 %)
    Writing at 0x0017a188... (84 %)
    Writing at 0x0017ff17... (85 %)
    Writing at 0x001859b2... (87 %)
    Writing at 0x0018b656... (89 %)
    Writing at 0x0019172a... (90 %)
    Writing at 0x001982a1... (92 %)
    Writing at 0x0019e363... (93 %)
    Writing at 0x001a4782... (95 %)
    Writing at 0x001aad02... (96 %)
    Writing at 0x001b1179... (98 %)
    Writing at 0x001b6c68... (100 %)
    Wrote 1746592 bytes (1041615 compressed) at 0x00010000 in 15.0 seconds (effective 929.9 kbit/s)...
    Hash of data verified.

Leaving...
Hard resetting via RTS pin...
========================================================================================== [SUCCESS] Took 26.98 seconds ==========================================================================================

Environment Status Duration


ESP32DEVKIT SUCCESS 00:00:26.981

OTA over WAN sometime don't detect new release

The device run many hours without know or execute the OTA update, only with a manual reboot it did.

Device config

If apply, please write the next information, you can have it on the settings section Device info on the CanAirIO app.

board: TTGO T-Display
firmware version: rev840
mobile app version: rev5xx
sensors: 
OLED: no
TFT: yes
Power: Battery/USB

To Reproduce

Steps to reproduce the behavior:

Additional context

Any context to try to help us if apply

Heltec wifi kit 32 problem between oled and sensirion uart sensor

Hi, I am encountering a problem with the Heltec wifi kit 32 board, when I select the sensirion sps30 pm sensor, the oled stops working. With the mh-z19 this does not happen. I have select pin 17 and 18 for uart2, because the oled use pin 16 for rst.
I think the sensirion library changes pin 18 to pin 16 and enter in conflicts with the oled.

Get Repeat Measurements on an SPS30 after Updating the Firmware

Steps to reproduce the behavior:

board: DevKit
firmare: rev822
sensors: SPS30 UART, SHT31
Battery powered: NO
Settings: UART
stime: 60
Debug: ON
WiFi: configured and working.

Log

Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8

== CanAirIO Setup ==

-->[CONF] debug is enable.
-->[OGUI] display config ready.
-->[INFO] ESP32MAC: 08:3A:F2:B9:29:CE
-->[INFO] Revision: r822
-->[INFO] Firmware: 0.4.2
-->[INFO] Flavor : ESP32DEVKIT
-->[INFO] Target : dev
-->[INFO] Detecting sensors..
-->[INFO] PM sensor configured: 2
-->[SLIB] new sample time: 1
-->[SLIB] debug is enable.
-->[SLIB] temperature offset: 0.00
-->[SLIB] altitude offset: 0.00
-->[SLIB] forced only i2c sensors: 0
-->[SLIB] UART detecting SPS30 PM sensor..
-->[SLIB] UART SPS30 starting sensor..
Sending: 0x7E 0x00 0xD1 0x00 0x2E 0x7E
Received: 0x7E 0x00 0xD1 0x00 0x07 0x02 0x01 0x00 0x07 0x00 0x02 0x00 0x1B 0x7E length: 13

Sending: 0x7E 0x00 0xD0 0x01 0x03 0x2B 0x7E
Received: 0x7E 0x00 0xD0 0x00 0x11 0x43 0x39 0x41 0x41 0x35 0x42 0x42 0x46 0x46 0x35 0x41 0x44 0x35 0x37 0x37 0x46 0x00 0x38 0x7E length: 23

-->[SLIB] SPS30 Serial number : C9AA5BBFF5AD577F
Sending: 0x7E 0x00 0xD0 0x01 0x00 0x2E 0x7E
Received: 0x7E 0x00 0xD0 0x00 0x09 0x30 0x30 0x30 0x38 0x30 0x30 0x30 0x30 0x00 0x9E 0x7E length: 15

-->[SLIB] SPS30 product name : 00080000
Sending: 0x7E 0x00 0xD1 0x00 0x2E 0x7E
Received: 0x7E 0x00 0xD1 0x00 0x07 0x02 0x01 0x00 0x07 0x00 0x02 0x00 0x1B 0x7E length: 13

-->[SLIB] SPS30 firmware level: 2.1
-->[SLIB] SPS30 Hardware level: 7
-->[SLIB] SPS30 SHDLC protocol: 2.0
-->[SLIB] SPS30 Library level : 1.4
Sending: 0x7E 0x00 0xD3 0x00 0x2C 0x7E
Received: 0x7E 0x00 0xD3 0x00 0x00 0x2C 0x7E length: 6

-->[SLIB] SPS30 Detected SPS30 via UART.
Sending: 0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x00 0x00 0xFF 0x7E length: 6

-->[SLIB] SPS30 Measurement OK
-->[SLIB] UART detected SPS30 sensor :)
-->[SLIB] UART detected: SENSIRION
-->[SLIB] trying to load I2C sensors..
-->[SLIB] GCJA5 starting PANASONIC GCJA5 sensor..
-->[SLIB] AM2320 starting AM2320 sensor..
-->[SLIB] I2C detected AM2320 sensor :)
-->[SLIB] SHT31 starting SHT31 sensor..
-->[SLIB] I2C detected SHT31 sensor :)
-->[SLIB] BME280 starting BME280 sensor..
-->[SLIB] BME680 starting BME680 sensor..
-->[SLIB] AHT10 starting AHT10 sensor..
-->[SLIB] SCD30 starting CO2 SCD30 sensor..
-->[INFO] PM/CO2 sensor detected: SENSIRION
-->[WDOG] watchdog config to check each 120 seconds.
-->[WIFI] connecting to VirginWiFi................... done.
-->[WIFI] IP: 192.168.1.100
-->[WIFI] publish interval: 120 sec.
-->[INFO] OTA on: CanAirIO9CE.local with passw: CanAirIO
-->[FOTA] not need update
-->[CONF] response: {
"dname": "",
"stime": 60,
"stype": 2,
"wenb": true,
"ssid": "VirginWiFi",
"ienb": true,
"ifxdb": "canairio",
"ifxip": "influxdb.canair.io",
"ifxpt": 8086,
"geo": "d2g633c",
"denb": true,
"i2conly": false,
"toffset": 0,
"altoffset": 0,
"lskey": "",
"wmac": 52265,
"wsta": true,
"vrev": 822,
"vflv": "ESP32DEVKIT",
"vtag": "dev",
"vmac": "08:3A:F2:B9:29:CE"
}
-->[BTLE] GATT server ready. (Waiting for client)
-->[INFO] InfluxDb API: 1
-->[IFDB] config: [email protected]:8086
-->[IFDB] connected to http://influxdb.canair.io:8086
-->[OGUI] starting task loop
Sending: 0x7E 0x00 0x03 0x00 0xFC 0x7E
Received: 0x7E 0x00 0x03 0x00 0x28 0x41 0x3F 0xFD 0x24 0x41 0x4B 0x05 0x57 0x41 0x4B 0x05 0x60 0x41 0x4B 0x05 0x4D 0x42 0xA2 0xE0 0xDD 0x42 0xBE 0x9A 0x65 0x42 0xBF 0x87 0x78 0x42 0xBF 0x9B 0x21 0x42 0xBF 0xA4 0xD3 0x3E 0xFD 0x7B 0x14 0xDD 0x7E length: 46

-->[SLIB] SPS30 read > done!
-->[SLIB] able data from UART sensors: 1
-->[SLIB] SHT31 read > done!
-->[SLIB] PM1:012 PM25:013 PM10:013 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:63.669998% T:16.469999°C
-->[SLIB] new sample time: 60
-->[BTLE] device client is connected.
Sending: 0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] able data from UART sensors: 0
-->[SLIB] SHT31 read > done!
-->[SLIB] PM1:012 PM25:013 PM10:013 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:63.740002% T:16.170000°C
-->[IFDB] write done.
Sending: 0x7E 0x00 0x00 0x02 0x01 0x03 0xF9 0x7E
Received: 0x7E 0x00 0x00 0x43 0x00 0xBC 0x7E length: 6

43 : state error
instruction failed
-->[SLIB] able data from UART sensors: 0
-->[SLIB] SHT31 read > done!
-->[SLIB] PM1:012 PM25:013 PM10:013 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:64.110001% T:16.020000°C

As the sampling time increases, faults begin to occur

Thanks for help up and contribute to CanAirIO project. Please edit and fill this template.

Description

When I have the sensors in small sample rates, 5 to 30 seconds there are no disconnection failures or measurements that stay in a single value,but when I go up to values of 60 or 180 seconds, disconnection faults begin to appear or measurements appear at the same value

Debug output

If apply, please enable debugging from the CanAirIO app on settings->mobile station->enable debug mode and paste the output.

Device config

board:  ESP32DevKit and TTGO_T7
firmware version: rev827 (prod)
mobile app version: rev5xx
sensors: SPS30 UART
OLED: no
TFT: no
Power: phone charger

To Reproduce

increase the sample rate value

Additional context

http://influxdb.canair.io:8000/d/GU68_kcMz/banco-prueba-arttesano?orgId=1&from=1632343527895&to=1632386727895&refresh=1m&viewPanel=19

Problems detecting SP30 on TTGO_T7

Steps to Reproduce

Please tell us exactly how to reproduce the problem you are running into.

  1. Uploading Rev781 on TTGO_T7 an SP30 sensor
  2. Intento configurar el SP30 desde la APP pero no reconoce el sensor
  3. ...

Logs

-->[CONFIG] reboot..
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8

== CanAirIO Setup ==

-->[OLED] display config ready.
-->[INFO] ESP32MAC: 98:F4:AB:6D:4C:52
-->[INFO] Revision: r781
-->[INFO] Firmware: 0.3.1
-->[INFO] Flavor : TTGO_T7
-->[INFO] Target : dev
-->[INFO] Detecting sensors..
-->[INFO] PM sensor configured: 2
-->[E][PMSENSOR] detection failed!
-->[INFO] Detection sensors FAIL!
-->[WDOG] watchdog config to check each 30 seconds.
-->[BTLE] GATT server ready. (Waiting for client)
-->[INFO] InfluxDb API: 0
-->[INFO] CanAirIO API: 0
-->[BTLE] device client is connected.

[CORE PANIC] after two hours on T7+SPS30+DHT22 it reboot

After two hours on T7+SPS30+DHT22 it reboot

11:55:02.730 > Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
11:55:02.735 > Core 0 register dump:
11:55:02.738 > PC      : 0x40094153  PS      : 0x00060433  A0      : 0x80093627  A1      : 0x3ffbd130  
11:55:02.747 > A2      : 0x3fff7c18  A3      : 0x3ffbd2b4  A4      : 0x00000001  A5      : 0x00000001  
11:55:02.752 > A6      : 0x00060423  A7      : 0x00000000  A8      : 0x00000000  A9      : 0x3ffbab84  
11:55:02.760 > A10     : 0x3ffbab84  A11     : 0x00000000  A12     : 0x00060a20  A13     : 0x00000001  
11:55:02.769 > A14     : 0x00060a23  A15     : 0x00000000  SAR     : 0x00000000  EXCCAUSE: 0x0000001c  
11:55:02.777 > EXCVADDR: 0x00000004  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0x00000000  
11:55:02.785 > 
11:55:02.785 > ELF file SHA256: 0000000000000000
11:55:02.788 > 
11:55:02.788 > Backtrace: 0x40094153:0x3ffbd130 0x40093624:0x3ffbd150 0x40091d4b:0x3ffbd170 0x40091dd9:0x3ffbd190 0x40093c96:0x3ffbd1b0 0x40093d77:0x3ffbd1f0 0x400915e2:0x3ffbd220
11:55:02.802 > 
11:55:02.802 > Rebooting...

To Reproduce

Steps to reproduce the behavior:

  1. Config:
  • board: TTGO T7
  • firmare: rev823
  • sensors: SPS30 UART, DHT22
  • OLED: yes
  • Battery powered: NO
  1. Settings:
  • i2c force: off
  • stime: 5seg
  • BLE client: disconnected
  • Debug: OFF
  • WiFi: configured and working.
  1. After two hours the PANIC success

Firmware upload via OTG

We have right now a solution with CanAirIO loader, but the main goal is integrate it to CanAirIO App. For that we have the next alternatives:

  • Provisional workaround using ArduinoDroid IDE.
  • Migrate ESPTool to Android
  • Making reverse engineering over Android apps that have it.

OLED version CORRUPT HEAP: multi_heap.c:325 detected at 0x3ffdd4d8

Description

Sometimes the OLED version fails. It is possible a memory conflict with GUI (OLED) RTOS thread. Maybe it is relationed with the issue #158

Debug output

Basic output

19:29:38.614 > -->[SLIB] PM1:009 PM25:010 PM10:010 CO2:0000 CO2humi:0.000000% CO2temp:0.000000°C H:55.700001% T:20.599998°C
19:29:43.548 > I2C Sending:  0x02 0x02
19:29:43.665 > I2C Received: 0x41 0x12 length: 2
19:29:43.668 > 
19:29:44.667 > I2C Sending:  0x02 0x02
19:29:44.770 > I2C Received: 0x41 0x11 length: 2
19:29:44.772 > 
19:29:45.771 > I2C Sending:  0x02 0x02
19:29:45.771 > CORRUPT HEAP: multi_heap.c:325 detected at 0x3ffdd4d8
19:29:45.776 > abort() was called at PC 0x4009482b on core 1
19:29:45.779 > 
19:29:45.782 > ELF file SHA256: 0000000000000000
19:29:45.785 > 
19:29:45.785 > Backtrace: 0x400902f0:0x3ffcf130 0x4009056d:0x3ffcf150 0x4009482b:0x3ffcf170 0x40094f8c:0x3ffcf190 0x40082455:0x3ffcf1b0 0x400824a9:0x3ffcf1d0 0x40087181:0x3ffcf1f0 0x4000bedd:0x3ffcf210 0x401e129d:0x3ffcf230 0x401e1303:0x3ffcf270 0x401e1d14:0x3ffcf2a0 0x401d9729:0x3ffcf2c0 0x401d977d:0x3ffcf2e0 0x401d9895:0x3ffcf300 0x401dcb4d:0x3ffcf320 0x401dcdea:0x3ffcf340 0x401dcfa1:0x3ffcf360 0x401dcfe7:0x3ffcf380 0x400db805:0x3ffcf3a0 0x400dc99e:0x3ffcf3d0 0x400dcc82:0x3ffcf3f0 0x400d620a:0x3ffcf420 0x400eb07c:0x3ffcf440 0x400915e2:0x3ffcf460
19:29:45.832 > 
19:29:45.832 > Rebooting...

Decoded exception:

/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:156
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:171
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_platform.h:54
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c:295
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c:307
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c:163
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/syscalls.c:47
??:0
/mnt/opt/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-i2c.c:1065
/mnt/opt/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-i2c.c:1089
/mnt/opt/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-i2c.c:1625
/mnt/opt/platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.cpp:144
/mnt/opt/platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.cpp:169
/mnt/opt/platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.cpp:327
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/sps30/src/sps30.cpp:1539
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/sps30/src/sps30.cpp:1557
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/sps30/src/sps30.cpp:1661
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/sps30/src/sps30.cpp:927
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/CanAirIO Air Quality Sensors Library/src/Sensors.cpp:389
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/CanAirIO Air Quality Sensors Library/src/Sensors.cpp:470
/home/avp/pio/canairio_firmware/.pio/libdeps/TTGO_T7/CanAirIO Air Quality Sensors Library/src/Sensors.cpp:19
/home/avp/pio/canairio_firmware/src/main.cpp:204
/mnt/opt/platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:23
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:143

Device config

board: please choose any TTGO T7
firmware version: rev863
sensors: DHT 22 Sensirion i2c
OLED: yes
Power: USB

Change into the main variables on TFT version

Summary.

In the first case of use for example en CO2 sensors, the PAX counter in background is ON but only with the mobile app we can see the PAX data. Maybe is important toggle into the time series on the screen

Set Wifi credentials without Android?

Yesterday I wanted to give CanAirIo a try, but got stuck at the point where I wanted it to connect to my Wifi. I have no Android phone and could not find a way to enter my Wifi credentials any other way?!
Have I been just too blind to see it or is there really no other way? Is the rest of CanAirIo maybe also useless without the Android App and I can scrap further attempts altogether?

Worldmap Panel for CanAirIO using the database in InfluxDB

status: help wanted
Failed to map Grafana with the current database hosted on the InfluxDB.
In our case we have the nex format
a1e184bb-0ad4-4ee0-8dce-a1bf744cbc64
and Grafana can't seem to read the complete table.
Anyone know how to get the Worldmap plugin to read the database formatted like this?

Be able to see when SSID and Password are edited

When configuring the SSID and the Password it is important to be able to see if the data is being written correctly, the way it is does not show if an error is made when connecting a sensor.

CanAirIO with the Panasonic sensor freeze above 1000ug/m3

The new support for the Panasonic have an issue:
This sensor have a broader range: 0μg/m3 – 2,000μg/m3 (UART).
When the measurement is over 999 the sensor don´t show anything, looks like is been freezed.
When returns to a lower value than 1000 is ok.

Sample Time 2x

When you put the Sample Time in the app in x value, the publication time is 2x and is confused. Is better that the Sample Time in the app was the same that the ESP32 used for publish

Panasonic SPS not recognised

I have just flashed my ESP32DevKit | ESP32DevKit, NodeMCU V3, ** | OLED 128x64 | with HacksterIO
using the platform IO method the board boots but one line says detected sensor : FAILED!

I have checked the connections and pin numbers

TTGO TDisplay - Plantower/UART sensor not detected

I've been trying the latest firmware release v793 for the TTGO-TDisplay but with a Plantower PMS5003 sensor. The sensor is not being detected on the RX/TX pins 12/13 (as per the pins in the sensor lib). Everything else appears to work great.

I'm guessing this is something in the build, like missing the correct UART pins for TTGO-TD?

I also attempted to build the ttgo-tdisplay branch and set the RX/TX pins as build settings, and in this build the sensor works OK, but it appears to be pretty old and incomplete (very rough UI).

Is it right to assume the latest TTGO-TDisplay code hasn't been pushed to github or merged to main yet?

(TFT version) WekeUp via GPIO35 (button R) don't works

The next code, that sometime was works fine now don't works:

//Disable timer wake, because here use external IO port to wake up
esp_sleep_disable_wakeup_source(ESP_SLEEP_WAKEUP_TIMER);
esp_sleep_enable_ext0_wakeup(GPIO_NUM_35, 0);  // <== Don't works help wanted!
esp_deep_sleep_disable_rom_logging();
esp_deep_sleep_start();

This code on the TTGO-TDisplay board for go to deep-sleep and then wakeup via interrupt on GPIO button 35, don't works anymore.

It's possible that it is relationed with the ADC, because we are using it for battery measure, and some users reporting a similar issue:

Xinyuan-LilyGO/TTGO-T-Display#65

Debug output

After go to deep sleep the serial output show:

17:45:31.262 > E (19699) sleep: Incorrect wakeup source (4) to disable

Device config

board: TTGO T-Display
firmware version: rev837 (devel)
mobile app version: no apply
sensors: no apply
OLED: no
TFT: yes
Power: Battery only, USB works fine

Possible Hostname collision on OTA updates

Description
With multiples devices in the same network, the CanAirIO.local hostname is possible that it crash with other hostname of other CanAirIO devices.

To Reproduce
With two devices that have wifi configurated, try to send a OTA update with the CanAirIO installer script.

./espota.py --port=3232 --auth=CanAirIO --debug --progress -i 'CanAirIO.local' -f canairio_TTGO_T7_LEGACY_rev564_20200827.bin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.