streaming ewie from nookie
This commit is contained in:
parent
d7e0fcbfc4
commit
4628ff98ea
@ -8,7 +8,6 @@ substitutions:
|
|||||||
|
|
||||||
external_media_player: your_media_player ##change this to your external media player enity_id: do not include media_player.
|
external_media_player: your_media_player ##change this to your external media player enity_id: do not include media_player.
|
||||||
home_assistant_host: http://nookie.nex:8123 ##change to the full url or IP of your HA server including port
|
home_assistant_host: http://nookie.nex:8123 ##change to the full url or IP of your HA server including port
|
||||||
home_assistant_ip: "192.168.50.36"
|
|
||||||
tts_voice_speed: "16000" #options #nabu casa "24000" #piper "16000" elevenlabs "44100" must include quotes
|
tts_voice_speed: "16000" #options #nabu casa "24000" #piper "16000" elevenlabs "44100" must include quotes
|
||||||
|
|
||||||
#################### ON DEVICE WAKE WORDS #######################################
|
#################### ON DEVICE WAKE WORDS #######################################
|
||||||
@ -124,6 +123,8 @@ wifi:
|
|||||||
static_ip: 192.168.50.201
|
static_ip: 192.168.50.201
|
||||||
gateway: 192.168.50.1
|
gateway: 192.168.50.1
|
||||||
subnet: 255.255.255.0
|
subnet: 255.255.255.0
|
||||||
|
dns1: 192.168.50.1
|
||||||
|
dns2: 8.8.8.8
|
||||||
|
|
||||||
ap:
|
ap:
|
||||||
ssid: ${name}
|
ssid: ${name}
|
||||||
@ -202,6 +203,17 @@ interval:
|
|||||||
then:
|
then:
|
||||||
- lambda: "id(wifi_connection) = false;"
|
- lambda: "id(wifi_connection) = false;"
|
||||||
|
|
||||||
|
- interval: 3s
|
||||||
|
id: ewie_feed_refresh_interval
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
# - lambda: 'return id(s3_box_lcd).get_active_page() == id(video_feed_page);'
|
||||||
|
- lambda: 'return id(global_ewie_streaming);'
|
||||||
|
then:
|
||||||
|
- script.execute: update_ewie_feed_image
|
||||||
|
|
||||||
|
|
||||||
select:
|
select:
|
||||||
- platform: template
|
- platform: template
|
||||||
entity_category: config
|
entity_category: config
|
||||||
@ -308,7 +320,7 @@ script:
|
|||||||
then:
|
then:
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
switch.is_on: s_saver
|
- switch.is_on: s_saver
|
||||||
then:
|
then:
|
||||||
- lambda: id(led).turn_on().set_brightness(id(s_default_brightness).state /100).perform();
|
- lambda: id(led).turn_on().set_brightness(id(s_default_brightness).state /100).perform();
|
||||||
- delay: !lambda return id(s_saver_delay).state * 1000;
|
- delay: !lambda return id(s_saver_delay).state * 1000;
|
||||||
@ -327,7 +339,9 @@ script:
|
|||||||
then:
|
then:
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
- switch.is_on: s_saver
|
and:
|
||||||
|
- switch.is_on: s_saver
|
||||||
|
- lambda: 'return !id(global_ewie_streaming);'
|
||||||
then:
|
then:
|
||||||
- lambda: id(led).turn_on().set_brightness(id(s_saver_brightness).state /100).perform();
|
- lambda: id(led).turn_on().set_brightness(id(s_saver_brightness).state /100).perform();
|
||||||
- display.page.show: saver_page
|
- display.page.show: saver_page
|
||||||
@ -435,6 +449,20 @@ script:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
id(current_pin) += "0";
|
id(current_pin) += "0";
|
||||||
ESP_LOGD("increment_digit_0", "Current PIN: %s", id(current_pin).c_str());
|
ESP_LOGD("increment_digit_0", "Current PIN: %s", id(current_pin).c_str());
|
||||||
|
|
||||||
|
- id: update_ewie_feed_image
|
||||||
|
mode: restart
|
||||||
|
then:
|
||||||
|
- lambda: |-
|
||||||
|
std::string host = "${home_assistant_host}";
|
||||||
|
std::string path = id(ewie_image_path).state;
|
||||||
|
std::string full_url = host + path;
|
||||||
|
ESP_LOGD("video_feed_page", "Current url: %s", full_url);
|
||||||
|
id(ewie_live_feed_image).set_url(full_url);
|
||||||
|
- component.update: ewie_live_feed_image
|
||||||
|
- component.update: s3_box_lcd
|
||||||
|
- script.execute: saver_enabled
|
||||||
|
|
||||||
globals:
|
globals:
|
||||||
- id: wifi_connection
|
- id: wifi_connection
|
||||||
type: bool
|
type: bool
|
||||||
@ -474,6 +502,10 @@ globals:
|
|||||||
- id: global_is_assisting
|
- id: global_is_assisting
|
||||||
type: bool
|
type: bool
|
||||||
restore_value: false
|
restore_value: false
|
||||||
|
- id: global_ewie_streaming
|
||||||
|
type: bool
|
||||||
|
initial_value: "false"
|
||||||
|
restore_value: no
|
||||||
|
|
||||||
number:
|
number:
|
||||||
- id: s_saver_delay
|
- id: s_saver_delay
|
||||||
@ -2388,6 +2420,18 @@ display:
|
|||||||
lambda: |-
|
lambda: |-
|
||||||
it.fill(id(purple));
|
it.fill(id(purple));
|
||||||
it.image(0, 0, id(ewie_live_feed_image));
|
it.image(0, 0, id(ewie_live_feed_image));
|
||||||
|
on_page_change:
|
||||||
|
- to: video_feed_page
|
||||||
|
then:
|
||||||
|
- lambda: |-
|
||||||
|
ESP_LOGD("ewie", "starting to stream");
|
||||||
|
id(global_ewie_streaming) = true;
|
||||||
|
- from: video_feed_page
|
||||||
|
then:
|
||||||
|
- lambda: |-
|
||||||
|
ESP_LOGD("ewie", "stopping to stream");
|
||||||
|
id(global_ewie_streaming) = false;
|
||||||
|
|
||||||
i2c:
|
i2c:
|
||||||
- id: bus_a
|
- id: bus_a
|
||||||
sda: GPIO08
|
sda: GPIO08
|
||||||
@ -2835,15 +2879,8 @@ binary_sensor:
|
|||||||
min_length: 10ms
|
min_length: 10ms
|
||||||
max_length: 500ms
|
max_length: 500ms
|
||||||
then:
|
then:
|
||||||
- lambda: |-
|
|
||||||
std::string host = "http://${home_assistant_ip}";
|
|
||||||
std::string path = id(ewie_image_path).state;
|
|
||||||
std::string full_url = host + path;
|
|
||||||
ESP_LOGD("video_feed_page", "Current url: %s", full_url);
|
|
||||||
id(ewie_live_feed_image).set_url(full_url);
|
|
||||||
- component.update: ewie_live_feed_image
|
|
||||||
- display.page.show: video_feed_page
|
- display.page.show: video_feed_page
|
||||||
- component.update: s3_box_lcd
|
- script.execute: update_ewie_feed_image
|
||||||
|
|
||||||
- platform: touchscreen
|
- platform: touchscreen
|
||||||
page_id: climate_page
|
page_id: climate_page
|
||||||
|
Loading…
Reference in New Issue
Block a user