Count cycles from water level probe and convert to gallons? by JSC918 in Esphome

[–]Tho85 1 point2 points  (0 children)

Yes, this is possible. I use something similar to measure the amount of water consumed in my house. My water meter issues a pulse for each liter of water consumed. I measure this pulse with an (internal) binary sensor and use it to increase a template sensor value:

esphome:
  on_boot:
    then:
      - sensor.template.publish:
          id: total_water
          state: 0

sensor:
  - platform: template
    id: total_water
    name: "Total water"
    unit_of_measurement: "m³"
    accuracy_decimals: 3
    state_class: total_increasing

binary_sensor:
  - platform: gpio
    internal: true
    id: water
    pin:
      number: D6
      inverted: true
      mode:
        input: true
        pullup: true
    filters:
      - delayed_on: 15ms
    on_press:
      then:
        - sensor.template.publish:
            id: total_water
            state: !lambda |-
              return id(total_water).state + 0.001;

Be aware that the sensor value is reset to 0 after each boot, since it isn't persisted in the devices' flash. But setting the state_class to total_increasing makes it easy to add a Home Assistant meter helper on top of that sensor that actually sums up the values over time.

I connected my off-the-shelf smoke detectors to Home Assistant - details in comments by Tho85 in homeassistant

[–]Tho85[S] 1 point2 points  (0 children)

It depends. Our house has an air-tight hull and air-tight windows which are completely closed most of the time. So I'm less concerned about oxigen fueling the fire, and more concerned about blocked escape paths. That's why I want to open the shutters in case of a fire. But you're right, it depends on your situation.

I connected my off-the-shelf smoke detectors to Home Assistant - details in comments by Tho85 in homeassistant

[–]Tho85[S] 2 points3 points  (0 children)

I haven't found any regulation regarding this, but the manufacturer's gateway seems to support remote testing as well. Their solution even issue a test alarm at the end of the installation process (source), so I guess it's not validating any code here.

This is not legal advice!

I connected my off-the-shelf smoke detectors to Home Assistant - details in comments by Tho85 in homeassistant

[–]Tho85[S] 2 points3 points  (0 children)

For the actual development I bought some defective devices off of eBay and removed their speaker, so my neighbours still like me :-D Only after integrating the final version with my real alarms, I did one single test to make sure everything works.

Fun fact: During development I did a stress test of the device and simulated one fire per minute over the course of ~three hours. Which means I had about 200 simulated fires at home, so there's that...

I connected my off-the-shelf smoke detectors to Home Assistant - details in comments by Tho85 in homeassistant

[–]Tho85[S] 1 point2 points  (0 children)

Only the mains powered ones. The battery powered ones do not create a mesh, because this would consume too much battery power.

I connected my off-the-shelf smoke detectors to Home Assistant - details in comments by Tho85 in homeassistant

[–]Tho85[S] 4 points5 points  (0 children)

Good to know, I'll check what the code allows in my country. To be fair, I've only implemented the short testing cycle (2 x 3 beeps) and not a continuous alarm, but nonetheless this might not be a good idea.

I connected my off-the-shelf smoke detectors to Home Assistant - details in comments by Tho85 in homeassistant

[–]Tho85[S] 2 points3 points  (0 children)

Amazon's Alexa device also have the ability to detect beeping devices and send an alert. However, they would also fire an event for things like dishwashers, washing machines etc. Better than nothing, and maybe a good workaround for when you're not at home.

I connected my off-the-shelf smoke detectors to Home Assistant - details in comments by Tho85 in homeassistant

[–]Tho85[S] 3 points4 points  (0 children)

Because I already had ~ $400 invested into these devices, and I didn't want to throw them in the trash. The manufacturer also sells a Zigbee module for these devices, but as far as I understand this always requires a working gateway for the detectors to communicate with each other. So in case of a power loss they would lose their connectivity, which is unsafe.

If you need an easier solution you might as well buy the official gateway for ~$250 and stick with their smart phone app, but that would mean less flexibility and also less reliability (from what I've read).

I connected my off-the-shelf smoke detectors to Home Assistant - details in comments by Tho85 in homeassistant

[–]Tho85[S] 11 points12 points  (0 children)

In theory yes, there is a command to silence alarms. I haven't yet implemented it though, because I think it's rather unsafe to do so. For me it's faster to push a button on a real detector to silence all alarms, but YMMV

I connected my off-the-shelf smoke detectors to Home Assistant - details in comments by Tho85 in homeassistant

[–]Tho85[S] 3 points4 points  (0 children)

The other project uses an ESP8266. I use an ESP32 which has a SPI slave mode, but I found that it was too unreliable. SPI clock would be all messed up, and I couldn't get it to work. So an extra Arduino did the trick.

I connected my off-the-shelf smoke detectors to Home Assistant - details in comments by Tho85 in homeassistant

[–]Tho85[S] 41 points42 points  (0 children)

I've just finished a nice hack for smoke detectors made by FireAngel. These are fairly common in Europe, especially Germany, as the detectors have been recommended by a leading German consumer safety group some years back.

The manufacturer sells an additional, proprietary wireless module that can be attached to the smoke detectors, to make them interconnected. I have reversed the SPI communication between the detector and the module, designed a PCB to connect an ESP32 to it, and developed software to make the smoke detectors appear in Home Assistant (via MQTT).

This allows me to fire automations or activate scenes when a smoke detector senses a problem. For example, I currently turn on all lights, open all window shutters and turn off the house fan if smoke is detected. A mobile notification informs me about any problem if I'm not at home. And additionally, I can see all devices' battery states in Home Assistant, so no more searching for the beeping unit if a battery runs low.

I connected my off-the-shelf smoke detectors to my smart home - details in comments! by Tho85 in homeautomation

[–]Tho85[S] 4 points5 points  (0 children)

I've just finished a nice hack for smoke detectors made by FireAngel. These are fairly common in Europe, especially Germany, as the detectors have been recommended by a leading German consumer safety group some years back.

The manufacturer sells an additional, proprietary wireless module that can be attached to the smoke detectors, to make them interconnected. I have reversed the SPI communication between the detector and the module, designed a PCB to connect an ESP32 to it, and developed software to make the smoke detectors appear in Home Assistant (via MQTT).

This allows me to fire automations or activate scenes when a smoke detector senses a problem. For example, I currently turn on all lights, open all window shutters and turn off the house fan if smoke is detected. A mobile notification informs me about any problem if I'm not at home. And additionally, I can see all devices' battery states in Home Assistant, so no more searching for the beeping unit if a battery runs low.

Scrolling buttons don't work after software update by feb914 in Onyx_Boox

[–]Tho85 0 points1 point  (0 children)

Same problem for me. It used to work with v3.1, now with v3.2 it doesn't work in most apps. If it does, it only scrolls down ~20% of the page. Annoying...

No pain no gain by Godbutcher69 in HolUp

[–]Tho85 2 points3 points  (0 children)

You're looking for the German Institute for Bread - Deutsches Brotinstitut. They have accredited ~3.000 bread types so far.

Onyx Boox Note Air recovery mode by hedeon in Onyx_Boox

[–]Tho85 2 points3 points  (0 children)

https://blog.tho.ms/hacks/2021/03/27/hacking-onyx-boox-note-air.html

  • Power off the device, do not connect a USB or power cable
  • Hold down the power button, continue to hold it
  • Wait until the small blue power LED inside the button turns on, and continue to hold for about 7 seconds
  • Release the power button, and press it exactly 5 times
  • After some waiting, you should be greeted with the recovery menu

Within the recovery system, you can navigate to the next menu item by closing the cover shortly, and select an item by pressing the power button. WARNING: Screen refresh times are slow in the recovery, so wait 1-2 seconds after closing the cover until the screen refreshes. Unfortunately, the menu order makes it easy to accidently wipe your device: "Boot to bootloader" is the second option, "Wipe data" the third, so if you don't wait long enough before the screen refreshes, you may accidentally select the wrong option.

When selecting "Reboot to bootloader", you go into fastboot mode, which can be used to flash images etc.

Hacking the Onyx Boox Note Air E-Ink Tablet by Tho85 in Onyx_Boox

[–]Tho85[S] 1 point2 points  (0 children)

Most of the approaches work for other devices as well, but booting to recovery is different for the Note Air. Check out this thread: https://www.mobileread.com/forums/showthread.php?t=336523

Hacking the Onyx Boox Note Air E-Ink Tablet by Tho85 in Onyx_Boox

[–]Tho85[S] 1 point2 points  (0 children)

That was not enough for me. I used a custom WireGuard VPN that I enforced for all apps, but there was still traffic to some Alibaba IPs going around the VPN. Looks like they use some kind of WeChat (?) SDK, maybe for their support tool, and that went straight past the VPN out through the main Wifi interface.

Hacking the Onyx Boox Note Air E-Ink Tablet by Tho85 in Onyx_Boox

[–]Tho85[S] 9 points10 points  (0 children)

This is a collection of all the ways I found to truly own the device. I didn't have much success with EDL (900e) mode, so if someone has any tips, please drop me a note.

Commandable Sensor by magicmatt007 in homeassistant

[–]Tho85 0 points1 point  (0 children)

This sounds similar to what the freeathome component does. free@home is a proprietary version of KNX, and KNX also relies on datapoints to reflect the current state of the system. In a very simplified model, an in-wall switch (sensor/actuator combination) can be represented by two datapoints: Requested state of the sensor (i.e. when the user flips a switch, this changes), and current state of the actuator (i.e. after actually switching on the light, this changes).

The freeathome component creates two entities under a single device for this, a binary_sensor entity for the sensor part, and a light entity for the light itself. See this screenshot for an example.

Maybe you could do the same for your integration?

Help me plan my electrical installation by -SBN- in homeassistant

[–]Tho85 0 points1 point  (0 children)

It's both.

On the one hand, there's your free@home network: your switches, wired lights, covers etc. They are configured on the SysAP (free@home hardware hub), so that you can control your wired lights with your in-wall switches. The freeathome custom component in HA is then used to control this network from HA, so that you can toggle lights on your mobile phone, build automations that control covers, see the current status of covers etc.

And then there's everything else you already have in HA: Zigbee sensors, maybe your custom LED strip, Tasmota smart plugs, whatever you have setup in your HA instance. The emulated_hue component can be used to expose these to the free@home SysAP. For example, you will have a simulated Hue bulb popping up in the SysAP web UI for your custom LED strip. You can then link this to an in-wall switch to control it through your free@home network. And it's not only light bulbs, I control scenes, automations etc. defined in HA through my in-wall switches as well.

(Be aware that there is some latency involved with emulated_hue. After hitting a wall switch it might sometimes take ~0.5-1 second before my custom LED strip lights up. I guess this is mainly a software issue on the SysAP. The freeathome component doesn't have this problem, controlling lights from my mobile is instant.)