forked from j3d1/fiatlux
Fixed stuff, added esphome config
This commit is contained in:
parent
4618dc95a9
commit
7fd1dbba18
2 changed files with 73 additions and 8 deletions
70
peripherals/cc48x6/esphome.yaml
Normal file
70
peripherals/cc48x6/esphome.yaml
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
# Board: NodeMCU v2 (ESP8266) (NodeMCU)
|
||||
# Definition: definitions/boards/nodemcuv2/manifest.yaml
|
||||
|
||||
esphome:
|
||||
name: trabantlux-1
|
||||
friendly_name: TrabantLux-1
|
||||
on_boot:
|
||||
priority: 30
|
||||
then:
|
||||
- light.turn_on:
|
||||
id: light_white
|
||||
brightness: 33%
|
||||
|
||||
|
||||
esp8266:
|
||||
board: nodemcuv2
|
||||
|
||||
logger:
|
||||
|
||||
api:
|
||||
encryption:
|
||||
key: "JMbOQuANui4S5yDzat0wWVXrhmUO6cpBW2pjBsjRBO4="
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
ap:
|
||||
ssid: TrabantLux-1 Fallback Hotspot
|
||||
password: "oftmAcVPECTy"
|
||||
|
||||
uart:
|
||||
tx_pin: GPIO2
|
||||
baud_rate: 115200
|
||||
id: lamp_uart
|
||||
|
||||
|
||||
light:
|
||||
- platform: monochromatic
|
||||
name: "Lampe"
|
||||
id: light_white
|
||||
output: lamp_output
|
||||
gamma_correct: 1.0
|
||||
|
||||
# - platform: esp32_rmt_led_strip
|
||||
- platform: neopixelbus
|
||||
type: GRBW
|
||||
variant: WS2812
|
||||
pin: GPIO4
|
||||
num_leds: 240
|
||||
name: "NeoPixel Light"
|
||||
|
||||
output:
|
||||
- platform: template
|
||||
id: lamp_output
|
||||
type: float
|
||||
write_action:
|
||||
- lambda: |-
|
||||
static int last_value = 0xffff;
|
||||
uint16_t value = (uint16_t)(state * 255.0f);
|
||||
if (value == last_value) return;
|
||||
last_value = value;
|
||||
|
||||
uint8_t hi = (value >> 8) & 0xFF;
|
||||
uint8_t lo = value & 0xFF;
|
||||
|
||||
uint8_t data[] = {0x80, lo, 0x00};
|
||||
id(lamp_uart).write_array(data, sizeof(data));
|
||||
Loading…
Add table
Add a link
Reference in a new issue