Welcome to Incremental Social! Learn more about this project here!
Check out lemmyverse to find more communities to join from here!

homeassistant

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

tburkhol , in wifi Temperature gauges?

If you're trying to avoid a whole zigbee or zwave network, Govee makes some inexpensive battery-powered bluetooth thermometer/hygrometers, and have a HA integration, but bluetooth can be tricky to get running on Pis. I feel like most of the actual wifi devices are phone-home type setups. My govee thermometers have pretty good range - one of them even reads from inside the refrigerator.

DetachablePianist OP ,

thanks!

wander1236 , in wifi Temperature gauges?
@wander1236@sh.itjust.works avatar

Like others have said, ZigBee is the way to go for low-traffic things like temperature sensors. It uses a lot less power than WiFi, so battery-powered devices can last for months on a CR2032.

I've got some Aqara temperature/humidity sensors that I have hooked up to my Smartthings Hub and then imported into Home Assistant through the cloud, but you can use any ZigBee adapter that works with Home Assistant: https://community.home-assistant.io/t/using-aqara-temp-and-humidity-sensor/408166/9.

I also recently got some Sensibo Elements boxes, which are wall-powered WiFi air quality sensors that include temperature/humidity. They have an official HA integration. If you go for them, don't worry about the sale countdown on the website; it doesn't actually seem to ever end.

DetachablePianist OP ,

thanks!

JASN_DE , in wifi Temperature gauges?

Have you considered other protocols, especially ZigBee?

DetachablePianist OP ,

Zigbee is mentioned all the time. Guess I'll have to look into them...

sabreW4K3 , in wifi Temperature gauges?
@sabreW4K3@lazysoci.al avatar

Grab yourself a Zigbee coordinator and some Zigbee Temperature Devices off AliExpress or from Ikea if you're willing to pay more.

DetachablePianist OP ,

thanks!

thr0w4w4y2 , in wifi Temperature gauges?

Outdoor, Indoor? Wifi, Zigbee? mains power, battery?

DetachablePianist OP ,

Outdoor. I assune wifi-enabled, but I'm a newb and looking for advice. Zigbee keeps getting mentioned, so I guess I'll be looking into that. thanks!

dmtalon , (edited ) in Getting BlueIris Integration to send Motion Events to HA

I get alerts from BI Motion in HA (via mqtt)... I'll look at it a bit to jog my memory and see if I can give any tips. It'll likely be tomorrow or so as I'm traveling today

corroded OP ,

I'd be interested to hear how you have it set up. My issue is definitely with HA. I can see the messages making it to the broker; HA just isn't recognizing them it seems.

chunkystyles , in Getting BlueIris Integration to send Motion Events to HA

Auto detection for MQTT devices is a bit tricky. I struggled with that myself when I was trying to incorporate data from a web scraper I wrote. This config file here shows what I ended up with to create auto detecting sensors in HA https://github.com/chunkystyles/reservationsScraper/blob/main/mqttConfig.json

Each one of the devices gets registered at start up of the app.

If I were doing this all over again, I probably wouldn't use auto detect sensors. I'd manually configure them. Here's some examples of that kind of configuration I used for some HVAC remote devices I built:

mqtt:
  sensor:
    - name: "makerfabs_remote_1"
      state_topic: "makerfabs/hvacremote/1/status_out"
      force_update: true
      expire_after: 125
    - name: "makerfabs_remote_2"
      state_topic: "makerfabs/hvacremote/2/status_out"
      force_update: true
      expire_after: 125
    - name: "makerfabs_remote_3"
      state_topic: "makerfabs/hvacremote/3/status_out"
      force_update: true
      expire_after: 125
    - name: "makerfabs_remote_4"
      state_topic: "makerfabs/hvacremote/4/status_out"
      force_update: true
      expire_after: 125

For these to work, you just put them in your "configuration.yaml" file in HA.

corroded OP ,

The strange part is that the BlueIris integration already has "Motion" devices for each of my cameras. The documentation made it sound like I just needed to start feeding HA with MQTT messages that these devices were expecting.

I may do like you suggested and just manually set up binary MQTT sensors. It would look a lot cleaner to tie it into the existing integration, but I'm not sure if it's worth the extra troubleshooting.

dbrand666 , in Wyoming Satellites - What's your go-to purchase?

I have a couple of Pi Zeros around the house I use as media players. They were running piCorePlayer. I replaced just the software with a vanilla Pi OS and installed Squeezelite and then Wyoming Satellite. I added a microphone and an automation to silence the media player as soon as a wake word is detected.

Voice recognition is adequate but I wish it was smarter.

(I should finish that blog post...)

scrubbles OP ,
@scrubbles@poptalk.scrubbles.tech avatar

I would definitely be interested

dbrand666 ,
mike_wooskey , in Wyoming Satellites - What's your go-to purchase?
@mike_wooskey@lemmy.thewooskeys.com avatar

I host Wyoming on a server with an Nvidia 4060ti, and point home assistant, on a vm on another server, to it. It works great.

spitfire ,

He was asking about satellites, the end devices that have mics/speakers.

ZeldaFreak , in IKEA's new smart plug to track power consumption could launch soon
@ZeldaFreak@lemmy.world avatar

Still switchable? Man I wish there would be a pure power meter plug available, with no switching ability. I would plug them into a lot of things. I know you could measure the whole power usage of a line or your home but that requires the right equipment (power meter) or an electrician to install it

Rekhyt ,

Why not just not use the switch function? You can even "disable" the switch in Home Assistant so you can't accidentally turn it off, and most of these sorts of switches have a setting for default (on power restoration after power loss) of on or off.

brockhold ,

I'm not the person who you're responding to, but at least in my case I am just not comfortable with having the ability to switch, since I would like to connect devices which could be seriously damaged if the switch toggled for any reason. I have modified a couple of switchable power monitoring plugs already, but I would rather pay slightly less and not have a hassle.

limelight79 ,

With Tasmota on the S31, you can disable the ability to turn it off. I have a few set up that way to prevent them from being turned off.

Nouveau_Burnswick ,

You can get meters that clamp over the wire, no electrician required.

https://www.smarthomeperfected.com/best-smart-home-energy-monitor/

ZeldaFreak ,
@ZeldaFreak@lemmy.world avatar

I'm kinda stupid. I've seen these but they always show pictures within the distribution box. Here only certified electricians are allowed to open them. But I totally didn't saw the option to just clamp it on a wire outside the box. I even asked Bing AI for help, because not everyone must sell on Amazon and Google Search just spits out the affiliate link sites, that suggests always the same popular options. 90% of the time switchable plugs.

Nouveau_Burnswick ,

If you want the whole house, you'll need to crack the box to get at the phase split as it comes in.

If you want to track individual circuits, you should be able to do it outside the box. It will work with single phase at least,but not sure about dual-phase; but those are usually reserved for heavy appliances like stoves and dryers.

ZeldaFreak ,
@ZeldaFreak@lemmy.world avatar

With a digital electric meter, I could read that out but I still have an old analog meter. But individually measuring devices is also appealing. HA allows for that. Opening the box would require an electrician and it only gives measurements per room or circuit. This may also be appealing to some.

I now look into ESP Home. I sadly didn't found a clamp meter here that works outside the distribution box or require lose mains power but ESP has the option for clamp meters

StefanT ,

I have the need for power metering only too.

I disabled the switch button on the plug so that they cannot be turned off by mistake. And set it to power on after power outage. Had no problems for a long time with this setup.

ZeldaFreak ,
@ZeldaFreak@lemmy.world avatar

Do updates switch the switch? I have Homematic IP plugs. They do work but had one update that switched my PC off but besides that, pretty reliable but expensive af. I don't want to take a chance with important devices. Sure I don't need to update the plugs but I have an urge to install updates.

StefanT ,

Hmm, good question. I think it is no problem. From an electrical point of view I think it would make sense that the relais power cycles when the plug reboots after an update. But I have not yet seen it do it.

JustEnoughDucks , in Compile errors with ESP32 Atom Echo
@JustEnoughDucks@feddit.nl avatar

on_tts_end: you have a media player component while you define a speaker instead. They are not interchangeable. It is likely trying to grab default values from somewhere because of that. Media player is better if you want the device to also play music or alerts through home assistant instead of voice assistant or some preset wav files.

Media player is also a speaker using an arduino library (not compatible with esp_adf as that uses the esp-idf framework and not arduino). If you want to use the media player, you have to get rid of vad_threshold and the esp_adf.

Please follow this yaml for an esp-idf config using the speaker instead of the media player: https://github.com/esphome/firmware/blob/main/voice-assistant/m5stack-atom-echo.yaml

mike_wooskey OP ,
@mike_wooskey@lemmy.thewooskeys.com avatar

Thanks for the help, @JustEnoughDucks.

I copied the yaml you suggested and made 2 changes:

I changed the i2s_dout_pin from GPIO22 to GPIO21:

speaker:
  - platform: i2s_audio
    id: echo_speaker
    i2s_dout_pin: GPIO21
    dac_type: external
    mode: mono

...and added my on_tts_end with the media_player:

  on_tts_end:
    - homeassistant.service:
        service: media_player.play_media
        data:
          entity_id: media_player.${media_player}
          media_content_id: !lambda 'return x;'
          media_content_type: music
          announce: "false"

This did compile and the audio output from the echo is played on the media_player, but the audio is also played on the Echo itself. Previously, changing the i2s_dout_pin from GPIO22 to GPIO21 prevented the Echo from playing the audio (I think by directing audio data to pin 21, which is not used).

I'm not sure what you meant here:

Media player is also a speaker using an arduino library (not compatible with esp_adf as that uses the esp-idf framework and not arduino). If you want to use the media player, you have to get rid of vad_threshold and the esp_adf.

I tried removing "vad_threshold: 3" and the "esp_adf" component:

external_components:
  - source: github://pr#5230
    components:
    refresh: 0s
  - source: github://jesserockz/esphome-components
    components: [file]
    refresh: 0s

...but with the same result: audio plays on both the media_player and the Echo's speaker.

Instead of trying to prevent the audio from getting to the Echo's speaker, is there a way to just turn the Echo's speaker volume to zero?

JustEnoughDucks ,
@JustEnoughDucks@feddit.nl avatar

Sorry, I misunderstood what you are trying to do here. I thought you were trying to use the Atom Echo itself as a media player. Disregard that arduino library comment, it isn't relevant. I just watched the video since I couldn't earlier.

Indeed what you are doing should work. Are you certain that the upload was successful? With GPIO21 set as the speaker output, the speaker data should absolutely not work. The fact that it does means that somewhere along the line, the GPIO22 is set as the speaker output.

mike_wooskey OP , (edited )
@mike_wooskey@lemmy.thewooskeys.com avatar

(sorry about my delayed response, @JustEnoughDucks )

I'm sure that the install is successful because there are no errors during/after install, the Echo recognizes speech and interacts with Home Assistant, and when I change something in the yaml (e.g., which media player to pipe the audio to) the change takes effect.

Here's something weird: I believe the default pin for "speaker" should be GPIO22, and when I switch it to GPIO21 it should not work. This works on some of my Echos, but not all of them!

Also weird: I think the standard pinout is:

  • GPIO0: Button (Boot)
  • GPIO19: LED (RGB)
  • GPIO21: I2C SDA
  • GPIO22: I2C SCL
  • GPIO23: Speaker (PWM output)
  • GPIO25: Microphone (Analog input)

Though I don't know what these mean, I tried setting "speaker" to GPIO18 - which apparently isn't used- and still the audio comes out of the Echo speaker! But again, only on some of my Echos.

I'd think that maybe some of these Echos are ignoring the GPIO setting for "speaker" and using a default, but these Echos used to work! (that is, they used to not play audio out of the Echo speaker when "speaker" was GPIO21). And so I want to think that maybe the ESPHome upgrade made them stop working, but all my Echos have the same upgrade and yet still some of them work.

Is there a way to config the Echo speaker to have zero volume? If so, I could just set that and then who cares if the audio is piped to it.

mike_wooskey OP ,
@mike_wooskey@lemmy.thewooskeys.com avatar

FYI, here's the config yaml I'm copy-pasting for all my Echos. The only thing that changes are in the "substitutions" section:

substitutions:
  name: m5stack-echo-kitchen
  friendly_name: M5Stack Atom Echo - Kitchen
  media_player: kitchen_speaker
  encryption_key: !secret kitchen_encryption_key
  speaker_i2s_dout_pin: "GPIO21"

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}
  project:
    name: m5stack.atom-echo-voice-assistant
    version: "1.0"
  min_version: 2024.6.0

esp32:
  board: m5stack-atom
  framework:
    type: esp-idf

api:
  encryption:
    key: ${encryption_key}

ota:
  - platform: esphome
    id: ota_esphome

dashboard_import:
  package_import_url: github://esphome/firmware/voice-assistant/m5stack-atom-echo.yaml@main

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  on_connect:
    - delay: 5s  # Gives time for improv results to be transmitted
    - ble.disable:
  on_disconnect:
    - ble.enable:
  ap:

improv_serial:

esp32_improv:
  authorizer: none

button:
  - platform: factory_reset
    id: factory_reset_btn
    name: Factory reset

i2s_audio:
  - id: i2s_audio_bus
    i2s_lrclk_pin: GPIO33
    i2s_bclk_pin: GPIO19

microphone:
  - platform: i2s_audio
    id: echo_microphone
    i2s_din_pin: GPIO23
    adc_type: external
    pdm: true

speaker:
  - platform: i2s_audio
    id: echo_speaker
    i2s_dout_pin: ${speaker_i2s_dout_pin}
    dac_type: external
    mode: mono

voice_assistant:
  id: va
  microphone: echo_microphone
  speaker: echo_speaker
  noise_suppression_level: 2
  auto_gain: 31dBFS
  volume_multiplier: 2.0
  on_listening:
    - light.turn_on:
        id: led
        blue: 100%
        red: 0%
        green: 0%
        effect: "Slow Pulse"
  on_stt_vad_end:
    - light.turn_on:
        id: led
        blue: 100%
        red: 0%
        green: 0%
        effect: "Fast Pulse"
  on_tts_start:
    - light.turn_on:
        id: led
        blue: 100%
        red: 0%
        green: 0%
        brightness: 100%
        effect: none
  on_tts_end:
    - homeassistant.service:
        service: media_player.play_media
        data:
          entity_id: media_player.${media_player}
          media_content_id: !lambda 'return x;'
          media_content_type: music
          announce: "false"
  on_end:
    - delay: 100ms
    - wait_until:
        not:
          speaker.is_playing:
    - script.execute: reset_led
  on_error:
    - light.turn_on:
        id: led
        red: 100%
        green: 0%
        blue: 0%
        brightness: 100%
        effect: none
    - delay: 1s
    - script.execute: reset_led
  on_client_connected:
    - if:
        condition:
          switch.is_on: use_wake_word
        then:
          - voice_assistant.start_continuous:
          - script.execute: reset_led
  on_client_disconnected:
    - if:
        condition:
          switch.is_on: use_wake_word
        then:
          - voice_assistant.stop:
          - light.turn_off: led
  on_timer_finished:
    - voice_assistant.stop:
    - switch.turn_on: timer_ringing
    - wait_until:
        not:
          microphone.is_capturing:
    - light.turn_on:
        id: led
        red: 0%
        green: 100%
        blue: 0%
        brightness: 100%
        effect: "Fast Pulse"
    - while:
        condition:
          switch.is_on: timer_ringing
        then:
          - lambda: id(echo_speaker).play(id(timer_finished_wave_file), sizeof(id(timer_finished_wave_file)));
          - delay: 1s
    - wait_until:
        not:
          speaker.is_playing:
    - light.turn_off: led
    - switch.turn_off: timer_ringing
    - if:
        condition:
          switch.is_on: use_wake_word
        then:
          - voice_assistant.start_continuous:
          - script.execute: reset_led

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO39
      inverted: true
    name: Button
    disabled_by_default: true
    entity_category: diagnostic
    id: echo_button
    on_multi_click:
      - timing:
          - ON for at least 50ms
          - OFF for at least 50ms
        then:
          - if:
              condition:
                switch.is_on: timer_ringing
              then:
                - switch.turn_off: timer_ringing
              else:
                - if:
                    condition:
                      switch.is_off: use_wake_word
                    then:
                      - if:
                          condition: voice_assistant.is_running
                          then:
                            - voice_assistant.stop:
                            - script.execute: reset_led
                          else:
                            - voice_assistant.start:
                    else:
                      - voice_assistant.stop
                      - delay: 1s
                      - script.execute: reset_led
                      - script.wait: reset_led
                      - voice_assistant.start_continuous:
      - timing:
          - ON for at least 10s
        then:
          - button.press: factory_reset_btn

light:
  - platform: esp32_rmt_led_strip
    id: led
    name: None
    disabled_by_default: true
    entity_category: config
    pin: GPIO27
    default_transition_length: 0s
    chipset: SK6812
    num_leds: 1
    rgb_order: grb
    rmt_channel: 0
    effects:
      - pulse:
          name: "Slow Pulse"
          transition_length: 250ms
          update_interval: 250ms
          min_brightness: 50%
          max_brightness: 100%
      - pulse:
          name: "Fast Pulse"
          transition_length: 100ms
          update_interval: 100ms
          min_brightness: 50%
          max_brightness: 100%

script:
  - id: reset_led
    then:
      - if:
          condition:
            - switch.is_on: use_wake_word
            - switch.is_on: use_listen_light
          then:
            - light.turn_on:
                id: led
                red: 100%
                green: 89%
                blue: 71%
                brightness: 60%
                effect: none
          else:
            - light.turn_off: led

switch:
  - platform: template
    name: Use wake word
    id: use_wake_word
    optimistic: true
    restore_mode: RESTORE_DEFAULT_ON
    entity_category: config
    on_turn_on:
      - lambda: id(va).set_use_wake_word(true);
      - if:
          condition:
            not:
              - voice_assistant.is_running
          then:
            - voice_assistant.start_continuous
      - script.execute: reset_led
    on_turn_off:
      - voice_assistant.stop
      - lambda: id(va).set_use_wake_word(false);
      - script.execute: reset_led
  - platform: template
    name: Use listen light
    id: use_listen_light
    optimistic: true
    restore_mode: RESTORE_DEFAULT_ON
    entity_category: config
    on_turn_on:
      - script.execute: reset_led
    on_turn_off:
      - script.execute: reset_led
  - platform: template
    id: timer_ringing
    optimistic: true
    internal: true
    restore_mode: ALWAYS_OFF
    on_turn_on:
      - delay: 15min
      - switch.turn_off: timer_ringing

external_components:
  - source: github://pr#5230
    components:
    refresh: 0s
  - source: github://jesserockz/esphome-components
    components: [file]
    refresh: 0s

file:
  - id: timer_finished_wave_file
    file: https://github.com/esphome/firmware/raw/main/voice-assistant/sounds/timer_finished.wav

logger:
JustEnoughDucks , (edited ) in Wyoming Satellites - What's your go-to purchase?
@JustEnoughDucks@feddit.nl avatar

I am making an esphome system for my old Yamaha AV receiver. RCA out via a cheap i2s chip, mems I2S mic in the enclosure that can hear well enough in the room, and an IR blaster output to change the AV receiver channel to the esp when voice is activated and change it back after.

Cool side effect is that it can also be used as an HA media player for streaming Spotify and local music to the speaker system.

scrubbles OP ,
@scrubbles@poptalk.scrubbles.tech avatar

This sounds like a good solution for my receiver too, I want some satellites around the house but I was wondering how I would hook it up to the main system

SteadyGoLucky , (edited ) in Trigger when ChromeCast change from ON to OFF only

Just specify from: on and to: off in the trigger. You can have both!

I don't know your automation format very well. My automations use a state trigger with from: and to:

thegreekgeek ,
@thegreekgeek@midwest.social avatar

Yeah it looks like OP is using the device actions instead of dealing with the entity directly.

rambos OP ,

You are right, its working fine now. Wasnt aware that from/to was implemented. Thx

Cyber , (edited ) in Home Assistant 2024.7: Time to resize your cards!

Yeah... I've been trying out the resizable cards and... well... hopefully the next version will be better.

Don't get me wrong, I'm all for incremental improvements and that means we need a Step1 somewhere.

I wanted to just change one dashboard, but there's no migration option (yet?) which is fair enough, so I created a new one and tried copying over cards...

I have a couple of Glance cards with a title and I can't really get a single row of icons with title to line up nicely unless I use a 3-row card...

But, it's also nice to slim down a Graph card to just 2 or 3 columns wide if it's a short-duration graph.

I look forward to the next revision.

ohlaph ,

Fingers crossed for you.

wildbus8979 , in In-wall light switch recommendations

Can't believe no one has mentioned Inovelli yet. Developed with the community, with OTA support in Z2M, they are absolutely fantastic and incredibly flexible!

https://inovelli.com/ blue series

doodlebob ,

I also suggest inovelli, they're solid

asbestos , (edited )
@asbestos@lemmy.world avatar

Sucks that they’re US/Canada only

  • All
  • Subscribed
  • Moderated
  • Favorites
  • incremental_games
  • random
  • homeassistant@lemmy.world
  • meta
  • All magazines