jlamendo / ha-sensor.owlet Goto Github PK
View Code? Open in Web Editor NEWOwlet Smart Sock v2/v3 Sensor Integration for HomeAssistant using the modern Owlet API.
License: MIT License
Owlet Smart Sock v2/v3 Sensor Integration for HomeAssistant using the modern Owlet API.
License: MIT License
Hey!
Loving this add on!
Would be great if we could turn on/off the base station somehow
when I’m doing a night feed in the other room, out of signal, I often forget to turn the station off, much to the joy of my partner!
Having a service means I could add a button in another room to trigger this on/off
Its not really an issue but in month it ate around 50gb of storage space due to logging the JSON response.
My whole system ran out of space and froze, now I'm better at configuring docker machines so the logs are rolling and this wont be a problem anymore, Nevertheless a big chunck of logs is taken by this so not a lot of logs is saved for the HA.
Issue: able to install from HACS, however, it would show as Disconnect!
Running:
I DO have adguard installed and I had turned off, unblock any and all links for HASS, ownletcare, aylanetworks.com....completely turn itoff/disable it...... even removed it all together from the network....with no succes!
My sensor.yaml: (dont mind the syntax...I wasnt able to get it to format properly)
`
LOGS x103 times.... I masked key#, app_id#, etc..:
OWLET: [{"property": {"type": "Property", "name": "ALRT_PAUSE_CMD", "base_type": "string", "read_only": false, "direction": "input", "scope": "user", "data_updated_at": "2022-06-18T04:44:47Z", "key": xxxx, "device_key": xxxxxx, "product_name": "xxxxxxx", "track_only_changes": true, "display_name": "Alert Pause Command", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "{\"ts\":xxxx}", "generated_from": null, "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "APP_ACTIVE", "base_type": "boolean", "read_only": false, "direction": "input", "scope": "user", "data_updated_at": "2023-02-13T21:05:56Z", "key": xxxxx, "device_key": xxxx, "product_name": "xxxxxx", "track_only_changes": false, "display_name": "App Active", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 1, "generated_from": null, "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "BASE_ERROR_LOG_FILE", "base_type": "file", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "null", "key": xxxxxxxx, "device_key": xxxxxx, "product_name": "xxxxx", "track_only_c . . . . "track_only_changes": false, "display_name": "Vitals Log File", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "https://ads-owlue1.aylanetworks.com/apiv1/devices/xxxxxx/properties/VITALS_LOG_FILE/datapoints/xxxxx-606d-11ed-0ffb-xxxxxxx.json", "generated_from": null, "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}]
Would it be possible to update the repo to allow installation through HACS?
Hey,
getting this issue, ive only just tried to set this up, never had it working before.
HA: 2021.6.2
sensor:
## https://github.com/jlamendo/ha-sensor.owlet
- platform: owlet
username: !secret owletuname
password: !secret owletpassword
region: "world"
Logger: homeassistant.components.sensor
Source: custom_components/owlet/sensor.py:145
Integration: Sensor (documentation, issues)
First occurred: 20:48:01 (1 occurrences)
Last logged: 20:48:01
Error while setting up owlet platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/owlet/sensor.py", line 286, in setup_platform
for SmartSockDSN in Owlet.devices:
File "/config/custom_components/owlet/sensor.py", line 193, in devices
self.get_devices()
File "/config/custom_components/owlet/sensor.py", line 168, in get_devices
r = self.api_get("/devices.json")
File "/config/custom_components/owlet/sensor.py", line 145, in api_get
headers={"Authorization": "auth_token " + self.__OWLET_TOKEN},
TypeError: can only concatenate str (not "tuple") to str
Hi there,
I updated Home Assistant today and it looks like the data is not making it into HA anymore.. The state of the sensor says 'connected' but the attributes are now completely missing. My wife and I really rely on your integration so I would really appreciate it if you could look. I will try and look myself and if I see the fix ill push a PR through. Thanks a bunch!
For use with Grafana and Influx:
I am not sure if this is the integration or HASSIO template sensor that needs the functionality but when the Owlet integration "grabs" a reading from the Owlet sock that is the same as the previous reading, no state change is recorded.
Therefore Influx does not store a data point resulting in large gaps in the Grafana plots (there does not seem to be a use 'last' function in Grafana time series plots)
Would it be possible to include a force_update configuration attribute, similar to what esp_home uses to force the HASSIO front end to record a state change??
(see: https://esphome.io/components/sensor/index.html)
Many thanks for your hard work
Me again! Thanks for the help last time :)
So I've got my DB working (im actually using influx instead of prometheus). But I can't figure out how to code the entity_id?
For example:
If I just code the sensor.owlet_smart_sock it gives me a "1" on data output, if I try the entire state states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.heart_rate I get no data.
How do you have this coded in Grafana? Specifically the JSON section
"tags": [
{
"key": "entity_id",
"operator": "=",
"value": "sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.heart_rate"
}
HA seems to be having trouble loading the int, error log pointing towards templates?
Logger: homeassistant.helpers.event
Source: helpers/template.py:570
First occurred: 4:54:42 PM (6 occurrences)
Last logged: 4:54:42 PM
Error while processing template: Template<template=({{states.sensor.owlet_smart_sock_ac000w016676179.attributes.heart_rate}}) renders=2>
Error while processing template: Template<template=({{states.sensor.owlet_smart_sock_ac000w016676179.attributes.oxygen_saturation}}) renders=2>
Error while processing template: Template<template=({{states.sensor.owlet_smart_sock_ac000w016676179.attributes.movement}}) renders=2>
Error while processing template: Template<template=({{states.sensor.owlet_smart_sock_ac000w016676179.attributes.battery}}) renders=2>
Error while processing template: Template<template=({{states.sensor.owlet_smart_sock_ac000w016676179.attributes.ble_rssi}}) renders=2>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 568, in async_render
render_result = _render_with_context(self.template, compiled, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2196, in _render_with_context
return template.render(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "", line 1, in top-level template code
File "/usr/local/lib/python3.11/site-packages/jinja2/sandbox.py", line 326, in getattr
value = getattr(obj, attribute)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2231, in _fail_with_undefined_error
raise ex
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2228, in _fail_with_undefined_error
return super()._fail_with_undefined_error(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
jinja2.exceptions.UndefinedError: 'None' has no attribute 'attributes'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 694, in async_render_to_info
render_info._result = self.async_render(
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 570, in async_render
raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'attributes'
Logger: homeassistant.helpers.template
Source: helpers/template.py:2209
First occurred: 4:54:42 PM (12 occurrences)
Last logged: 4:54:42 PM
Template variable error: 'None' has no attribute 'attributes' when rendering '{{states.sensor.owlet_smart_sock_ac000w016676179.attributes.heart_rate}}'
Template variable error: 'None' has no attribute 'attributes' when rendering '{{states.sensor.owlet_smart_sock_ac000w016676179.attributes.oxygen_saturation}}'
Template variable error: 'None' has no attribute 'attributes' when rendering '{{states.sensor.owlet_smart_sock_ac000w016676179.attributes.movement}}'
Template variable error: 'None' has no attribute 'attributes' when rendering '{{states.sensor.owlet_smart_sock_ac000w016676179.attributes.battery}}'
Template variable error: 'None' has no attribute 'attributes' when rendering '{{states.sensor.owlet_smart_sock_ac000w016676179.attributes.ble_rssi}}'
Logger: homeassistant.components.template.template_entity
Source: components/template/template_entity.py:194
Integration: Template (documentation, issues)
First occurred: 4:54:42 PM (6 occurrences)
Last logged: 4:54:42 PM
TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template<template=({{states.sensor.owlet_smart_sock_ac000w016676179.attributes.oxygen_saturation}}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.owlet_spo2'
TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template<template=({{states.sensor.owlet_smart_sock_ac000w016676179.attributes.movement}}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.owlet_movement'
TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template<template=({{states.sensor.owlet_smart_sock_ac000w016676179.attributes.battery}}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.owlet_battery'
TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template<template=({{states.sensor.owlet_smart_sock_ac000w016676179.attributes.ble_rssi}}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.owlet_rssi'
TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template<template=({{states.sensor.owlet_smart_sock_ac000w016676179.attributes.ble_rssi}}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.owlet_monitoring_status'
Hey!
Loving the add-on! Thanks for developing this :)
any chance you can add the “sleep” state at all? I see on the app it tracks light/deep sleep state - is this an attribute that can be pulled over somehow?
I've been trying to get this working for a few days now. No success. Many errors in the logs (note SERIAL ID is intentional to hide my serial #). Just trying to show output on a sensor integration with no success.
2021-11-23 01:14:34 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'sensor' is undefined when rendering '{{sensor.owlet_smart_sock_[SERIALID].attributes.heart_rate}}'
2021-11-23 01:14:34 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template("{{sensor.owlet_smart_sock_[SERIALID].attributes.heart_rate}}")
and many like this:
homeassistant.exceptions.TemplateError: UndefinedError: 'sensor' is undefined
2021-11-23 01:14:34 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'sensor' is undefined when rendering '{{sensor.owlet_smart_sock_[SERIALID].attributes.heart_rate}}'
2021-11-23 01:14:34 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('UndefinedError: 'sensor' is undefined') while processing template 'Template("{{sensor.owlet_smart_sock_[SERIALID].attributes.heart_rate}}")' for attribute 'attr_native_value' in entity 'sensor.owlet_heart_rate'
2021-11-23 01:14:34 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template("{{states.sensor.owlet_smart_sock[SERIALID].attributes.oxygen_saturation}}")
homeassistant.exceptions.TemplateError: TemplateError: str: Invalid entity ID 'sensor.owlet_smart_sock_'
2021-11-23 01:14:34 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('TemplateError: str: Invalid entity ID 'sensor.owlet_smart_sock_'') while processing template 'Template("{{states.sensor.owlet_smart_sock_[SERIALID].attributes.oxygen_saturation}}")' for attribute 'attr_native_value' in entity 'sensor.owlet_spo2'
2021-11-23 01:14:34 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template("{{states.sensor.owlet_smart_sock[SERIALID].attributes.movement}}")
This is the setup in configuration.yaml:
sensor:
platform: owlet
username: "email@address"
password: password
region: "world"
platform: template
sensors:
owlet_heart_rate:
friendly_name: "Beats per minute"
unit_of_measurement: BPM
value_template: "{{sensor.owlet_smart_sock_[SERIALID].attributes.heart_rate}}"
owlet_spo2:
value_template: "{{states.sensor.owlet_smart_sock_[SERIALID].attributes.oxygen_saturation}}"
unit_of_measurement: SPO2
I have been trying but I'm a little behind on the scripting. Not sure if I have a silly mistake here.
I've recently integrated an Owlet Dream Sock and seem to be getting entity data for all the things that matter. One odd piece is that there are a ton of errors in the Home Assistant logs with a gigantic dictionary of data. Approximately 100 errors have been reported in 20-minutes. Is normal or expected? Wondering if I can just squelch these.
Here's a sanitized version of the log for reference: https://gist.github.com/npawelek/7b54cdb73deb66eee0e6d50e52c3ec95
I notice some freezes in the data history while baby wasn't moving. I check the signal strength which should not be paused if the baby is moving and the freeze also appears
I'm the only one? Do we know if it's an issue with or due to the integration or this is the owlet system in cause ?
According to owlet documentation, it's doesn't support more than two user at the same time then I assume we are collecting data directly on the owlet system. Can we adjust the data pull rate from the plugin in order to test if lowering remove the gaps.
IN ha, i have in the logs, how do i remove it or increase the update time, or just ignore this?
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:822
Integration: Sensor (documentation, issues)
First occurred: 6:04:11 pm (28 occurrences)
Last logged: 6:08:41 pm
Updating owlet sensor took longer than the scheduled update interval 0:00:10
HI There,
Just wondering if this integration is still supported? I've configured my YAML file as follows - I updated the files to include the device ID which it must have got from somewhere.
sensor:
template:
2023-02-24 15:52:50.522 ERROR (SyncWorker_15) [custom_components.owlet.sensor] OWLET: [{"property": {"type": "Property", "name": "ALRT_PAUSE_CMD", "base_type": "string", "read_only": false, "direction": "input", "scope": "user", "data_updated_at": "2023-02-24T01:34:27Z", "key": 192165850, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "Alert Pause Command", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "{"ts":1677202467}", "generated_from": null, "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "APP_ACTIVE", "base_type": "boolean", "read_only": false, "direction": "input", "scope": "user", "data_updated_at": "2023-02-24T07:52:49Z", "key": 192165851, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "App Active", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 1, "generated_from": null, "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "APP_CMD_REQUEST", "base_type": "string", "read_only": false, "direction": "input", "scope": "user", "data_updated_at": "null", "key": 205599036, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "App Command Request", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": null, "generated_from": null, "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}, {"property": {"type": "Property", "name": "APP_CMD_RESPONSE", "base_type": "string", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:13:03Z", "key": 205599037, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "App Command Response", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "", "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}, {"property": {"type": "Property", "name": "BASE_ERROR_LOG_FILE", "base_type": "file", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2022-11-15T02:00:25Z", "key": 192165883, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Base Error Log File", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "https://ads-owlue1.aylanetworks.com/apiv1/devices/26981168/properties/BASE_ERROR_LOG_FILE/datapoints/452060da-6489-11ed-da53-d356fc416f15.json", "generated_from": null, "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}, {"property": {"type": "Property", "name": "BASE_EVT_LOG_FILE", "base_type": "file", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "null", "key": 192165884, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Base Event Log File", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": null, "generated_from": null, "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}, {"property": {"type": "Property", "name": "BASE_STATION_ON_CMD", "base_type": "string", "read_only": false, "direction": "input", "scope": "user", "data_updated_at": "2023-02-23T09:49:10Z", "key": 192165852, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "Base Station On Command", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "{"ts":1677145750, "val":"false"}", "generated_from": null, "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "CONFIG_STATUS", "base_type": "string", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:13:01Z", "key": 192165855, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "Config Status", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "{"smac":"C287FEA10EAF","bmac":"D65402C596E6"}", "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "DEVICE_PING", "base_type": "integer", "read_only": false, "direction": "input", "scope": "user", "data_updated_at": "2023-02-19T00:08:43Z", "key": 192165856, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "Device Ping", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 0, "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "DISCOMFORT_ALRT", "base_type": "boolean", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:12:50Z", "key": 205268055, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Discomfort Alert", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 0, "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}, {"property": {"type": "Property", "name": "FW_UPDATE_STATUS", "base_type": "string", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:13:02Z", "key": 192165857, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "Firmware Update Status", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "{"primary":"IDLE"}", "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "HIGH_HR_ALRT", "base_type": "boolean", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:12:48Z", "key": 192165858, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "High HR Alert", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 0, "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "HIGH_OX_ALRT", "base_type": "boolean", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:12:49Z", "key": 192165859, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "High Oxygen Alert", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 0, "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "LOST_POWER_ALRT", "base_type": "boolean", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:12:53Z", "key": 205599035, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Lost Power Alert", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 0, "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}, {"property": {"type": "Property", "name": "LOW_BATT_ALRT", "base_type": "boolean", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-21T23:16:17Z", "key": 192165860, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Low Battery Alert", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 0, "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "LOW_HR_ALRT", "base_type": "boolean", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:12:47Z", "key": 192165861, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Low HR Alert", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 0, "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "LOW_INTEG_READ", "base_type": "boolean", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-22T12:42:00Z", "key": 192165862, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Low Integrity Read", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 0, "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "LOW_OX_ALRT", "base_type": "boolean", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:12:49Z", "key": 192165863, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Low Oxygen Alert", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 0, "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "LOW_POWER_MODE_CMD", "base_type": "string", "read_only": false, "direction": "input", "scope": "user", "data_updated_at": "null", "key": 192165880, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "Low Power Mode Cmd", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": null, "generated_from": null, "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}, {"property": {"type": "Property", "name": "MISC_LOG_FILE_DATA", "base_type": "file", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "null", "key": 192165864, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Misc Log File Data", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": null, "generated_from": null, "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}, {"property": {"type": "Property", "name": "MONITORING_SUMMARY", "base_type": "string", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-24T07:36:16Z", "key": 192165878, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "Monitoring Summary", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "AAALfwiUzeGfBiDYBDgg", "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}, {"property": {"type": "Property", "name": "oem_base_version", "base_type": "string", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:12:58Z", "key": 192165865, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "oem_base_version", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "{"app":"3.8.0.0-6ede9d9","hw":"obl","rev":5,"sd":"6.1.1","bl":"0.7.34.0-3e109b0"}", "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "oem_flash_version", "base_type": "string", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:12:58Z", "key": 192165866, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "oem_flash_version", "host_sw_version": true, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "B3.8.0-6ede_S3.5.0-efc7_BB0.7.34_SB0.7.33_SD6.1.1", "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": null, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "oem_sock_version", "base_type": "string", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:12:59Z", "key": 192165867, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "oem_sock_version", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "{"app":"3.5.0.0-efc769f","sd":"6.1.1","bl":"0.7.33.0-3e109b0","ext app":"3.5.0.0-efc769f","hw":"oss","rev":2}", "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "PPG_LOG_FILE", "base_type": "file", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-01-31T22:12:19Z", "key": 192165881, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "PPG Log File", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "https://ads-owlue1.aylanetworks.com/apiv1/devices/26981168/properties/PPG_LOG_FILE/datapoints/53f5e950-a1b4-11ed-3532-acc9bd074b3e.json", "generated_from": null, "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}, {"property": {"type": "Property", "name": "PREVIEW_DRM_PRIORITY_ALARM", "base_type": "boolean", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:12:57Z", "key": 205599038, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "Preview Dream Alarm", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 0, "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}, {"property": {"type": "Property", "name": "PREVIEW_HIGH_PRIORITY_ALARM", "base_type": "boolean", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:12:55Z", "key": 192165868, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Preview High Priority Alarm", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 0, "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "PREVIEW_LOW_PRIORITY_ALARM", "base_type": "boolean", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:12:56Z", "key": 192165869, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Preview Low Priority Alarm", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 0, "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "PREVIEW_MED_PRIORITY_ALARM", "base_type": "boolean", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:12:56Z", "key": 192165870, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Preview Med Priority Alarm", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 0, "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "REAL_TIME_VITALS", "base_type": "string", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-24T07:50:52Z", "key": 192165871, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Real-Time Vitals", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "{"ox":0,"hr":0,"mv":0,"sc":2,"st":0,"bso":0,"bat":100,"btt":0,"chg":2,"aps":0,"alrt":0,"ota":0,"srf":1,"rsi":24,"sb":0,"ss":0,"mvb":0,"mst":0,"oxta":255,"onm":0,"bsb":4,"hw":"obl"}", "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "RED_ALERT_SUMMARY", "base_type": "string", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2022-10-31T11:24:03Z", "key": 192165879, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "Red Alert Summary", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "AAHH6GNfrM5aAMxkAQYAzWQGBgDPZAMGAM9kCgYAAAAAAgAAAAACAAAAAAIAzmQHBgDOZAQGAMtkBAYAzGQBBgDMZAIGAM9kBQYAz2QBBgDPZAMGAM1kBQYAxWQGBgC/ZAQGALpkDQYAvGQEBgC4ZAIGALVkBQYAs2QEBgCtZAAGALRkCgYAsGQQBgC0ZAkGALNkCgYAsWQEBgCwZAkGAK5kBwYAu2QhBgC8ZA8GAMlkCAYAxmQOBgC+ZAYGALRkBwYArmQFBgCrZAYGAKtkAgYAtWQGBgC+ZAYGALxkAQYAumQBBgC3ZAMGALJkAAYArmQCBgCwZAcGAKtkAgYApmQEBgCkZAUGAJ9kAQYAo2QABgCbZAIGAKNkAAYAoGQABgCmZAAGAKpkAQYAp2QCBgCuZAYGAK1kAQYAtWQCBgCzZAQGALFkAgYAm2QBBgCmZAEGAKJkAAYApGQCBgCdZAIGAJtkAgYAqGQBBgCSZAAGAJpkAwYAq2QBBgCuZAAGAKdkAgYApGQCBgCeZAcGAKBkBAYAo2QKBgCWZAEGAJNkAQYAj2QABgCVZAgGAJxkAQYAkWQBBgCOZAEGAJlkCQYApGQGBgCTZAYG", "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}, {"property": {"type": "Property", "name": "SENSOR_ERROR_LOG_FILE", "base_type": "file", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2022-10-21T15:56:10Z", "key": 192165882, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Sensor Error Log File", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "https://ads-owlue1.aylanetworks.com/apiv1/devices/26981168/properties/SENSOR_ERROR_LOG_FILE/datapoints/e1b767a2-5158-11ed-f14d-9a3912505a06.json", "generated_from": null, "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}, {"property": {"type": "Property", "name": "SETTINGS_CMD", "base_type": "string", "read_only": false, "direction": "input", "scope": "user", "data_updated_at": "null", "key": 192165872, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "Settings Command", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": null, "generated_from": null, "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}, {"property": {"type": "Property", "name": "SETTINGS_STATUS", "base_type": "string", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-10T07:13:00Z", "key": 192165873, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "Settings Status", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "{"settings":{}}", "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "SOCK_DISCON_ALRT", "base_type": "boolean", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-23T09:49:11Z", "key": 192165874, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Sock Disconnect Alert", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 0, "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "SOCK_OFF", "base_type": "boolean", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-02-24T07:50:52Z", "key": 192165875, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Sock Off", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": 0, "generated_from": "AYLA::device", "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30, "ack_status": null, "ack_message": null, "acked_at": null}}, {"property": {"type": "Property", "name": "VITALS_LOG_DATA", "base_type": "string", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "null", "key": 192165876, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": true, "display_name": "Vitals Log Data", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": null, "generated_from": null, "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}, {"property": {"type": "Property", "name": "VITALS_LOG_FILE", "base_type": "file", "read_only": true, "direction": "output", "scope": "user", "data_updated_at": "2023-01-25T07:10:17Z", "key": 192165877, "device_key": 26981168, "product_name": "AC000W019805771", "track_only_changes": false, "display_name": "Vitals Log File", "host_sw_version": false, "time_series": false, "derived": false, "app_type": null, "recipe": null, "value": "https://ads-owlue1.aylanetworks.com/apiv1/devices/26981168/properties/VITALS_LOG_FILE/datapoints/524160c4-9c7f-11ed-3be9-071e06c7d4e2.json", "generated_from": null, "generated_at": null, "denied_roles": [], "ack_enabled": false, "retention_days": 30}}]
How is this calculated as in the app you don't have access to this, it only says if the baby is moving.
So what does the movement sensor mean, is the number of leg movements per second, or hour or what??
Hey folks, just got an Owlet V3 (replacing a V2) and installed this via HACS.
I've added the following with my own credentials to my configuration.yaml and restarted. Yet I can't see anything show up in HA.
sensor:
- platform: owlet
username: "owlet_api_email"
password: !secret owlet_password
region: "europe"
Only thing I did different from what's on the readme is use "Europe" instead of "world".
I'm sure I'm probably missing something. I had this running before with this repository, so I know my credentials are correct.
Thanks
I have recently tried setting this up but im not getting any data coming through to any of the sensors. Is this still working in release 2022.5 as there are a few people logging issues here saying the same thing and having to downgrade back to previous version of HA to make this work?
Hi,
first of all - thank you for your great work making the Owlet finally available for Home Assistant. Much appreciated!
I own the Owlet Smart Sock 3.
Few issues regarding the alert states and/or attribute readings:
LOW_INTEG_READ
- when the sock is removed, owlet app produces the notification Difficulty getting reading
, the base station starts playing music and flashing yellow. This attribute doesn't change state however. It only changes to true
when the sock is put into base station for charging.base_station_on
- when sock is charging, produces null
, when the sock is on and active, produces 1
- shouldn't this be more base station connectivity, rather than sock connectivity (which is provided by active
attribute)?Thanks.
The owlet base picked up properly because the sensor ends with the matching serial number that the app has so I know my main config is correct but I added the template section to get the sensors and they register nothing. Any advice?
I'm getting the below error in HA:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 477, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 702, in async_device_update
await task
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/owlet/sensor.py", line 405, in update
state, raw_json = self.__Owlet.vitals(self.__DSN)
File "/config/custom_components/owlet/sensor.py", line 254, in vitals
"DISCOMFORT_ALRT": bool(p["DISCOMFORT_ALRT"]["value"]),
KeyError: 'DISCOMFORT_ALRT'
Looking at the JSON response, I don't see this key coming back from the API. I have a brand new Smart Sock 3 and Owlet account (meaning no data anywhere). Is it possible this key isn't populated until the first use?
Him just seeing if i could get this work work
Below is my yaml setup. Im located in Australia, so not sure if i need to change the region?
- platform: owlet
username: xxxxxxxxxxxxxxxxxxxx
password: xxxxxxxxxxxxxxxxxx
region: world
- platform: template
sensors:
owlet_heart_rate:
value_template: "{{states.sensor.owlet_smart_sock_xxxxxxxxx.attributes.heart_rate}}"
unit_of_measurement: BPM
owlet_spo2:
value_template: "{{states.sensor.owlet_smart_sock_xxxxxxxxx.attributes.oxygen_saturation}}"
unit_of_measurement: SPO2
owlet_movement:
value_template: "{{states.sensor.owlet_smart_sock_xxxxxxxxx.attributes.movement}}"
unit_of_measurement: '%'
owlet_battery:
value_template: "{{states.sensor.owlet_smart_sock_xxxxxxxxx.attributes.battery}}"
unit_of_measurement: '%'
owlet_rssi:
value_template: "{{states.sensor.owlet_smart_sock_xxxxxxxxx.attributes.ble_rssi}}"
unit_of_measurement: dBm
owlet_monitoring_status:
value_template: "{{(states.sensor.owlet_smart_sock_xxxxxxxxx.attributes.active) and (states.sensor.owlet_smart_sock_ac000w016647961.state == 'Connected')}}"
unit_of_measurement: boolean
owlet_connection:
value_template: "{{states.sensor.owlet_smart_sock_xxxxxxxxx.state}}"
unit_of_measurement: boolean
owlet_tachycardia_alert:
value_template: "{{states.sensor.owlet_smart_sock_xxxxxxxxx.attributes.HIGH_HR_ALRT}}"
unit_of_measurement: boolean
owlet_bradycardia_alert:
value_template: "{{states.sensor.owlet_smart_sock_xxxxxxxxx.attributes.LOW_HR_ALRT}}"
unit_of_measurement: boolean
owlet_hypoxia_alert:
value_template: "{{states.sensor.owlet_smart_sock_xxxxxxxxx.attributes.LOW_OX_ALRT}}"
unit_of_measurement: boolean
owlet_lobatt_alert:
value_template: "{{states.sensor.owlet_smart_sock_xxxxxxxxx.attributes.LOW_BATT_ALRT}}"
unit_of_measurement: boolean
owlet_read_integrity_alert:
value_template: "{{states.sensor.owlet_smart_sock_xxxxxxxxx.attributes.LOW_INTEG_READ}}"
unit_of_measurement: boolean
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.