Owlet Smart Sock Baby Monitor

I’m surprised this has not yet been done, but the Owlet Smart Sock would be a great addition to Home Assistant. The built-in features of the alert are OK, but integration to the smart home would take it to the next level.

I’ve found PoC code on github for the API so it should be fairly straightforward if some smart folks are able to pick it up.

I have this for my baby as well. I am not a programmer, but would be happy to test and write any documentation if anyone is willing to take on this project.

@automateit, where did you find the PoC code?

EDIT: NVM, I found the PoC, https://github.com/bobcat0070/python-owlet.

I’m also interested in this.

1 Like

I have reached out to Owlet to see if they have an API documented. The initial support response is that they did not, but are forwarding my request on to their engineers FWIW.

1 Like

I found another PoC with Node, https://github.com/arosequist/node-owlet.

Ok, so it looks lik Github user angel12 has made the most progress so far at https://github.com/angel12/pyowlet/tree/master/pyowlet. I created an issue to see if he needs any help with testing. I will keep you guys updated!

I have #3 on the way and was a very early adopter of the Owlet back when #1 was born. I’m very interested in getting this setup. I’ll be getting our Owlet out and starting to test the API. Assuming it is stable enough, I should be able to put together a component for HA rather quickly.

1 Like

What’s your opinion of the owlet as someone who as used it?

It was very reliable when we used it for #2. The biggest annoyance was if we didn’t place the sock properly. If it can’t get a reading after a certain period it plays a tone to alert you. This tended to happen more frequently as baby outgrew the size of the sock that we were using and needed to be bumped up a size.

I only recall one critical alert during the time we used it. Luckily it appeared to be a false alarm since everything was fine when we checked on baby. Definitely much more reliable regarding false alarms than the Angel Care sensors we used for #1. We ordered our Owlet before #1 arrived when it was still a Kickstarter, but it didn’t ship until after #2 was in the womb.

My biggest issue with the app is that it doesn’t offer any insight into the historical data, so we couldn’t tell if the alert we had was sudden or gradual onset but this can be fixed easily with integration into HA. I’ve already started on the component for HA and it is going very well in the time since my last post above. May have something that I can share by tomorrow evening.

Thanks for the info!

Ok… I’ve got a quick component thrown together. Everything seems to be working as expected, but I’m going to play around with it and make sure everything is behaving. I will open a PR to try and get it merged into HA once I’m comfortable with it.

image

image

Nice work!

A few things I see that I will make a note of here that I think will need to be addressed…

  • Battery level can be > 100
  • Heart rate and oxygen levels are retained even when sock is charging. This is likely due to HA saving the last known value. Should move to unknown or other status if sock is charging.
  • Not sure what the Sock Off attribute is for. Could not get it to trigger.
  • Need to test responsiveness of updates (should not rely on HA notifications vs Owlet app for critical alerts)

Got some more work done on this component today. Moved the battery level and a few other attributes into properties on the sock measurement sensors.

Sock off is a flag for when the sock cannot get a good measurement and they assume it has fallen off.

It appears that battery level shows 120 when fully charged, but immediately drops below 100 when taken off the charger. I capped the battery level at 100 since a dedicated attribute is available for charge status.

Measurements are hidden when they are not available. Measurements are hidden if the sock is charging, if the base is off, or if motion is detected. This mostly mimics how the Owlet app behaves.

I’m pretty confident with how the component is behaving. I will be doing some more testing and will start working on documentation in preparation for a PR later in the week.

Currently, I have not identified a way to tell if the base station has lost wifi connectivity. However, the Owlet app is able to do this. Could be that the library doesn’t support it yet. Also, the library doesn’t have any methods for enabling the base station which can also be done from the app. These can be future enhancements unless somebody else has an idea on how to implement.

2 Likes

This is great work! Thank you for digging into this one; I’m sure dads all over will be happy to see progress on this. Having an accurate battery ‘fully charged’ reading is not nearly important as “LOW BATT” so if it is reporting in the ballpark, then I’d say that it is OK.

The most useful thing about integrating it into home assistant is to extend the alerting functionality to be combined with other automations/devices around the home. So, rather than your alarm playing a creepy and ironic lullaby :slight_smile: you can now have it turn the lights on and/or trigger other output devices. Another good use case is to send all of the telemetry to influx_db and Grafana to visualize baby’s sleeping patterns, including the pulse/ox levels.

@oblogic7 Any chance you could release a custom component for the time being so that others could test?

Tried to get this working as a custom component, but couldn’t get it to work. The good news is that the PR was merged today, so it should be ready on the next release. Hopefully everybody has a good experience with it. If you find any bugs, be sure to drop them here and tag me so I can take a look.

One thing that I still could not figure out is how to detect if the base station drops wifi connectivity. The app alerts for this condition, so not crucial, but it is currently not possible to bring this into HA.

@automateit I definitely want the data in influxdb. Will be very interesting to watch for any negative trends or situations that may not trigger an alert via the app. I agree with your thoughts on integrating with other devices around the house. This will provide a very accurate means for determining when baby is asleep so doorbell can be automatically silenced, light level can be automatically adjusted at night, or TV volume in adjacent room can be limited. I still have 5 months to test my automations and come up with new ideas. Please share if you come up with anything particularly clever.

1 Like

Thought I would share a dynamic battery icon template for those that are interested

  - platform: template
    sensors:
       owlet_charge:
         value_template: '{{states.sensor.adelyn_s_owlet_heart_rate.attributes.battery_level}}'
         friendly_name: 'Owlet Sock Battery'
         unit_of_measurement: '%'
         icon_template: >-
          {% set battery_level = states('sensor.owlet_charge')|int('unknown') %}
          {% set battery_round = (battery_level|int / 10)|int * 10 %}
          {% if battery_level == 'unknown' %}
            mdi:battery-unknown
          {% else %}
            {% if battery_round >= 100 %}
              mdi:battery
            {% elif battery_round > 0 %}
              mdi:battery-{{ battery_round }}
            {% else %}
              mdi:battery-alert
            {% endif %}
          {% endif %}
1 Like

Hi,

I am not sure what is up, but I thought that the values for O2 and Heart would be able to be shown in history-graph… anyone got this working?

Otherwise, was pleasantly surprised to see this creep into the latest release… Thanks for all your efforts

1 Like

I am using a Lovelace custom mini graph and has been working fine

1 Like