Withings sleep with IFTTT to Domoticz Topic is solved
Moderator: leecollings
-
- Posts: 5
- Joined: Sunday 08 September 2019 23:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Withings sleep with IFTTT to Domoticz
Hi guys and girls,
I have a Withings sleep monitor (https://www.withings.com/nl/en/sleep)
Works great, can monitor my sleep very well.
Now this device comes with "IFTTT" support , it can give a trigger when you go in bed and one if you leave your bed.
Now i have Domoticz and have set it up to receive a trigger from IFTTT, with help from this page :
https://www.domoticz.com/wiki/IFTTT_int ... h_Domoticz.
so i created a dummy switch which should be triggerd by IFTTT
made a special user in domoticz so IFTT can swith the virtual switch "Dummytest"'
and i made webhook at IFTTT with the following url :
all between "<" and ">" are private
https://<my publicdomoticzip>:443/json.htm?<usernameandpasword>&type=command¶m=udevice&idx=1490&nvalue=1&svalue=DummyTest
the user name and pasw are 64 bit encoded.
Now i can see in my domoticz log IFTTT can reach my domoticz but the switch is not working
Does anyone know the correct url should be ?
or point me at a page with better instructions ?
Have been trying to fix this for many hours, serached this forum
googled also etc.
Thanks in advance
I have a Withings sleep monitor (https://www.withings.com/nl/en/sleep)
Works great, can monitor my sleep very well.
Now this device comes with "IFTTT" support , it can give a trigger when you go in bed and one if you leave your bed.
Now i have Domoticz and have set it up to receive a trigger from IFTTT, with help from this page :
https://www.domoticz.com/wiki/IFTTT_int ... h_Domoticz.
so i created a dummy switch which should be triggerd by IFTTT
made a special user in domoticz so IFTT can swith the virtual switch "Dummytest"'
and i made webhook at IFTTT with the following url :
all between "<" and ">" are private
https://<my publicdomoticzip>:443/json.htm?<usernameandpasword>&type=command¶m=udevice&idx=1490&nvalue=1&svalue=DummyTest
the user name and pasw are 64 bit encoded.
Now i can see in my domoticz log IFTTT can reach my domoticz but the switch is not working
Does anyone know the correct url should be ?
or point me at a page with better instructions ?
Have been trying to fix this for many hours, serached this forum
googled also etc.
Thanks in advance
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Withings sleep with IFTTT to Domoticz
https://<my publicdomoticzip>:443/json.htm?idx=1490¶m=switchlight&switchcmd=On&type=command
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 543
- Joined: Saturday 02 July 2016 5:17
- Target OS: Linux
- Domoticz version: Beta
- Contact:
Re: Withings sleep with IFTTT to Domoticz
That sensor looks pretty cool, I don't yet have anything like that, I'm using a motion sensors logic approach at the moment for Domoticz to determine if I am in bed or not.
Couple of questions:
1) Is it obvious under the bed? Looking at the photos it appears thick?
2) Do you know if the WiFi is inside the part that goes under the bed or a control unit?
Cheers
Couple of questions:
1) Is it obvious under the bed? Looking at the photos it appears thick?
2) Do you know if the WiFi is inside the part that goes under the bed or a control unit?
Cheers
Unless otherwise stated, all my code is released under GPL 3 license: https://www.gnu.org/licenses/gpl-3.0.en.html
-
- Posts: 5
- Joined: Sunday 08 September 2019 23:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Withings sleep with IFTTT to Domoticz
Thanks for the quick reply , one question : were do i put the username and pasword in the url ?
and what kind of rights do i give the user IFTTT in "user settings"' of domoticz ? "Úser" or "admin"'
-
- Posts: 5
- Joined: Sunday 08 September 2019 23:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Withings sleep with IFTTT to Domoticz
1 ) The whole sensor is 62 x 19 cm and is aprox 1 cm thick, you dont feel it at all because you can put it under your matras, its has a small box with the electronics inside , and the rest is like a plastic membrame which gets inflatedben53252642 wrote: ↑Monday 09 September 2019 5:55 That sensor looks pretty cool, I don't yet have anything like that, I'm using a motion sensors logic approach at the moment for Domoticz to determine if I am in bed or not.
Couple of questions:
1) Is it obvious under the bed? Looking at the photos it appears thick?
2) Do you know if the WiFi is inside the part that goes under the bed or a control unit?
Cheers
at bit , its calibrated autmatic eavh day ( when your not in your bed of course)
my top matras is 8cm and below matras is 10 cm , so it looks like this :
top matras-------------- 6cm
sensor -------------------1cm
Lower matras-----------10 cm
The Wifi is inside the part that goes under the matras, but i looked at my router, its not connected to wifi all the time.
I suspect it will make a short connection when you get into bed, and also a short contact when you leave your bed.
Its a remarkable device , i paid about 60 euro for it when it was on sale in Sweden
you can also find it as a Nokia sleep.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Withings sleep with IFTTT to Domoticz
Code: Select all
https://<my publicdomoticz IP>:443/json.htm?username=<coded username>&password=<coded password>&type=command&idx=1490¶m=switchlight&switchcmd=On&type=command
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 5
- Joined: Sunday 08 September 2019 23:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Withings sleep with IFTTT to Domoticz
YES YES YES it works ! , thanks a lot , and it even works with user with user rightswaaren wrote: ↑Monday 09 September 2019 20:42I have the user as Admin and do think it's necessary to be able to call the API but not 100% sure if that is really needed. So I suggest you start testing with a user with admin rights and if that works change it to user and test again.Code: Select all
https://<my publicdomoticz IP>:443/json.htm?username=<coded username>&password=<coded password>&type=command&idx=1490¶m=switchlight&switchcmd=On&type=command
now i can automate even more

-
- Posts: 108
- Joined: Sunday 23 February 2014 21:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.5613
- Location: Netherlands
- Contact:
Re: Withings sleep with IFTTT to Domoticz
Just curious, how did this help you connect Withings Sleep with Domoticz? I do get it for the URL, but how to use this as a switch for Withings? What does this switch show?
-
- Posts: 5
- Joined: Sunday 08 September 2019 23:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Withings sleep with IFTTT to Domoticz
Hi, It works like this :
Person gets into bed , Withings sleep sends a message to IFTTT, In IFTTT i made a webhook (the url ) this send a message
to my Domoticz to a virtual switch ( not a real one) in Domoticz . so person in bed switch is on , no person in bed switch is off.
Now with blockly i can let the status of that (virtual )switch control other switches ( like switch of all main lights when person is in Bed) etc.
Who is online
Users browsing this forum: No registered users and 1 guest