Skip to content

Instantly share code, notes, and snippets.

@Drafteed
Last active February 4, 2024 03:51
Show Gist options
  • Save Drafteed/04cbe8493e81a60bad8a5bc57dd7bf36 to your computer and use it in GitHub Desktop.
Save Drafteed/04cbe8493e81a60bad8a5bc57dd7bf36 to your computer and use it in GitHub Desktop.
ESPHome XGIMI Projector BLE Remote Wakeup / Power on
# ESPHome
esphome:
name: esphome
friendly_name: My ESPHome
# Board specific settings
esp32:
framework:
type: esp-idf
# Enable BLE
esp32_ble:
id: ble
# Enable BLE Server
esp32_ble_server:
# XGIMI Projector Wakeup Button
# This manufacturer data is for XGIMI Elfin (Global)
# You may need to obtain manufacturer data (BLE token) for your project yourself
# See more https://stackoverflow.com/questions/69921353/how-can-i-clone-a-non-paired-ble-signal-from-a-remote-to-trigger-a-device/75551013#75551013
# See more https://github.com/manymuch/Xgimi-4-Home-Assistant
button:
- platform: template
name: XGIMI Projector Wakeup
icon: "mdi:projector"
on_press:
- repeat:
count: 3
then:
- lambda: |-
std::vector<uint8_t> data = {0x46, 0x00, 0xe7, 0x12, 0x97, 0x30, 0x35, 0xf2, 0x78, 0xff, 0xff, 0xff, 0x30, 0x43, 0x52, 0x4b, 0x54, 0x4d};
id(ble).advertising_set_manufacturer_data(data);
- delay: 1s
- lambda: |-
std::vector<uint8_t> data = {0x46, 0x00};
id(ble).advertising_set_manufacturer_data(data);
- delay: 1s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment