Git Product home page Git Product logo

Comments (9)

adonno avatar adonno commented on September 27, 2024

First I had to identify how to count the baby diapers.
I used an Aqara open/close sensor and stuck it to the axle, I had to identify a spot where it could easily be mounted and it would not be in the way of the mechanism.

from home-assistantconfig.

jcallaghan avatar jcallaghan commented on September 27, 2024

I love this. Such a simple application and use of these sensors. It's also a great example of proactive chore maintenance and I bet great for WAF πŸ˜‹

from home-assistantconfig.

adonno avatar adonno commented on September 27, 2024

I created a counter in Home-assistant to keep track of the diapers. and then an automation to increment it on every state change that is either close and open
(do not track EVERY state change since a disconnection or a battery update would increment the counter)

Counter

---
counter: 
  diaper_counter:
    initial: 0
    step: 1
    icon: mdi:emoticon-poop

Automation

---
- id: '1579629145305'
  alias: Increment diapers counter
  description: ''
  trigger:
  - entity_id: binary_sensor.openclose_19
    from: 'on'
    platform: state
    to: 'off'
  - entity_id: binary_sensor.openclose_19
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - entity_id: counter.diaper_counter
    service: counter.increment

from home-assistantconfig.

adonno avatar adonno commented on September 27, 2024

Whenever the bin is emptied the counter needs to be reset. I've thought about automating it but found no effective way to do it, so I just added an Aqara button which on a button press resets the counter via an automation

Automation:

- id: '1579629681167'
  alias: Reset diaper counter
  description: ''
  trigger:
  - device_id: 98bb594b8fff4e4ca78656d95a266519
    domain: deconz
    platform: device
    subtype: turn_on
    type: remote_button_short_press
  condition: []
  action:
  - entity_id: counter.diaper_counter
    service: counter.reset

from home-assistantconfig.

adonno avatar adonno commented on September 27, 2024

Whenever a defined threshold (15) has been reached a notification should be sent to our phones as well as on each additional item until the counter has been reset

Notifications
This is done via NodeRed

Threshold Reached

image

Counter Reset
image

from home-assistantconfig.

jcallaghan avatar jcallaghan commented on September 27, 2024

Do you need to lift the lid to empty it? If so could you automate based on the sensor being open for a period longer than you would when normally using it?

from home-assistantconfig.

adonno avatar adonno commented on September 27, 2024

Do you need to lift the lid to empty it? If so could you automate based on the sensor being open for a period longer than you would when normally using it?

Yes but i can’t take that into account or i’d have to add a second open/close sensor Since the bin works in both positions so
Open -> 1st diaper
Close -> 2nd diaper
Open -> 3rd diaper

And so on

from home-assistantconfig.

adonno avatar adonno commented on September 27, 2024

Display diaper count on switch
This one is a bit more tricky to explain. The bin stands next to one of our KNX light switches. These have a screen to display additional information like time, temperature or whatever additional data one would like to display.
here you can see a demo video

I won't explain how KNX works but basically you have to set up a group address like "4/2/30" and the specific function of that switch will be added to that group. I then exposed the value of the "counter" to KNX into the specific group

knx:
  expose:
    - type: 'percent'
      entity_id: counter.diaper_counter
      address: '4/2/30'

I had to use percent since the switch wouldn't allow for a plain text field

from home-assistantconfig.

adonno avatar adonno commented on September 27, 2024

Flash red light on the wall switch when threshold reached

As explained in the previous comment these switches can display some nice information. You can also define the LEDs.

Here I used Node-Red again since I had it already set up for my mobile notifications and I didn't want to create an additional entity in HA. (see here)
In Node-Red I used a Plugin called UltimateKnx. Used a switch node to change the value "15" to "true" and value 0 to "false"
image

from home-assistantconfig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.