Announcement

Collapse
No announcement yet.

Device based vs. Homeseer Logic - DIY Smart Dog Food/Water Bowl

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Device based vs. Homeseer Logic - DIY Smart Dog Food/Water Bowl

    I could use some general advice.

    I bought a PetKIT dog bowl which is a dog bowl with a built in scale. It does not have any wireless connectivity support. I took it apart and it has a simple load cell as the base. I connected a HX711 load cell amplifier up to the load cell and a NodeMCU with a ESP8266. I wrote my own code and was able to calibrate the load scale and transmit the weight via WiFi to my MQTT broker. I also was able to flash Tasmota onto the ESP8266 and obtain the weight via MQTT or the web interface.

    Goals
    • Determine if/when my dog has been fed - When the scale goes from 0 to above a certain trigger (i.e. 0.5 pounds) set a flag saying my dog has been fed
    • Determine when the water bowl is low/empty - Say 2 pounds of water is full and 0 is empty. I can then display the water level as a percentage of 0-100% or as ounces or ml of water left in the bowl. Once it gets below a certain point I can trigger an action/notification
    • Calculate the amount of time it takes my dog to eat. When my dog is healthy she scarfs her food very quickly. When she is sick she eats slower. Using the weight to determine how quickly the food bowl goes from full to empty could be helpful in raising an alert to look for any other health issues

    So I see three ways of doing this.
    • I can report the raw scale value or the weight every couple of seconds via the MQTT broker and have Homeseer complete the math, logic, etc.
    • I can report the raw values or weight when there is a change of more than say 5%. 99% of the time the dog bowl will be empty, so flooding the network with 0.0 lbs over and over seems unnecessary
    • I can perform the logic, math and processing in the ESP8266 and just post certain values to the MQTT broker
      • Dog bowl has been filled (Dog has been fed)
      • Calculate and post time it takes from dog food bowl to go from full to empty to show how long it takes my dog to eat
      • Only report status of the water bowl when is changes it status by 5% or 2 ounces, etc.

    Any feedback or suggestions about trying to perform the math/logic in the ESP8266 vs. Homeseer? Any downsides to flooding my MQTT broker and WiFi network with updates every couple seconds? Would this be a resource burden on Homeseer (currently using BIG5 plugin).

    Thanks for any suggestions or thoughts!


    #2
    At a minimum I would do all timing on the device and save it until you know it had been received. I would probably do calculations on the device also, but would have the raw data sent out as well. That way if you want to get an additional calculation you can. You can always ignore the raw data especially if you send it under it's own topic(s).

    I would do the timing on the device because then you are not introducing communication timing errors.
    Karl S
    HS4Pro on Windows 10
    242 Devices
    56 Z-Wave Nodes
    37 Events
    HSTouch Clients: 3 Android, 1 iOS
    Google Home: 3 Mini units 1 display

    Comment

    Working...
    X