#Changing Voice PE ring effects based on state

1 messages · Page 1 of 1 (latest)

brave pilot
#

Hey, I have received my Voice PE modules and for the most part they work perfectly, but I'm running into an issue with one of them which lives in the bedroom.

I can set the colour of the ring, as well as the brightness when it's active using the regular ring controls in the device, however I cannot change the effects that play when the device is in various states ("listening", "responding" etc...) this way.

The main issue is that while the Response is being generated, the ring flashes very quickly and brightly (the brightness I could possibly change) which in a dark room like a bedroom usually is is very unwelcome.

Ideally I'd like to change that particular effect to something else, like a single spinner, or the twinkling effect that's used when it's not connected at all.

Is there something in the pipeline to allow us to change the effects for various states like this?

pale compass
#

do keep in mind that once you edit this you wont receive automated updates anymore

brave pilot
#

Aha, I did try to see whether they were enrolled in ESPHome but they didn't show up there. That was something I tried indeed. Should they automatically show up in the ESPHome or do I have to manually import them then?

#

never mind, I'm completely blind and missed the banner that says that 3 new devices were detected. Thank you so much for the tips!

#

Okay, adopting worked and they're now in ESPHome which is great, however the firmware compiling step seems to fail due to a missing library. Too bad

pale compass
#

been compiling a modified version of the PE firmware just fine

brave pilot
#

sure, I'll need a minute or so, just restarted HA for some recorder changes

#

the restart might have fixed something as well, I don't see a bunch of deprecation warnings in this build

ornate nebula
#

It's in general good habit to clean build files for device before building.

brave pilot
#

yeah probably something stuck in a cache

#

well in my case I didn't think I had any cache files

#

since I hadn't imported them yet

#

let alone do a build

pale compass
#

sometimes the build also crashes due to resource limits

ornate nebula
#

Yeah, still 🙂 that thing is fixing everything 🙂

brave pilot
#

It's running in a VM and while it's not super powerful there's enough resources right now

pale compass
#

well, so do I

#

4cores 8gb ram max :D

brave pilot
#

3 cores and 4GB here

ornate nebula
#

(More detailed: in first build some elements could be downloaded with errors. That will crash your build first time, and will stay there for consecutive runs. Clear cache - and it's gone.)

ornate nebula
brave pilot
#

yeah it deffo passed the crash point now

#

I'll take a look at where to clear caches and such afterwards

#

yeah 3 cores is basically the most I want to allocate, the little miniPC only has 4

#

but it was just enough to have whisper run properly without bogging down the entire VM

pale compass
#

to save yourself the 10 min of searching I had to go through

#

clean build files

brave pilot
#

aha thanks 🙂

#

another mystery solved

#

okay: compile done, upload complete

pale compass
#

went through the same idk, 3d ago

brave pilot
#

so far no changes but I can start making them now

#

okay: it works

#

I asked the VA to give me the answer to 3+35. And glados went on a complete rant and didn't give me the actual answer

#

love it

#

can I overload the functions as is or do I need the entire code locally?

#

never tried something like this

pale compass
#

your are only chaning the yaml stuff
so this file is everything you need to change

brave pilot
#

would be nice if I can just overload the things needed and leave the rest alone

pale compass
#

that being said you can use the original yaml as a package

median zealot
#

Do you mean the esphome config bits?

pale compass
#

and override stuff in theory

brave pilot
#

yeah. by default it has

packages:
  Nabu Casa.Home Assistant Voice PE: github://esphome/voice-kit/home-assistant-voice.yaml
pale compass
#

if you want to stay in sync with upstream changes its gonna be kinda painful i think
might want to track it in git

brave pilot
#

which I'd like to leave alone

median zealot
pale compass
#

can you send the rest of the config?
I didnt adopt mine since I built my own

brave pilot
#

if it's not possible that's fine though

median zealot
#

You can simply add/replace the stuff you want

brave pilot
#
substitutions:
  name: home-assistant-voice-0971ee
  friendly_name: HA Voice Office
packages:
  Nabu Casa.Home Assistant Voice PE: github://esphome/voice-kit/home-assistant-voice.yaml
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}
api:
  encryption:
    key: <key>


wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
#

that's what you get when you adopt

pale compass
#

ah perfect

brave pilot
#

so I would then take just the script portion of the yaml, make changes and hope it overrides the parts of the package

#

I'm not sure that that works though

median zealot
brave pilot
#

yeah I was just reading that

#

that does seem like an overload type deal

median zealot
#

e.g.

scripts:
  - id: !extend some_script
    then:
      - your.action
#

you can also

scripts:
  - id: !remove other_script

if you want to get rid of it altogether

brave pilot
#
script:
    # Script executed when the voice assistant is thinking to a command
  # The spin stops and the 2 LEDs that are currently on and blinking indicating the commend is being processed.
  - id: !extend control_leds_voice_assistant_thinking_phase
    then:
      - light.turn_on:
          brightness: !lambda return max( id(led_ring).current_values.get_brightness() , 0.2f );
          id: voice_assistant_leds
          effect: "somethingelse"
#

I think that should be right

pale compass
#

looks like it

brave pilot
#

giving it a go

median zealot
#

the only issue is that for lists i think this only adds to them, so scripts.control_leds_voice_assistant_thinking_phase.then will only have your actions added after the defaults. i'm not sure, though

brave pilot
#

I'll give this a try and see if there's any effect

#

if it only adds to the list this effect will not fire

#

theoretically

pale compass
#

might just be easier to edit the package directly & keep track of it in like git
then you can merge changes ig

#

(thats what I do)

median zealot
brave pilot
#

I guess I can delete and then add it then

#

okay. The effect works

#

seems I don't really need to do the delete

#

I will anyway

#

but this works as is

#

pretty nice 🙂

#

oh of course I can't extend an entry I just deleted

#

so no, it's not possible to delete the entry and then extend

#

which leads me to believe that it does perform its actions on the existing list item

#

but yeah this is pretty sweet