It sends commands over Bluetooth Low Energy. Commands are sent to the handle with UUID d44bc439-abfd-45a2-b575-925416129600, with a format of a single byte containing the length of the rest of the packet, some bytes of ASCII containing the command, and then any arguments to the command. This is padded out to 16 bytes and then AES encrypted in ECB mode with a key of:
'\x32\x67\x2f\x79\x74\xad\x43\x45\x1d\x9c\x6c\x89\x4a\x0e\x87\x64'
Commands are:
LIGHT - one byte argument controls the brightness
IMAG - one byte controls which static image is displayed
DELE - one byte gives the number of uploaded images to be deleted, and the following bytes give the set of images to be deleted
SPEED - one byte that I think sets the transition speed between DIY images in playback mode
ANIM - one byte that chooses which animation is displayed
PLAY - one byte that contains the number of DIY images to play, and then the images to play in the order that they'll be played with one byte per image
CHEC - triggers a not
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MICROSPEECH : Driver | |
var o # output tensor | |
var model # this var really holds the model data for the entire session | |
def init() | |
import TFL | |
self.o = bytes(-5) # size must match the model | |
var descriptor = bytes(-8) | |
descriptor[0] = 8 # amplification | |
descriptor[1] = 5 # noisefloor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#- | |
LF2410.be - HLK-LD2410 24GHz smart wave motion sensor support for Tasmota via BLE and Berry | |
port of xsns_102_ld2410.ino from Theo Arends | |
SPDX-FileCopyrightText: 2022 Christian Baars | |
SPDX-License-Identifier: GPL-3.0-only | |
-# | |
class LD2410 : Driver | |
var buf | |
var current_func, next_func |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################################################################### | |
# Disco | |
# | |
# Homeassitant MQTT Discovery for Tasmota BLE Sensors | |
####################################################################### | |
import string | |
import json | |
class DISCO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD | |
* | |
* SPDX-License-Identifier: Unlicense OR CC0-1.0 | |
*/ | |
/* ULP-RISC-V example | |
This example code is in the Public Domain (or CC0 licensed, at your option.) | |
Unless required by applicable law or agreed to in writing, this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Usage: ./send <systemCode> <unitCode> <command> | |
Command is 0 for OFF and 1 for ON | |
*/ | |
#include "../rc-switch/RCSwitch.h" | |
#include <stdlib.h> | |
#include <stdio.h> | |
int main(int argc, char *argv[]) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
xlgt_10_berry.ino - virtual Berry led support for Tasmota | |
Copyright (C) 2021 Theo Arends & Christian Baars | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# control ILC LED lamp | |
class ILC : Driver | |
var buf, light_state | |
def init(MAC) | |
import BLE | |
import light | |
self.buf = bytes(-32) # create a byte buffer for BLE | |
var cbp = tasmota.gen_cb(/e,o,u->self.cb(e,o,u)) # create BLE callback function pointer | |
BLE.conn_cb(cbp,self.buf) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Template for exporting ULP code to Tasmotas Berry implementation | |
""" | |
from esp32_ulp import src_to_binary | |
source = """ | |
# replace this multiline string with the content of an .S file | |
# included header files will not work, but you will find missing defines there and can insert the missing lines here manually | |
# look for the console output of `micropython thisfile.py` to see, where you find the vars from Berry, i.e. 0001 my_var -> ULP.get_mem(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @fileOverview Javascript cryptography implementation. | |
* | |
* Crush to remove comments, shorten variable names and | |
* generally reduce transmission size. | |
* | |
* @author Emily Stark | |
* @author Mike Hamburg | |
* @author Dan Boneh | |
*/ |