toblum / espteamspresence Goto Github PK
View Code? Open in Web Editor NEWMicrosoft Teams presence light for ESP32
Home Page: https://toblum.github.io/ESPTeamsPresence/
License: Mozilla Public License 2.0
Microsoft Teams presence light for ESP32
Home Page: https://toblum.github.io/ESPTeamsPresence/
License: Mozilla Public License 2.0
Board: Adafruit ESP32-S2 Feather.
I get expected result via serial monitor:
[HTTPS] Auth token valid for 3905 s.
[HTTPS] Method: GET, Response code: 200
setAnimation: 0, 0-8, Mode: 0, Color: 65280, Speed: 3000
--> Availability: Available, Activity: Available`
When I compile WS2812FX and use example:
#include <Arduino.h>
#include <WS2812FX.h>
#define LED_COUNT 8
#define LED_PIN 12
#define WHITELEDONLY (uint32_t)0xFF000000 /* for WHITE GRB LEDs */
WS2812FX ws2812fx = WS2812FX(LED_COUNT, LED_PIN, NEO_GRBW + NEO_KHZ800);
void setup() {
ws2812fx.init();
ws2812fx.setBrightness(100);
ws2812fx.setSpeed(5000);
ws2812fx.setColor(WHITELEDONLY);
ws2812fx.setMode(0);
ws2812fx.start();
}
void loop() {
ws2812fx.service();
}
Neopixel strip lights up as expected.
Is there something different I should be doing for the Adafruit ESP32-S2 Feather?
platformis.ini
[platformio]
src_dir = ./src/
default_envs = featheresp32-s2
description = The Microsoft Teams Neopixel Presence Device for ESP32
[env]
platform=espressif32
board=esp32dev
framework=arduino
; upload_port=COM4
monitor_speed=115200
upload_speed=921600
build_flags=
-DDATAPIN=13
-DNUMLEDS=16
; -DCORE_DEBUG_LEVEL=5
lib_deps=
[email protected]
[email protected]
[email protected]
[env:esp32doit-devkit-v1]
board=esp32doit-devkit-v1
[env:esp32doit-devkit-v1-nocertcheck]
board=esp32doit-devkit-v1
build_flags=
${env.build_flags}
-DDISABLECERTCHECK
[env:m5stack-core-esp32]
platform=espressif32
extends=esp32dev
board=m5stack-core-esp32
upload_speed=115200
build_flags=
-DDATAPIN=26
-DNUMLEDS=37
[env:featheresp32-s2]
platform = espressif32
board = featheresp32-s2
framework = arduino
build_flags=
-DDATAPIN=12
-DNUMLEDS=8
The fetching of the my status will fail periodically and for several minutes at a time. I have the latest release (0.17).
[15:08:35]Polling presence failed, retry #0.
[15:09:05]Polling presence info ...
[15:09:05][HTTPS] Auth token valid for 3567 s.
[15:09:07][HTTPS] Method: GET, Response code: 200
[15:09:07]deserializeJson() failed: InvalidInput
[15:09:07]--> Availability: , Activity:
[15:09:07]
[15:09:07]Polling presence failed, retry #0.
[15:09:37]Polling presence info ...
[15:09:37][HTTPS] Auth token valid for 3536 s.
[15:09:38][HTTPS] Method: GET, Response code: 200
[15:09:38]deserializeJson() failed: InvalidInput
[15:09:38]--> Availability: , Activity:
[15:09:38]
[15:09:38]Polling presence failed, retry #0.
[15:10:08]Polling presence info ...
[15:10:08][HTTPS] Auth token valid for 3504 s.
[15:10:09][HTTPS] Method: GET, Response code: 200
[15:10:09]setAnimation: 0, 0-32, Mode: 2, Color: 16711680, Speed: 3000
[15:10:09]--> Availability: Busy, Activity: InACall
I was trying to compile the code in PlatformIO, but I ran into some errors. Please see below. Can you please provide some assistance?
I only want the light to come on when I am busy, so I want to make this change.
I also need to adjust the color of the light when I am busy. For some reason it is showing up as purple, stead of red.
Errors
In file included from C:/users/rk/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/FreeRTOSConfig.h:120:0,
from C:/users/rk/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/freertos/freertos/FreeRTOS.h:99,
from C:/users/rk/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:32,
from src\main.cpp:13:
C:/users/rk/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/esp32/rom/ets_sys.h:21:21: fatal error: soc/soc.h: No such file or directory
compilation terminated.
In file included from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOSConfig.h:120:0,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOS.h:99,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp_event/esp_event.h:20,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/esp_event_loop.h:22,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiGeneric.h:27,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiSTA.h:28,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFi.h:32,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\ETH.h:24,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\ETH.cpp:21:
C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/rom/ets_sys.h:21:21: fatal error: soc/soc.h: No such file or directory
compilation terminated.
*** [.pio\build\esp32doit-devkit-v1\src\main.cpp.o] Error 1
*** [.pio\build\esp32doit-devkit-v1\lib641\WiFi\ETH.cpp.o] Error 1
In file included from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOSConfig.h:120:0,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOS.h:99,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp_event/esp_event.h:20,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/esp_event_loop.h:22,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiGeneric.h:27,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiSTA.h:28,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFi.h:32,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFi.cpp:24:
C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/rom/ets_sys.h:21:21: fatal error: soc/soc.h: No such file or directory
compilation terminated.
*** [.pio\build\esp32doit-devkit-v1\lib641\WiFi\WiFi.cpp.o] Error 1
In file included from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOSConfig.h:120:0,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOS.h:99,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp_event/esp_event.h:20,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/esp_event_loop.h:22,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiGeneric.h:27,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiSTA.h:28,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFi.h:32,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiAP.cpp:25:
C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/rom/ets_sys.h:21:21: fatal error: soc/soc.h: No such file or directory
compilation terminated.
In file included from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOSConfig.h:120:0,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOS.h:99,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\cores\esp32/Arduino.h:32,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiClient.h:24,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiClient.cpp:20:
C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/rom/ets_sys.h:21:21: fatal error: soc/soc.h: No such file or directory
compilation terminated.
*** [.pio\build\esp32doit-devkit-v1\lib641\WiFi\WiFiAP.cpp.o] Error 1
*** [.pio\build\esp32doit-devkit-v1\lib641\WiFi\WiFiClient.cpp.o] Error 1
In file included from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOSConfig.h:120:0,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOS.h:99,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp_event/esp_event.h:20,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/esp_event_loop.h:22,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiGeneric.h:27,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiSTA.h:28,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFi.h:32,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiSTA.cpp:25:
C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/rom/ets_sys.h:21:21: fatal error: soc/soc.h: No such file or directory
compilation terminated.
*** [.pio\build\esp32doit-devkit-v1\lib641\WiFi\WiFiSTA.cpp.o] Error 1
In file included from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOSConfig.h:120:0,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOS.h:99,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp_event/esp_event.h:20,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/esp_event_loop.h:22,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiGeneric.h:27,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiSTA.h:28,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFi.h:32,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiMulti.h:29,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiMulti.cpp:26:
C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/rom/ets_sys.h:21:21: fatal error: soc/soc.h: No such file or directory
compilation terminated.
In file included from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOSConfig.h:120:0,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOS.h:99,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp_event/esp_event.h:20,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/esp_event_loop.h:22,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiGeneric.h:27,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiSTA.h:28,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFi.h:32,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiScan.cpp:26:
C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/rom/ets_sys.h:21:21: fatal error: soc/soc.h: No such file or directory
compilation terminated.
In file included from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOSConfig.h:120:0,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOS.h:99,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp_event/esp_event.h:20,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/esp_event_loop.h:22,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiGeneric.h:27,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiSTA.h:28,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFi.h:32,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiGeneric.cpp:25:
C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/rom/ets_sys.h:21:21: fatal error: soc/soc.h: No such file or directory
compilation terminated.
In file included from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOSConfig.h:120:0,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOS.h:99,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\cores\esp32/Arduino.h:32,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiServer.h:22,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiServer.cpp:19:
C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/rom/ets_sys.h:21:21: fatal error: soc/soc.h: No such file or directory
compilation terminated.
*** [.pio\build\esp32doit-devkit-v1\lib641\WiFi\WiFiMulti.cpp.o] Error 1
In file included from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOSConfig.h:120:0,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOS.h:99,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\cores\esp32/Arduino.h:32,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiUdp.h:38,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiUdp.cpp:19:
C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/rom/ets_sys.h:21:21: fatal error: soc/soc.h: No such file or directory
*** [.pio\build\esp32doit-devkit-v1\lib641\WiFi\WiFiGeneric.cpp.o] Error 1
*** [.pio\build\esp32doit-devkit-v1\lib641\WiFi\WiFiScan.cpp.o] Error 1
compilation terminated.
*** [.pio\build\esp32doit-devkit-v1\lib641\WiFi\WiFiUdp.cpp.o] Error 1
*** [.pio\build\esp32doit-devkit-v1\lib641\WiFi\WiFiServer.cpp.o] Error 1
In file included from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOSConfig.h:120:0,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOS.h:99,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\cores\esp32/Arduino.h:32,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src/WiFiUdp.h:38,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\DNSServer\src\DNSServer.h:3,
from C:\users\rk\.platformio\packages\framework-arduinoespressif32\libraries\DNSServer\src\DNSServer.cpp:1:
C:\users\rk\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/rom/ets_sys.h:21:21: fatal error: soc/soc.h: No such file or directory
compilation terminated.
*** [.pio\build\esp32doit-devkit-v1\libd45\DNSServer\DNSServer.cpp.o] Error 1
================================================================ [FAILED] Took 3.60 seconds ================================================================
Environment Status Duration
--------------------- -------- ------------
az-delivery-devkit-v4 IGNORED
esp32doit-devkit-v1 FAILED 00:00:03.601
========================================================== 1 failed, 0 succeeded in 00:00:03.601 ==========================================================
The terminal process "C:\Users\rk\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.
It says "ESP32 teams presence - v0.17.0"
should say It says "ESP32 teams presence - v0.18.0"
Hello,
I would like to compile it for a Wemos D1 mini PRO (ESP8266).
I tried but I have several errors with library dependencies.
I added those lines in platform.ini, as suggested by PlatformIO.
[env:d1_mini_pro]
platform = espressif8266
board = d1_mini_pro
I had this first error about missing headers, followed by several other ones.
Compiling .pio/build/d1_mini_pro/lib759/ESP8266WiFi/ESP8266WiFiGratuitous.cpp.o
Compiling .pio/build/d1_mini_pro/lib759/ESP8266WiFi/ESP8266WiFiMulti.cpp.o
src/main.cpp:16:10: fatal error: HTTPClient.h: No such file or directory
I have errors with following libraries :
#include <HTTPClient.h> => corrected by ESP8266HTTPClient
#include <ESPmDNS.h> => corrected byt ESP8266mDNS
#include "SPIFFS.h" => Can't find an ESP8266 version
#include "ESP32_RMT_Driver.h" => same
Do you have any idea how to do, please?
Thanks
I feel sheepish asking here, but I've been banging my head against the wall for 5 hours last night and 4 hours today. I've researched the errors I've received and I'm getting all sorts of different answers.
The issue is constant - after flashing firmware, the program won't boot. Here is a log of what I'm seeing. I've included the upload.
esptool.py v2.6-beta1
Serial port COM7
Connecting...
.
.
.
.
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: b0:b2:1c:a8:5f:14
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 1100256 bytes to 702956...
Writing at 0x00010000... (2 %)
Writing at 0x00014000... (4 %)
Writing at 0x00018000... (6 %)
Writing at 0x0001c000... (9 %)
Writing at 0x00020000... (11 %)
Writing at 0x00024000... (13 %)
Writing at 0x00028000... (16 %)
Writing at 0x0002c000... (18 %)
Writing at 0x00030000... (20 %)
Writing at 0x00034000... (23 %)
Writing at 0x00038000... (25 %)
Writing at 0x0003c000... (27 %)
Writing at 0x00040000... (30 %)
Writing at 0x00044000... (32 %)
Writing at 0x00048000... (34 %)
Writing at 0x0004c000... (37 %)
Writing at 0x00050000... (39 %)
Writing at 0x00054000... (41 %)
Writing at 0x00058000... (44 %)
Writing at 0x0005c000... (46 %)
Writing at 0x00060000... (48 %)
Writing at 0x00064000... (51 %)
Writing at 0x00068000... (53 %)
Writing at 0x0006c000... (55 %)
Writing at 0x00070000... (58 %)
Writing at 0x00074000... (60 %)
Writing at 0x00078000... (62 %)
Writing at 0x0007c000... (65 %)
Writing at 0x00080000... (67 %)
Writing at 0x00084000... (69 %)
Writing at 0x00088000... (72 %)
Writing at 0x0008c000... (74 %)
Writing at 0x00090000... (76 %)
Writing at 0x00094000... (79 %)
Writing at 0x00098000... (81 %)
Writing at 0x0009c000... (83 %)
Writing at 0x000a0000... (86 %)
Writing at 0x000a4000... (88 %)
Writing at 0x000a8000... (90 %)
Writing at 0x000ac000... (93 %)
Writing at 0x000b0000... (95 %)
Writing at 0x000b4000... (97 %)
Writing at 0x000b8000... (100 %)
Wrote 1100256 bytes (702956 compressed) at 0x00010000 in 9.0 seconds (effective 979.2 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Success!
e
ts Jul 29 2019 12:21:46
rst:0x1 (POWERON_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:5564
load:0x40078000,len:0
load:0x40078000,len:13756
entry 0x40078fb4
�[0;32mI (29) boot: ESP-IDF v3.0.3 2nd stage bootloader�[0m
�[0;32mI (29) boot: compile time 08:53:32�[0m
�[0;32mI (30) boot: Enabling RNG early entropy source...�[0m
�[0;32mI (34) boot:
SPI Speed : 40MHz�[0m
�[0;32mI (38) boot: SPI Mode : DIO�[0m
�[0;32mI (42) boot: SPI Flash Size : 4MB�[0m
�[0;32mI (46) boot: Partition Table:�[0m
�[0;32mI (49) boot: ## Label Usage Type ST Offset Length�[0m
�[0;32mI (57) boot: 0 phy_init RF data 01 01 0000f000 00001000�[0m
�[0;32mI (64) boot: 1 otadata OTA data 01 00 00010000 00002000�[0m
�[0;32mI (72) boot: 2 nvs WiFi data 01 02 00012000 0000e000�[0m
�[0;32m
I (79) boot: 3 at_customize unknown 40 00 00020000 000e0000�[0m
�[0;32mI (87) boot: 4 ota_0 OTA app 00 10 00100000 00180000�[0m
�[0;32mI (94) boot: 5 ota_1 OTA app 00 11 00280000 00180000�[0m
�[0;32mI (102) boot: End of partition table�[0m
�[0;31mE (106) boot: ota data partition invalid and no factory, will try all partitions�[0m
�[0;31mE (114) esp_image: image at 0x100000 has invalid magic byte�[0m
�[0;33mW (120) esp_image: image at 0x100000 has
invalid SPI mode 8�[0m
�[0;33mW (126) esp_image: image at 0x100000 has invalid SPI size 15�[0m
�[0;31mE (133) boot: OTA app partition slot 0 is not bootable�[0m
�[0;31mE (138) esp_image: image at 0x280000 has invalid magic byte�[0m
�[0;33mW (145) esp_image: image at 0x280000 has invalid SPI mode 255�[0m
�[0;33mW (151) esp_image: image at 0x280000 has invalid SPI size 15�[0m
�[0;31mE (157) boot: OTA app partition slot 1 is not bootable�[0m
�[0;31mE (163) boot: No bootable app partitions in the partit
ion table�[0m
user code done
I have used the Home Flasher and the PyQt5 Flasher. I have used two different Windows computers, 5 different ESP32 boards and those boards come from three different batches of boards I've purchased before. I've tried holding down the boot button the entire time the firmware loads, or using a 10 ohm cap on one board to get it to go into boot mode.
No matter what happens, every time this thing boots up after downloading the firmware, it keeps basically no doing anything. I tried re-downloading the firmware.bin and I also tried replacing it with the no cert firmware file. All always result in the same thing. I also have used two different USB cables (3 of the 5 ESP boards are USB-C, two are Micro USB) and I even tried using an FTDI cable, all to no avail.
Again, I feel foolish asking here, because I am pretty sure there is something fundamental I am missing. As we say in the IT industry "the root cause was between the keyboard and the chair". Does anyone know what newbie mistake it is that I'm making here? I am at my wits end. I can show you the pile of ESPs on my bench right now, it's shameful. I've pulled known working good ones that I've used for other projects, but nothing works.
Hi there,
I'm not sure it's the right area, but I tried to follow your guide concerning the implementation fo the firmware unfortunately without success.
For the config:
I can successfully flash the Board with the frimeware.bin:
Command: esptool.py --port /dev/cu.usbserial-0001 --baud 115200 --after no_reset write_flash --flash_mode dio 0x00000 /Users/xxx/Downloads/firmware.bin
esptool.py v2.6
Serial port /dev/cu.usbserial-0001
Connecting.......
Detecting chip type... ESP32
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 3c:61:05:03:ac:a0
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 1078672 bytes to 613160...
Wrote 1078672 bytes (613160 compressed) at 0x00000000 in 54.3 seconds (effective 158.8 kbit/s)...
Hash of data verified.
Leaving...
Staying in bootloader.
Firmware successfully flashed. Unplug/replug or reset device
to switch back to normal boot mode.
After that, I don't get any new WiFi hotspot "ESPTeamsPresence".
I've tried the 3 different options in the software which are: Quad I/O (QIO), Dual I/O (DIO) and DUAL Output (DOUT)
Is there any chance that the Board doesn't works with your Frimware?
Hello Tobias,
since a couple of days, my TeamsPresenceLight isn´t working anymore.
I started the device login a couple of times, but no change.
I have also flashed the ESP again and did a complete new configuration.
Is the generic Client ID still usable?
Or is it possible, that our IT change something in the Azure Backend?
In the console i can see "Waiting for authorization by user: ......: OAuth 2.0 device flow error. Authorization is pending. Continue polling.
By the way, are you still planning to update your firmware with additional features?
Best regards
Michael
HI. @toblum
I'm @riraosan.
I have used your app and I am very impressed with the endless possibilities. I am impressed with the endless possibilities of your app. Thank you for your contribution.
I would like to incorporate your work into my project. I am thinking that I can make a library of the login process part to AzuruAD that you have created.
Before I do that, I have a question: have you already realized the libraryization of the AzuruAD login process?
Or do you have a plan to library this AzuruAD login process?
Best regards.
Hi,
I had an issue with the payload response in the last weeks. I seems that it comes with single quotes in the GUID part of the presence-url-part now. I got an "InvalidInput" error during deserialization. I solved it by replacing singlequotes like this --> pduck27@5aaad5b#diff-9f3581dc75caf236e320a285e2cc1523e851b06566dc6310ed38c92cd8b68cf6.
Don't you had this problem?
Hi!
Thanks for sharing this project,
it isn't issue, but a concern, will this code store my data/MS account access anywhere other than this esp8266 module? or is it all local?
do you also have some guide for azure app?
Hi,
I write the code succesfully on esp8266 12E. but it is not working. I cannot see the wifi. Also I have checked serial monitor but I cannot see anything
Just trying the different stats, and the 'Available' green colour is perfect, the 'Away' yellow is ok, but the 'Busy' is showing as Purple... and nothing for 'Do not Disturb'
Can this be changed? perhaps something can be built into the config GUI for custom hex codes?
I'm using a 24 RGB LED Ring WS2812B 5050
output:
[15:03:53]pollForToken()
[15:03:55][HTTPS] Method: POST, Response code: 200
[15:03:55]saveContext() - Success: 4609
[15:03:55]Polling presence info ...
[15:03:55][HTTPS] Auth token valid for 3598 s.
[15:03:57][HTTPS] Method: GET, Response code: 200
[15:03:57]setAnimation: 0, 0-24, Mode: 0, Color: 65280, Speed: 3000
[15:03:57]--> Availability: Available, Activity: Available
[15:03:57]
[15:03:57]======================================================================
[15:05:27]Polling presence info ...
[15:05:27][HTTPS] Auth token valid for 3506 s.
[15:05:29][HTTPS] Method: GET, Response code: 200
[15:05:29]setAnimation: 0, 0-24, Mode: 0, Color: 4194432, Speed: 3000
[15:05:29]--> Availability: Busy, Activity: Busy
[15:05:29]
[15:06:59]Polling presence info ...
[15:06:59][HTTPS] Auth token valid for 3415 s.
[15:07:01][HTTPS] Method: GET, Response code: 200
[15:07:01]setAnimation: 0, 0-24, Mode: 0, Color: 16723968, Speed: 3000
[15:07:01]--> Availability: BeRightBack, Activity: BeRightBack
[15:07:01]
I have a problem with the latest firmware. My WLAN password has 38 digits. I cannot enter these via the web interface.
I've flashed to my ESP32, configured via Wi-Fi with LAN IP and completed the device login. Added my personal account, approved with Admin account but not for entire organization.
After a reboot the LEDs show white, then chasing red, then nothing. If I start the device login again they show chasing purple, then after a reboot its back to white > chasing red > nothing
I'd appreciate some assistance with getting this working as it is a great project :)
Hi. It seems, that the generic Client-ID not working anymore. I don´t get the code with the generic-ID. If I use a code from our Azure, it works great.
Tried to flash f/w to 0.18 and appear to have bricked it!
I previously was getting the lights working, but would not get the Presence, the logs showed it failing, then saw an issue post with a similar problem, so thought id flash and go.
I've tried a few times to revert to the previous f/w also setting 'yes wipes all data in NodeMCU PyFlasher.
oh, dear..
[19:02:56]rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[19:02:56]invalid header: 0x6c63206e
[19:02:56]invalid header: 0x6c63206e
[19:02:56]invalid header: 0x6c63206e
[19:02:56]invalid header: 0x6c63206e
[19:02:56]invalid header: 0x6c63206e
[19:02:56]invalid header: 0x6c63206e
[19:02:56]invalid header: 0x6c63206e
[19:02:56]ets Jul 29 2019 12:21:46
[19:02:56]
[19:02:56]rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[19:02:56]invalid header: 0x6c63206e
[19:02:56]invalid header: 0x6c63206e
[19:02:56]invalid header: 0x6c63206e
[19:02:56]invalid header: 0x6c63206e
[19:02:56]invalid header: 0x6c63206e
[19:02:56]invalid header: 0x6c63206e
[19:02:56]invalid header: 0x6c63206e
[19:02:56]ets Jul 29 2019 12:21:46
[19:02:56]
[19:02:56]rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[19:02:56]invalid header: 0x6c63206e
[19:02:56]invalid header: 0x6c63206e
[19:02:56]invalid header: 0x6c63206e
[19:02:56]invalid header: 0x6c63206e
[19:02:56]invalid header: 0x6c63206e
[19:02:57]invalid header: 0x6c63206e
[19:02:57]invalid header: 0x6c63206e
[19:02:57]ets Jul 29 2019 12:21:46
[19:02:57]
[19:02:57]rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[19:02:57]
Serial port closed!
if i run an example sketch from Arduino IDE, like get chip info, that works..
Have also tried the esp32 reset flash
So annoying, as it was almost working !
Now I get running it with the pre-compiled version. But when I compile by my own, it will not authenticate.
First question:
I saw that "DISABLECERTCHECK 1" in config of new version. Is this enabled in actual pre-compiled version?
How can I change the color of busy? My stripe lights purple instead of red.
Thank you verry much!
This project is realy awesome!
Hey,
I just flashed my ESP with your code with platform.io, seems to run fine. After I connect to the AP and fill in all the informations, the ESP does connect to Wifi and is blinking green. When I go to the device setup page and click the "Start device login" button, no code is generated and the device still blinks green. The console output is:
handleStartDevicelogin()
[HTTPS] Method: POST, Response code: 400
deserializeJson() failed: NoMemory
The device page stats under memory usage: Sketch: 233216 of 1319729 bytes free RAM: 235616 of 327680 bytes free - seems okay to me.
Do you have any idea how to solve this?
Thanks in advance :)
Flash my ESP32 using the NODEMCU PYFlasher
Serial Monitor Responce:
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
Falling back to built-in command interpreter.
OK
Command: esptool.py --port COM5 --baud 460800 --after no_reset write_flash --flash_size detect --flash_mode dio 0x00000 C:\Users\James\Downloads\firmware.bin
esptool.py v3.0
Serial port COM5
Connecting........_
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 0)
Features: WiFi, BT, Dual Core, Coding Scheme None
Crystal is 40MHz
MAC: 30:ae:a4:02:ed:6c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 1084256 bytes to 629464...
Wrote 1084256 bytes (629464 compressed) at 0x00000000 in 16.2 seconds (effective 536.3 kbit/s)...
Hash of data verified.
Leaving...
Staying in bootloader.
Firmware successfully flashed. Unplug/replug or reset device
to switch back to normal boot mode.
I just stumbled upon this gem, but couldn't really get it to work.
The normal firmware.bin was working for the device authentication flow but had certificate errors when polling the actual status;
the nocertcheck-version wasn't working at all (ssl connection error "-1"...).
After digging into it a bit I discovered that the software uses two different root certificates to validate the requests to https://login.microsoftonline.com (DigiCert Global Root CA) and to https://graph.microsoft.com (DigiCert Assured ID Root G2).
But upon inspecting the certificates used by those two domains (using https://graph.microsoft.com/.default) I realized that both are using the DigiCert Global Root CA and the graphql endpoint was no longer using the G2 root certificate.
So I did what any sane developer would do and just commented out some lines:
In request_handler.h
//if (url.indexOf("graph.microsoft.com") > -1) {
// client->setCACert(rootCACertificateGraph);
//} else {
client->setCACert(rootCACertificateLogin);
//}
That way all requests use the Root CA and everything works.
Great project! Got this working on an Adafruit Huzzah32. I'm connected to my company's guest wifi, which works great for a period of time before the status light appears to get stuck and doesn't update. When I reboot the device, it works great again. I've been using it for a week and I think it times out after an hour or two, though I don't know for sure.
I think I have the polling at 30 seconds. Is the timeout likely to be on the Microsoft side, the wifi connection, or something local to the device? What's the best way to troubleshoot this?
Hi,
Thanks for your help on the last issue. I've added some code to v1.4 to include a brightness setting. I thought I'd share it with you. I've attached my versions of main.cpp, and request_handler.h, and here are the changes I made using the line numbers in my files. Feel free to add this to your project, or toss it in the bin. It's just something I added, and thought I'd give back.
Rick
main.cpp.txt
request_handler.h.txt
207 responseDoc["brightness"].set(paramBrightnessValue);
Hi,
when the device connect to my local network I want to edit the config page. It ask me user name and password. I know the password but what is the user name? I read carrefully you setup page this time but I could not see :) sorry..
Hey toblum
I have an issue with my presenter. All worked before.
Now i have the problem that the presenter just show the red animated light. Wifi work. I have acces to the controller. My Teams account should be right (i checked it 3 times. I restarted the process 3 times. I don't know what to do anymore. Is there a solution for my problem ?
Kind regards
Nico
problems connecting to a hidden wifi network with MAC authentication. neither a username nor a password is required
Any suggestions on how to fix it?
It work for about 3 days and now I get this.
Polling presence failed, retry #0.
Polling presence info ...
[HTTPS] Auth token valid for 3537 s.
[HTTPS] Method: GET, Response code: 200
deserializeJson() failed: NoMemory
--> Availability: , Activity:
Hi,
Could you please share application registration manifest from Azure Active Directory so it can be used to create similar configuration to be used in personal tenant?
Thank you.
If I use a neopixel ring the colors are correct. If I use 5v ws2811 12mm bullet nodes the colors are off. The bullets are RGB color order.
I am using v0.15.1, and keep getting the error :
Polling presence failed, retry #0.
Polling presence info ...
[HTTPS] Auth token valid for 3538 s.
[E][ssl_client.cpp:33] _handle_error(): [start_ssl_client():199]: (-9984) X509 - Certificate verification failed, e.g. CRL, CA or signature check failed
[E][WiFiClientSecure.cpp:132] connect(): start_ssl_client: -9984
[HTTPS] Request failed: connection refused
--> Availability: , Activity:
I have tried two different networks in case it was a connection issue (have had that on previous projects), but no luck. Have you run into this issue?
Tried it with multiple ESP32-WROOM-32.
From the device log:
Saving config 'pollInterval'= '30'
Saving config 'numLeds'= '12'
Configuration was updated.
handleRoot()
handleStartDevicelogin()
[ 67666][E][WiFiClientSecure.cpp:144] connect(): start_ssl_client: -1
[HTTPS] Request failed: connection refused
handleRoot()
handleStartDevicelogin()
[ 75750][E][WiFiClientSecure.cpp:144] connect(): start_ssl_client: -1
[HTTPS] Request failed: connection refused
handleRoot()
[457861][E][WebServer.cpp:648] _handleRequest(): request handler not found
Requested non-existing page '/favicon.ico' arguments(GET):0
handleFileRead: /favicon.ico
handleStartDevicelogin()
[458103][E][WiFiClientSecure.cpp:144] connect(): start_ssl_client: -1
[HTTPS] Request failed: connection refused
JavaScript console:
startDevicelogin
Object { error: "devicelogin_unknown_response" }
hello is it possible to add a little function that gets the time and if the time is no between 9am and 18hs the leds are offline? Thanks!
Hi,
how can I get the APP registering twice?
I deleted/not allowing the App in O365 portal and now I don´t get display the APP code to register by microsoft a second time?
The led always blinking purple and getting this error:
23:43:45] [23:43:50]pollForToken() [23:43:51][HTTPS] Method: POST, Response code: 400 [23:43:51]pollForToken() - Wating for authorization by user: AADSTS70016: OAuth 2.0 device flow error. Authorization is pending. Continue polling. [23:43:51]Trace ID: 9d7dc30c-5d95-41ed-b988-693212533400 [23:43:51]Correlation ID: 1705c440-4cd8-479e-85b6-38d4ad179a20 [23:43:51]Timestamp: 2021-01-16 22:43:52Z [23:43:51] [23:43:56]pollForToken() [23:43:58][HTTPS] Method: POST, Response code: 400 [23:43:58]pollForToken() - Wating for authorization by user: AADSTS70016: OAuth 2.0 device flow error. Authorization is pending. Continue polling. [23:43:58]Trace ID: 953199e7-b7a5-48a6-a5c3-fb88d62c3500 [23:43:58]Correlation ID: 1705c440-4cd8-479e-85b6-38d4ad179a20 [23:43:58]Timestamp: 2021-01-16 22:43:58Z [23:43:58]
greet Lars
Tried all browsers, and I can not get the code to appear, the input is empty, I even looked in the page source, nothing :
"It should say "No authentication infos found, start device login flow to complete widget setup!". Click "Start device login". The LEDs should show now a running purple animation.
A popup opens up
Copy the code that is displayed and click "Open device login" or open https://microsoft.com/devicelogin in your favorite browser."
Hy!
I created a new app in azure to get my own client ID.
When trying to log in my user account using the "Start device Logon" an error is thrown.
The microsoft login sceen says "login successful", but the device log shows an error:
https://login.microsoftonline.com/error?code=7000218
[17:01:12]mDNS responder started: ESPTeamsPresence.local [17:01:12]loadContext() - File empty [17:01:12]Wifi connected, waiting for requests ... [17:01:12]====================================================================== [17:01:18]handleRoot() [17:01:29]handleStartDevicelogin() [17:01:34][HTTPS] Method: POST, Response code: 200 [17:01:34]setAnimation: 0, 0-16, Mode: 16, Color: 4194432, Speed: 3000 [17:01:34]====================================================================== [17:01:39]pollForToken() [17:01:43][HTTPS] Method: POST, Response code: 400 [17:01:43]pollForToken() - Wating for authorization by user: AADSTS70016: OAuth 2.0 device flow error. Authorization is pending. Continue polling. [17:01:43]Trace ID: 161eeca5-3b0e-4d84-b776-4bf8158e5d00 [17:01:43]Correlation ID: e1fb7471-56eb-4481-942b-603f1007f764 [17:01:43]Timestamp: 2022-09-03 15:01:29Z [17:01:43] [17:01:48]pollForToken() [17:01:52][HTTPS] Method: POST, Response code: 401 [17:01:52][HTTPS] Other HTTP code: 401 [17:01:52]Response: {"error":"invalid_client","error_description":"AADSTS7000218: The request body must contain the following parameter: 'client_assertion' or 'client_secret'.\r\nTrace ID: b0376132-d7d0-4757-8705-6bbca5677800\r\nCorrelation ID: e1fb7471-56eb-4481-942b-603f1007f764\r\nTimestamp: 2022-09-03 15:01:38Z","error_codes":[7000218],"timestamp":"2022-09-03 15:01:38Z","trace_id":"b0376132-d7d0-4757-8705-6bbca5677800","correlation_id":"e1fb7471-56eb-4481-942b-603f1007f764","error_uri":"https://login.microsoftonline.com/error?code=7000218"} [17:01:52]Device login failed [17:01:52]======================================================================
Do you have any idea how to fix this? Thank you!
Sorry to report such a silly issue - but I've been looking for three days now and I can't find the STL files to 3D print this guy.
Hello,
After struggling to get my ESP32 device up and running (the firmware loaded but the device was giving errors, and I don't use VSCode for Arduino, so I had to build my own sketch), I finally got things going. I got to the Start Device Login point, and went through the steps indicated. I ended up getting an error from Microsoft:
AADSTS50020: User account '[email protected]' from identity provider 'https://sts.windows.net/65bc0b3b-7ca2-488c-ba9c-b1bebdd49af6/' does not exist in tenant 'Microsoft Services' and cannot access the application '3837bbf0-30fb-47ad-bce8-f460ba9880c3'(Teams presence device) in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account.
I suspect it has to do with the Tenant hostname/ID I put in.
I'm attaching the startup output, as pasting it in here makes it all weird for some reason.
Thanks
Rick
startupoutput.txt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.