Has anyone had any success linking notification from an iHome iSB02 Wi-Fi Dual Leak Sensor? I know it’s a rebranded device.
Any help is appreciated! Thanks.
Has anyone had any success linking notification from an iHome iSB02 Wi-Fi Dual Leak Sensor? I know it’s a rebranded device.
Any help is appreciated! Thanks.
Would really like to know if this is possible. I’m also trying to make this work @vez727, where you able to make it work?
After getting fed up with IFTTT’s slowness to flat out unresponsive (which isn’t something you want in a leak detector) I found the following page which helped show me the API info for iHome.
That page will help you get the the API key you need and id for the URL. Below is my RESTful sensor.
‘https://api.evrythng.com/thngs/id you got from above/properties’
Here’s the iHome API info: https://developers.evrythng.com/reference/properties
sensor:
- platform: rest
resource: !secret ihome_url
name: iHome ISB02
scan_interval: 300
headers:
Authorization: !secret ihome_api_key
value_template: '{{ value_json[8] }}'
json_attributes:
- createdAt
- timestamp
- key
- value
POPBOXGUN THANKS!!
I jumped on this as soon as I saw your post…I’ve been going a bit crazy.
What ID did you use here?
‘https://api.evrythng.com/thngs/id you got from above/properties’
I’ve tried every ID that returned from the output I received using the command below and I keep getting error 401, “Access denied, please check your credentials!”
curl -i -H “Accept: application/json” -H “Authorization:EVERYTHING_API_KEY” -X GET “https://api.evrythng.com/thngs”
That is the device ID. Get your API key from this.
curl -H “Content-Type: application/x-www-form-urlencoded” -H “Accept: application/json” -X POST https://www.ihomeaudio.com/api/v3/login/ -d 'password= yourPassword &email= email%40domain.com ’
Then get the device id from this.
curl -H “Content-Type: application/x-www-form-urlencoded” -H “Accept: application/json” -H "Authorization: evrythng_api_key " https://api.evrythng.com/thngs?perPage=100&sortOrder=ASCENDING
Modified this a bit to include the battery status and to ensure that momentary events shorter than the poll period (60 s here) aren’t missed:
binary_sensor leak_sensor_state:
- platform: rest
resource: "https://api.evrythng.com/thngs/[ID_HERE]/properties/leakdetected"
name: "iHome iSB02 leak status"
device_class: moisture
scan_interval: 60
headers:
Authorization: "[AUTH_HERE]"
value_template: >-
{% set ns = namespace(state="OFF") %}
{% if value_json|length == 0 %}
{% set ns.state = "OFF" %}
{% elif value_json[0].value == "1" %}
{% set ns.state = "ON" %}
{% else %}
{% for vi in value_json[1:] %}
{% if vi.value == "1" and (now()|as_timestamp - vi.timestamp / 1000) < 60 %}
{% set ns.state = "ON" %}
{% endif %}
{% endfor %}
{% endif %}
{{ns.state}}
binary_sensor leak_sensor_battery:
- platform: rest
resource: "https://api.evrythng.com/thngs/[ID_HERE]/properties/battery"
name: "iHome iSB02 battery status"
device_class: battery
scan_interval: 60
headers:
Authorization: "[AUTH_HERE]"
value_template: >-
{% if value_json|length == 0 %}
OFF
{% elif value_json[0].value == "HIGH" %}
OFF
{% else %}
ON
{% endif %}
Thanks for all your hard work and well documented efforts. I just wanted to add a quick note to ensure you’re using the id not the uuid.
If you put the uuid in it will pass the configuration test and show green across the board but won’t actually be working. Learned that the hard way!
To test use:
curl -H “Content-Type: application/json” -H “Accept: application/json” -H “Authorization: evrythng_api_key” https://api.evrythng.com/thngs/id/properties/leakdetected?perPage=1&sortOrder=ASCENDING
Any idea if this solution will still work once the iHome cloud service and iHome Control app shuts down?
yeah, wondering the same thing. I just got the notification today from the app that its shutting down.
I’d assume the iSB02 shuts down at that time. I tried to do some MITM with it last weekend, but they send everything SSL and there’s no way to get a CA cert on that device to intercept anything.
So I tore it apart and plan to add a Wemos d1 mini into the enclosure and reuse it’s probes with ESPhome similar to this: ESPHome Water leak detector With a D1 mini board
Should be able to get about a year of life with the 2 AA batteries and deep sleep.
great idea. thanks for that.
looks like my sensors are still connecting to ihome cloud as of today.
Has anyone succeeded in connecting iHome devices to AppleTV hub ?