Home Assistant

399 readers
1 users here now

Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY...

founded 2 years ago
MODERATORS
126
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/Final-Hunt-3305 on 2025-06-01 11:59:44+00:00.


Hello everyone,

I'm going to create a security system for my sister house

I want some ideas to be sure I going in the right way

(I was thinking about external camera (with an UPS for the server, and POE the cameras)

Doors and windows opening sensor (ziggbee or matter?)

An alarm based on a trigger from HA ? and basically everything centralized on the HA (is a Pi5 enought?)

So what have you installed at your places ?

127
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/gafonid on 2025-05-31 21:54:40+00:00.

128
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/Last-Toe-6801 on 2025-05-31 19:02:06+00:00.

129
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/joer14 on 2025-05-31 18:16:50+00:00.

130
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/katschung on 2025-05-31 20:53:55+00:00.

131
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/mrpink57 on 2025-05-31 20:41:15+00:00.

132
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/awkward_ardvark on 2025-05-31 16:16:38+00:00.

133
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/ForsakenSyllabub8193 on 2025-05-31 16:14:18+00:00.


Hello everyone on r/homeassistant,

I've been on a mission to escape the closed ecosystems of voice assistants like Alexa, and that led me to build my own open-source solution: Spark. It's a Python-based voice assistant designed specifically for Raspberry Pi and deeply integrated with Home Assistant.

From the very beginning, I wanted Spark to resonate with Home Assistant users. It leverages the homeassistant_api Python library for smart home control, all contained within a single, easy-to-understand Python script.

Here's a breakdown of Spark's current capabilities:

  • Smart AI: Powered by Gemini (free tier) for intelligent responses.
  • Customizable Wake Word: Uses OpenWakeWord (OWW) with "Hey Rhasspy" as the default.
  • Real-time Weather: Fetches data via the OpenWeatherMap API.
  • Core Utilities: Handles simple requests like telling the time or a joke.
  • Visual Intelligence: Basic Image Recognition capabilities.
  • Personal Organizer: A simple to-do/remember list feature.
  • Media Playback: Includes song playing (currently relies on yt-dlp and needs improvement).
  • Knowledge Base: Can query Wikipedia.
  • Time Management: Features for setting alarms (also a work in progress).

My goal with Spark is to provide a highly customizable and simple voice assistant that's easy to edit and mold . It's not a finished product, but it's very much usable and a great starting point for anyone looking to truly own their voice assistant.

You can find the full code and documentation on my GitHub:https://github.com/aryanhasgithub/AIspark

I've also put together a short YouTube video showcasing Spark in action:(This video demonstrates its current state, not a setup tutorial.)https://www.youtube.com/watch?v=Unvm%5C%5C_l18XAI

While many projects shared here are incredibly robust, Spark is a humble beginning—a single script with room to grow. I strongly encourage anyone with basic Python knowledge and API familiarity to fork it, tinker with it, and share your improvements!

For example, if you have Spotify Premium, swapping out yt-dlp for spotipy for music playback would be a fantastic enhancement.

I'm keen to collaborate with others to refine Spark and potentially evolve it into something bigger. All feedback is welcome!

134
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/Brummiesteven on 2025-05-31 15:07:41+00:00.


Hey, I want to move off a family of Google home assistants to HA Voice.

The biggest issue though, and really the only reason we use Google home, is my wife loses her phone multiple times a day.

At the moment she can just say ok Google find my phone, it recognises her voice and starts an alarm on her phone only.

Is this function repeatable in HA? I don't mind so much if the voice recognition isn't there as I never use this feature but being able to say ok Nabu find my phone and have the phone ring is somewhat essential.

135
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/igmyeongui on 2025-05-31 11:41:15+00:00.


Before I close the walls I’m running electrical and Ethernet lines to where the speakers will be at. Is there anything else I should be thinking of before closing the walls?

Everything else is done, cameras, rooms, etc.

Must be compatible with home assistant.

I don’t want something hacky. I want something that works well and doesn’t need troubleshooting every so often.

136
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/T-LAD_the_band on 2025-05-30 21:43:49+00:00.


I've got a round display i'm currently building (inside a Sony ST80, coming soon) and I also have an Nspanel as my main living room dashboard. this is my main one when nothing is happening in the house:

https://preview.redd.it/8g3qo1sloz3f1.png?width=658&format=png&auto=webp&s=0cb1dd9e74adb2034f3b038140dc234c4d6eb035

show me your "not so average" dashboard! and extra kudos for round displays or info on desiging for round display (that is not about watches ;-)

thank you for your inspiration!

137
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/chicknlil25 on 2025-05-30 17:20:12+00:00.

138
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/ForsakenSyllabub8193 on 2025-05-30 14:38:54+00:00.


Hey everyone! I just wanted to share my recent deep dive into integrating my Alpha BT bathroom scale with Home Assistant, using an ESP32 and ESPHome. Full disclosure: I'm pretty new to Bluetooth protocols, so if you spot something that could be done better or more efficiently, please, please let me know! My goal here is to help others who might be facing similar challenges with unsupported devices and to get some feedback from the community.

I picked up a "smart" scale (the Alpha BT) for basic weight tracking. As soon as I got it, the usual story unfolded: a proprietary app demanding every permission, cloud-only data storage, and zero compatibility with Home Assistant. Plus, it wasn't supported by well-known alternatives like OpenScale. That's when I decided to roll up my sleeves and see if I could wrestle my data back into my own hands.

Step 1: Sniffing Out the Bluetooth Communication with nRF Connect

My first move was to understand how the scale was talking to its app. I thought nRF Connect Android app would work but since my scale only advertised when i stood on it it dint work instead i had to go to the alpha bt app and then get the mac from there then go to my ras pi and using btmon i had to filter for that mac and see the signals.

The logs were a waterfall of hex strings, but after some observation, a pattern emerged: a single hex string was broadcast continuously from the scale.(i used gemini 2.5 pro for this as it was insanely complicated so it did a good job)

It looked something like this (your exact string might vary, but the structure was key):

XX-XX-XX-XX-XX-XX-XX-XX-XX-XX-XX-XX (I'm using placeholders for the fixed parts)

Watching the logs, three key things became apparent:

  • Most of the bytes stayed constant.
  • Specific bytes changed frequently. For my scale, the 9th and 10th bytes in the sequence (data.data[8] and data.data[9] if we start counting from 0) were constantly updating. Converting these two bytes (big-endian) to decimal and dividing by 100 gave me the accurate weight in kilograms.
  • The 3rd byte (data.data[2]) was interesting. It seemed to toggle between values like 01, 02, and 03. When the weight was stable, this byte consistently showed 02. This was my indicator for stability.
  • I also found a byte for battery percentage (for me, it was data.data[4]). This might differ for other scales, so always double-check with your own device's advertisements!

I didn't bother trying to figure out what every single byte did, as long as I had the crucial weight, stability, and battery data. The main goal was to extract what I needed!

Step 2: Crafting the ESPHome Configuration

With the data points identified, the next challenge was getting them into Home Assistant. ESPHome on an ESP32 seemed like the perfect solution to act as a BLE bridge. After much trial and error, piecing together examples, and a lot of Googling, I came up with this YAML configuration:

esphome:
  name: alpha-scale-bridge
  friendly_name: Alpha BT Scale Bridge

# NEW: ESP32 Platform definition (important for newer ESPHome versions)
esp32:
  board: esp32dev
  # You can optionally specify the framework, Arduino is the default if omitted.
  # framework:
  #   type: arduino

# WiFi Configuration
wifi:
  ssid: "YOUR_WIFI_SSID" # Replace with your WiFi SSID
  password: "YOUR_WIFI_PASSWORD" # Replace with your WiFi Password

  # Fallback hotspot in case main WiFi fails
  ap:
    ssid: "Alpha-Scale-Bridge"
    password: "12345678"

# Enable captive portal for easier initial setup if WiFi fails
captive_portal:

# Enable logging to see what's happening
logger:
  level: INFO

# Enable Home Assistant API (no encryption for simplicity, but encryption_key is recommended for security!)
api:

ota:
  platform: esphome

# Web server for basic debugging (optional, can remove if not needed)
web_server:
  port: 80

# BLE Tracker configuration and data parsing
esp32_ble_tracker:
  scan_parameters:
    interval: 1100ms # How often to scan
    window: 1100ms   # How long to scan within the interval
    active: true     # Active scanning requests scan response data
  on_ble_advertise:
    # Replace with YOUR scale's MAC address!
    - mac_address: 11:0C:FA:E9:D8:E2
      then:
        - lambda: |-
            // Loop through all manufacturer data sections in the advertisement
            for (auto data : x.get_manufacturer_datas()) {
              // Check if the data size is at least 13 bytes as expected for our scale
              if (data.data.size() >= 13) {
                // Extract weight from the first two bytes (bytes 0 and 1, big-endian)
                uint16_t weight_raw = (data.data[0] << 8) | data.data[1];
                float weight_kg = weight_raw / 100.0; // Convert to kg (e.g., 8335 -> 83.35)

                // Extract status byte (byte 2)
                uint8_t status = data.data[2];
                bool stable = (status & 0x02) != 0; // Bit 1 indicates stability (e.g., 0x02 if stable)
                bool unit_kg = (status & 0x01) != 0; // Bit 0 might indicate unit (0x01 for kg, verify with your scale)

                // Extract sequence counter (byte 3)
                uint8_t sequence = data.data[3];

                //
***
Battery data extraction (YOU MAY NEED TO ADJUST THIS FOR YOUR SCALE)
***
                // Assuming battery percentage is at byte 4 (data.data[4])
                if (data.data.size() >= 5) { // Ensure the data is long enough
                    uint8_t battery_percent = data.data[4];
                    id(alpha_battery).publish_state(battery_percent);
                }
                // ---------------------------------------------------------------------

                // Only update sensors if weight is reasonable (e.g., > 5kg to filter noise) and unit is kg
                if (weight_kg > 5.0 && unit_kg) {
                  id(alpha_weight).publish_state(weight_kg);
                  id(alpha_stable).publish_state(stable);

                  // Set status text based on 'stable' flag
                  std::string status_text = stable ? "Stable" : "Measuring";
                  id(alpha_status).publish_state(status_text.c_str());

                  // Update last seen timestamp using Home Assistant's time
                  id(alpha_last_seen).publish_state(id(homeassistant_time).now().strftime("%Y-%m-%d %H:%M:%S").c_str());

                  // Log the reading for debugging in the ESPHome logs
                  ESP_LOGI("alpha_scale", "Weight: %.2f kg, Status: 0x%02X, Stable: %s, Seq: %d, Battery: %d%%",
                                   weight_kg, status, stable ? "Yes" : "No", sequence, battery_percent);
                }
              }
            }

# Sensor definitions for Home Assistant to display data
sensor:
  - platform: template
    name: "Alpha Scale Weight"
    id: alpha_weight
    unit_of_measurement: "kg"
    device_class: weight
    state_class: measurement
    accuracy_decimals: 2
    icon: "mdi:scale-bathroom"

  - platform: template
    name: "Alpha Scale Battery"
    id: alpha_battery
    unit_of_measurement: "%"
    device_class: battery
    state_class: measurement
    icon: "mdi:battery"

binary_sensor:
  - platform: template
    name: "Alpha Scale Stable"
    id: alpha_stable
    device_class: connectivity # Good choice for stable/unstable state

text_sensor:
  - platform: template
    name: "Alpha Scale Status"
    id: alpha_status

  - platform: template
    name: "Alpha Scale Last Seen"
    id: alpha_last_seen

# Time component to get current time from Home Assistant for timestamps
time:
  - platform: homeassistant
    id: homeassistant_time

Explaining the ESPHome Code in Layman's Terms:

  1. esphome: and esp32:: This sets up the basic info for our device and tells ESPHome we're using an ESP32 board. A recent change meant platform: ESP32 moved from under esphome: to its own esp32: section.
  2. wifi:: Standard Wi-Fi setup so your ESP32 can connect to your home network. The ap: section creates a temporary Wi-Fi hotspot if the main connection fails, which is super handy for initial setup or debugging.
  3. api:: This is how Home Assistant talks to your ESP32. I've kept it simple without encryption for now, but usually, an encryption_key is recommended for security.
  4. esp32_ble_tracker:: This is the heart of the BLE sniffing. It tells the ESP32 to constantly scan for Bluetooth advertisements.
    • on_ble_advertise:: This is the magic part! It says: "When you see a Bluetooth advertisement from a specific MAC address (your scale's), run this custom C++ code."
    • lambda:: This is where our custom C++ code goes. It iterates through the received Bluetooth data.
      • data.data[0], data.data[1], etc., refer to the individual bytes in the raw advertisement string.
      • The (data.data[0] << 8) | data.data[1] part is a bit shift. In super simple terms, this takes two 8-bit numbers (bytes) and combines them into a single 16-bit number. Think of it like taking the first two digits of a two-digit number (e.g., 83 from 8335) and making it the first part of a bigger number, then adding the next two digits (35) to form 8335. It's how two bytes are read as one larger v...

Content cut off. Read original on https://old.reddit.com/r/homeassistant/comments/1kz5w7j/how_i_hacked_my_smart_weighing_scale_to_work_with/

139
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/daftest_of_dutch on 2025-05-30 12:26:17+00:00.


I use voice a lot. two atom echos and a PE. nabu casa cloud and google AI.

I can check the news (local rss feeds and html2txt script that can handle a cookie wall) control my music send emails, whatsapp sms. public transport information. city night agenda and lots more. Hell home assistant can even help me keeping my linux servers stable.

Here some thing i learned that i think is good practice.

  1. Use scripts. when call a sentence triggered automation.

The standard out of the box voice isnt that well. you want to make commands based on your preferred words. (or room depended commands for example) You can make all functionality in the automation.

But i recommend to use scripts. end a script with stop. and return a variable. in {'setting':'value'} json format.

this way the automation can use the script with feed back. and It is also usable for AI if you want to use that. With out redundant code.

  1. Use scripts. The same script you wrote for the automation can be used by AI. just explain the script using the description and set the input variables description. Most scripts are used by the AI with out editing the AI system prompt.

  2. Use scripts

Don't setup dynamic content in the AI prompt but make the AI use scripts to get any dynamic information.

If you setup some yaml in the system prompt.

The AI is bad at understanding the info is updated all the time. Except if you use an script. to get the information and then it always uses the current information. (you might need to explain that the script needs to always be executed with out asking in some circumstances)

  1. If you use cloud services make a local fail over.

You can use binary_sensor.remote_ui or a ping to 8.8.8.8 to check online status of home assistant.

and you can make a automation that turns the (voice) system into offline state. By selecting a other voice agent in the voice assistants.

you can also label voice automatons to only work in offline mode. To many voice automatons limit the flexibility to talking to AI. But if the AI is not reachable you still want to live in the 21 century and use voice.

So you have the flexibility of AI not blocked by fixed commands when online. but it works if you say fixed commands when offline.

  1. Be aware of the levenshtein function. The voice detection of home assistant isnt 100% But if you have a list with good answers you can use the levenshtein function. I use this for selecting artists, albums, getting linux servers searching phone and email of contacts.
140
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/Secret-Raspberry-937 on 2025-05-30 12:12:39+00:00.

141
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/ForsakenSyllabub8193 on 2025-05-30 12:01:13+00:00.


If you want a tutorial on how to put the dashboard on echo show i made a video for that :):https://www.youtube.com/watch?v=Ke1eeDrZC8E

I took "some" insparation from smarthomesolver.

https://preview.redd.it/09moowdosw3f1.png?width=1638&format=png&auto=webp&s=7f0d88dc78746327d86e31e482767ac83b9667a6

Pop up cards with bubble cards

142
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/BlankyForce on 2025-05-30 02:21:38+00:00.


I just setup my first presence sensor in the master bedroom. I've got basic lighting scenes setup, but would like to add some more creative automations. My favorite so far, simple as it might be, is that closet lights turn on when I step in front of them.

143
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/RoachForLife on 2025-05-29 21:41:05+00:00.


Finally got this stable and actually even trying v16 with face recognition, cool stuff. Just curious how everyone is utilizing automations or notifications with Frigate to get some ideas. Appreciate it!

144
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/OpenSOB on 2025-05-29 20:43:41+00:00.

145
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/souverainiste on 2025-05-29 23:15:42+00:00.

146
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/katx70 on 2025-05-29 17:12:45+00:00.

147
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/BryanHChi on 2025-05-29 12:36:54+00:00.

148
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/corganmurray on 2025-05-29 14:48:57+00:00.

149
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/krisniem on 2025-05-29 12:06:51+00:00.

150
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/a4ai on 2025-05-29 11:48:28+00:00.

view more: ‹ prev next ›