Withings WS-50 Scale Syncer - Temperature & CO2

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.
dynasticorpheus
Posts: 114
Joined: Monday 12 October 2015 15:26
Target OS: Linux
Domoticz version: 2.3295
Location: NL
Contact:

Withings WS-50 Scale Syncer - Temperature & CO2

Post by dynasticorpheus » Monday 08 February 2016 11:08

Image

[SCRIPT]
https://github.com/dynasticorpheus/ws50-sync

[FUNCTIONALITY]
* Downloads temperature & CO2 measurements from the Withings website and writes them to the Domoticz data base. Not available via official Withings API hence this script.

[TO-DO]
* Add weight support
* More sanity checks

[INSTALLATION]
1. Go to Domoticz GUI
2. Add hardware - dummy
3. Create a new virtual sensor - type Air Quality (remember the idx number)
4. Create a new virtual sensor - type Temperature (remember the idx number)
5. Run script (test) python ws50-sync.py -u jane.doe@mail.com -p mybigsecret -c 10 -t 11 -d domoticz.db --noaction
5. Run script (live) python ws50-sync.py -u jane.doe@mail.com -p mybigsecret -c 10 -t 11 -d domoticz.db

[HELP]

Code: Select all

Withings WS-50 Syncer by dynasticorpheus@gmail.com

optional arguments:
  -h, --help            show this help message and exit
  -u USERNAME, --username USERNAME
                        username (email) in use with account.withings.com
  -p PASSWORD, --password PASSWORD
                        password in use with account.withings.com
  -c CO2, --co2 CO2     co2 idx
  -t TEMPERATURE, --temperature TEMPERATURE
                        temperature idx
  -d DATABASE, --database DATABASE
                        fully qualified name of database-file
  -n, --noaction        do not update database
[DISCLAIMER]
As this script writes directly to the Domoticz database (so it has the correct time stamps) please make a backup before doing anything else! Please also note that writing to the DB directly is not something one should normally do so do not expect any support from the domoticz devs.

dynasticorpheus
Posts: 114
Joined: Monday 12 October 2015 15:26
Target OS: Linux
Domoticz version: 2.3295
Location: NL
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by dynasticorpheus » Tuesday 09 February 2016 9:54

djgodlike wrote:I got some data on the air quality graph! It doesn't fill the temperature graph though..
Which results does it download? It downloaded data from 7-02-16 18:00 till 8-02-16 05:00.
Is it wise to make a cron script every 12 hours, or not in this stage yet?

Code: Select all

DISKSTATION> /volume2/homes/admin/DomoticzScripts/ws50-sync.py -u ********* -p ********** -c 103 -t 104 -d /volume2/@appstore/domoticz/var/domoticz.db -n

Withings WS-50 Syncer Version 0.2.0

[-] Database /volume2/@appstore/domoticz/var/domoticz.db
[-] Authenticating at account.withings.com
[-] Downloading data newer than 2016-02-07 09:45:00
[-] Updating database with 39 CO2 measurements [FALSE]
[-] Updating database with 39 TEMPERATURE measurements [FALSE]

DISKSTATION> /volume2/homes/admin/DomoticzScripts/ws50-sync.py -u -u ********* -p ********** -c 103 -t 104 -d /volume2/@appstore/domoticz/var/domoticz.db   

Withings WS-50 Syncer Version 0.2.0

[-] Database /volume2/@appstore/domoticz/var/domoticz.db
[-] Authenticating at account.withings.com
[-] Downloading data newer than 2016-02-07 09:45:00
[-] Updating database with 39 CO2 measurements [TRUE]
[-] Updating database with 39 TEMPERATURE measurements [TRUE]
[-] Committing and closing database
Thanks for working on this!!
Can you run the below command and provide me the output? (this does not write anything to the DB so don't worry)

Code: Select all

sqlite3 /volume2/@appstore/domoticz/var/domoticz.db "select * from TEMPERATURE WHERE DeviceRowID = 104;"

djgodlike
Posts: 30
Joined: Wednesday 27 January 2016 17:37
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by djgodlike » Tuesday 09 February 2016 12:12

dynasticorpheus wrote: Can you run the below command and provide me the output? (this does not write anything to the DB so don't worry)

Code: Select all

sqlite3 /volume2/@appstore/domoticz/var/domoticz.db "select * from TEMPERATURE WHERE DeviceRowID = 104;"

Here is the output, but the graph stays flat. Shall i try to remove and add the sensor?

Code: Select all

DISKSTATION> sqlite3 /volume2/@appstore/domoticz/var/domoticz.db "select * from TEMPERATURE WHERE DeviceRowID = 104;"
104|17.1|0.0|0|0|0.0|0|2016-02-08 19:30:08
104|17.1|0.0|0|0|0.0|0|2016-02-08 20:00:13
104|17.2|0.0|0|0|0.0|0|2016-02-08 20:30:12
104|17.2|0.0|0|0|0.0|0|2016-02-08 21:00:12
104|17.2|0.0|0|0|0.0|0|2016-02-08 21:30:13
104|17.3|0.0|0|0|0.0|0|2016-02-08 22:00:12
104|17.3|0.0|0|0|0.0|0|2016-02-08 22:30:13
104|17.3|0.0|0|0|0.0|0|2016-02-08 23:00:12
104|17.4|0.0|0|0|0.0|0|2016-02-08 23:30:13
104|17.4|0.0|0|0|0.0|0|2016-02-09 00:00:12
104|17.4|0.0|0|0|0.0|0|2016-02-09 00:30:13
104|17.5|0.0|0|0|0.0|0|2016-02-09 01:00:12
104|17.6|0.0|0|0|0.0|0|2016-02-09 01:30:13
104|17.6|0.0|0|0|0.0|0|2016-02-09 02:00:12
104|17.6|0.0|0|0|0.0|0|2016-02-09 02:30:13
104|17.7|0.0|0|0|0.0|0|2016-02-09 03:00:12
104|17.7|0.0|0|0|0.0|0|2016-02-09 03:30:13
104|17.7|0.0|0|0|0.0|0|2016-02-09 04:00:12
104|17.7|0.0|0|0|0.0|0|2016-02-09 04:30:13
104|17.8|0.0|0|0|0.0|0|2016-02-09 05:00:12
104|17.8|0.0|0|0|0.0|0|2016-02-09 05:30:13
104|17.8|0.0|0|0|0.0|0|2016-02-09 06:00:12
104|17.8|0.0|0|0|0.0|0|2016-02-09 06:30:13
104|17.8|0.0|0|0|0.0|0|2016-02-09 07:00:12
104|17.8|0.0|0|0|0.0|0|2016-02-09 07:30:13
104|17.8|0.0|0|0|0.0|0|2016-02-09 08:00:12
104|17.8|0.0|0|0|0.0|0|2016-02-09 08:30:13
104|17.8|0.0|0|0|0.0|0|2016-02-09 09:00:12
Aeon Labs Gen5 USB
Greenwave Powernode 6 NS310
2x Greenwave Powernode 1 NS310
Philips Hue
Logitech media Server
Plugwise Smile P1

dynasticorpheus
Posts: 114
Joined: Monday 12 October 2015 15:26
Target OS: Linux
Domoticz version: 2.3295
Location: NL
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by dynasticorpheus » Tuesday 09 February 2016 13:19

djgodlike wrote:
dynasticorpheus wrote: Can you run the below command and provide me the output? (this does not write anything to the DB so don't worry)

Code: Select all

sqlite3 /volume2/@appstore/domoticz/var/domoticz.db "select * from TEMPERATURE WHERE DeviceRowID = 104;"

Here is the output, but the graph stays flat. Shall i try to remove and add the sensor?

Code: Select all

DISKSTATION> sqlite3 /volume2/@appstore/domoticz/var/domoticz.db "select * from TEMPERATURE WHERE DeviceRowID = 104;"

104|17.1|0.0|0|0|0.0|0|2016-02-08 19:30:08
Can you also provide me the output of the below command:

Code: Select all

sqlite3 /volume2/@appstore/domoticz/var/domoticz.db "PRAGMA table_info(Temperature);"

djgodlike
Posts: 30
Joined: Wednesday 27 January 2016 17:37
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by djgodlike » Tuesday 09 February 2016 13:21

dynasticorpheus wrote:
Can you also provide me the output of the below command:

Code: Select all

sqlite3 /volume2/@appstore/domoticz/var/domoticz.db "PRAGMA table_info(Temperature);"

Code: Select all

DISKSTATION> sqlite3 /volume2/@appstore/domoticz/var/domoticz.db "PRAGMA table_info(Temperature);"
0|DeviceRowID|BIGINT(10)|1||0
1|Temperature|FLOAT|1||0
2|Chill|FLOAT|0|0|0
3|Humidity|INTEGER|0|0|0
4|Barometer|INTEGER|0|0|0
5|DewPoint|FLOAT|0|0|0
6|Date|DATETIME|0|datetime('now','localtime')|0
7|SetPoint|FLOAT|0|0|0
Aeon Labs Gen5 USB
Greenwave Powernode 6 NS310
2x Greenwave Powernode 1 NS310
Philips Hue
Logitech media Server
Plugwise Smile P1

dynasticorpheus
Posts: 114
Joined: Monday 12 October 2015 15:26
Target OS: Linux
Domoticz version: 2.3295
Location: NL
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by dynasticorpheus » Tuesday 09 February 2016 15:54

djgodlike wrote:
dynasticorpheus wrote:
Can you also provide me the output of the below command:

Code: Select all

sqlite3 /volume2/@appstore/domoticz/var/domoticz.db "PRAGMA table_info(Temperature);"

Code: Select all

DISKSTATION> sqlite3 /volume2/@appstore/domoticz/var/domoticz.db "PRAGMA table_info(Temperature);"
0|DeviceRowID|BIGINT(10)|1||0
1|Temperature|FLOAT|1||0
2|Chill|FLOAT|0|0|0
3|Humidity|INTEGER|0|0|0
4|Barometer|INTEGER|0|0|0
5|DewPoint|FLOAT|0|0|0
6|Date|DATETIME|0|datetime('now','localtime')|0
7|SetPoint|FLOAT|0|0|0
The script was not smart enough to deal with a different row order in the DB. Should now be fixed using latest version from github. Please try again after removing and recreating both virtual devices.

djgodlike
Posts: 30
Joined: Wednesday 27 January 2016 17:37
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by djgodlike » Wednesday 10 February 2016 14:16

Looks like with the new script it doesn't get any results.. Keep getting 0 results.
And it only downloads data newer then when you execute the script?
Aeon Labs Gen5 USB
Greenwave Powernode 6 NS310
2x Greenwave Powernode 1 NS310
Philips Hue
Logitech media Server
Plugwise Smile P1

User avatar
ThinkPad
Posts: 1754
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by ThinkPad » Wednesday 10 February 2016 14:23

Why would you want to write directly to the domoticz.db database? Seems like a very failure-prone situation to me. If you're not careful, you could mess up your whole database...

Just create virtual sensors and put the data in them by calling the JSON API of Domoticz from your script (which is a simple curl/wget command).
ThinkTheme - theme for Domoticz
My (Dutch) blog: http://thinkpad.tweakblogs.net - My Domoticz scripts: Bitbucket
I'm not (very) active anymore on this forum as i don't use Domoticz anymore.

dynasticorpheus
Posts: 114
Joined: Monday 12 October 2015 15:26
Target OS: Linux
Domoticz version: 2.3295
Location: NL
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by dynasticorpheus » Thursday 11 February 2016 11:18

ThinkPad wrote:Why would you want to write directly to the domoticz.db database? Seems like a very failure-prone situation to me. If you're not careful, you could mess up your whole database...

Just create virtual sensors and put the data in them by calling the JSON API of Domoticz from your script (which is a simple curl/wget command).

Fooling around on DB level is never the preferred solution hence my disclaimer in OP.

Since we are updating retrospectively (scale only uploads the data once or twice a day) we need to find a way to keep the original time stamps of the measurements. I don't think the regular API allows you to also provide this or am I missing something?

dynasticorpheus
Posts: 114
Joined: Monday 12 October 2015 15:26
Target OS: Linux
Domoticz version: 2.3295
Location: NL
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by dynasticorpheus » Thursday 11 February 2016 11:39

djgodlike wrote:Looks like with the new script it doesn't get any results.. Keep getting 0 results.
And it only downloads data newer then when you execute the script?
Working ok for me so can you run below 3 commands to see if it helps? Assuming idx 103 = CO2 and 104 = Temperature, if not change them in the correct values. As this forces the full update I would recommend to stop domoticz whilst doing this.

Code: Select all

sqlite3 /volume2/@appstore/domoticz/var/domoticz.db "DELETE FROM TEMPERATURE WHERE DeviceRowID = 104;"

Code: Select all

sqlite3 /volume2/@appstore/domoticz/var/domoticz.db "DELETE FROM METER WHERE DeviceRowID = 103;"

Code: Select all

/volume2/homes/admin/DomoticzScripts/ws50-sync.py -u ********* -p ********** -c 103 -t 104 -d /volume2/@appstore/domoticz/var/domoticz.db

dynasticorpheus
Posts: 114
Joined: Monday 12 October 2015 15:26
Target OS: Linux
Domoticz version: 2.3295
Location: NL
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by dynasticorpheus » Wednesday 24 February 2016 17:14

djgodlike wrote:Looks like with the new script it doesn't get any results.. Keep getting 0 results.
And it only downloads data newer then when you execute the script?
Did a complete rewrite of the code and it now seems to work like it should.

1. run the script once with additional options --full --delete to load the complete history
2. run the script once or twice a day without these extra 2 options

Let me know if works for you as well.

Nautilus
Posts: 756
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi
Domoticz version: beta
Location: Finland
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by Nautilus » Friday 26 February 2016 23:56

dynasticorpheus wrote:
djgodlike wrote:Looks like with the new script it doesn't get any results.. Keep getting 0 results.
And it only downloads data newer then when you execute the script?
Did a complete rewrite of the code and it now seems to work like it should.

1. run the script once with additional options --full --delete to load the complete history
2. run the script once or twice a day without these extra 2 options

Let me know if works for you as well.
Hi,

thanks for the script, now that I have the scale I'd like to try it... :) As I did not see a --delete option in the current version, should I use --remove instead? If I understood correctly you also plan to include weight (possibly lean/fat mass & heart rate as well?) updating, any estimate when this option might be added? :)

dynasticorpheus
Posts: 114
Joined: Monday 12 October 2015 15:26
Target OS: Linux
Domoticz version: 2.3295
Location: NL
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by dynasticorpheus » Monday 29 February 2016 11:00

Nautilus wrote:
dynasticorpheus wrote:
djgodlike wrote:Looks like with the new script it doesn't get any results.. Keep getting 0 results.
And it only downloads data newer then when you execute the script?
Did a complete rewrite of the code and it now seems to work like it should.

1. run the script once with additional options --full --delete to load the complete history
2. run the script once or twice a day without these extra 2 options

Let me know if works for you as well.
Hi,

thanks for the script, now that I have the scale I'd like to try it... :) As I did not see a --delete option in the current version, should I use --remove instead? If I understood correctly you also plan to include weight (possibly lean/fat mass & heart rate as well?) updating, any estimate when this option might be added? :)
sorry that should indeed be: --full --remove

For now no ETA on the other measurements as they are available through the official api and also do not have a real link with home automation. I will look into it but no promises yet...

Nautilus
Posts: 756
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi
Domoticz version: beta
Location: Finland
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by Nautilus » Monday 29 February 2016 23:03

dynasticorpheus wrote: sorry that should indeed be: --full --remove

For now no ETA on the other measurements as they are available through the official api and also do not have a real link with home automation. I will look into it but no promises yet...
Ok, thanks! Will look into the official api on how to retrieve the measurements... :)

dynasticorpheus
Posts: 114
Joined: Monday 12 October 2015 15:26
Target OS: Linux
Domoticz version: 2.3295
Location: NL
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by dynasticorpheus » Tuesday 01 March 2016 15:21

Nautilus wrote:
dynasticorpheus wrote: sorry that should indeed be: --full --remove

For now no ETA on the other measurements as they are available through the official api and also do not have a real link with home automation. I will look into it but no promises yet...
Ok, thanks! Will look into the official api on how to retrieve the measurements... :)
Github already has some projects which are making use of the official API so should not be hard to link it with Domoticz.

Nautilus
Posts: 756
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi
Domoticz version: beta
Location: Finland
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by Nautilus » Tuesday 01 March 2016 23:49

dynasticorpheus wrote: Github already has some projects which are making use of the official API so should not be hard to link it with Domoticz.
Whoa, quite a lot actually now that I looked, need to investigate a little which would be the appropriate solution for my RPi2 platform.

Also, I was finally able to test this script but run into some trouble with authentication:

Code: Select all

Withings WS-50 Syncer Version 0.4.1

[-] Attaching database /home/pi/domoticz/domoticz.db [version 101]
[-] Authenticating at account.withings.com
Traceback (most recent call last):
  File "/home/pi/domoticz/scripts/ws50-sync.py", line 226, in <module>
    main()
  File "/home/pi/domoticz/scripts/ws50-sync.py", line 189, in main
    deviceid, sessionkey = authenticate_withings(args.username, args.password)
  File "/home/pi/domoticz/scripts/ws50-sync.py", line 99, in authenticate_withings
    jar = s.cookies.get_dict()
AttributeError: 'RequestsCookieJar' object has no attribute 'get_dict'
Could there be some problem with the requests library? I'm running this on RPi2 and installed it via "apt-get install python-requests". Also, first time I tested I noticed I had a typo in the username - but it should not affect the following attempts with the correct username, right? :)

Any troubleshooting ideas would be most welcome... :D

dynasticorpheus
Posts: 114
Joined: Monday 12 October 2015 15:26
Target OS: Linux
Domoticz version: 2.3295
Location: NL
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by dynasticorpheus » Thursday 03 March 2016 12:14

Nautilus wrote:
dynasticorpheus wrote: Github already has some projects which are making use of the official API so should not be hard to link it with Domoticz.
Whoa, quite a lot actually now that I looked, need to investigate a little which would be the appropriate solution for my RPi2 platform.

Also, I was finally able to test this script but run into some trouble with authentication:

Code: Select all

Withings WS-50 Syncer Version 0.4.1

[-] Attaching database /home/pi/domoticz/domoticz.db [version 101]
[-] Authenticating at account.withings.com
Traceback (most recent call last):
  File "/home/pi/domoticz/scripts/ws50-sync.py", line 226, in <module>
    main()
  File "/home/pi/domoticz/scripts/ws50-sync.py", line 189, in main
    deviceid, sessionkey = authenticate_withings(args.username, args.password)
  File "/home/pi/domoticz/scripts/ws50-sync.py", line 99, in authenticate_withings
    jar = s.cookies.get_dict()
AttributeError: 'RequestsCookieJar' object has no attribute 'get_dict'
Could there be some problem with the requests library? I'm running this on RPi2 and installed it via "apt-get install python-requests". Also, first time I tested I noticed I had a typo in the username - but it should not affect the following attempts with the correct username, right? :)

Any troubleshooting ideas would be most welcome... :D
Every time you start the script a new requests session is initialized so "old" cookies with a wrong username/password should not have any influence.

The next version of the script will have some more error checking. Strangely enough a wrong username/password does not generate a HTTP 401 (“Unauthorized”) code so I added a bit more logic to cope with this.

Meanwhile you can try and install requests via PIP ensuring you have the latest version?

EDIT: new version of script is now available

Nautilus
Posts: 756
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi
Domoticz version: beta
Location: Finland
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by Nautilus » Thursday 03 March 2016 19:24

dynasticorpheus wrote:
Every time you start the script a new requests session is initialized so "old" cookies with a wrong username/password should not have any influence.

The next version of the script will have some more error checking. Strangely enough a wrong username/password does not generate a HTTP 401 (“Unauthorized”) code so I added a bit more logic to cope with this.

Meanwhile you can try and install requests via PIP ensuring you have the latest version?

EDIT: new version of script is now available
Ok, that is what I thought so that should not be an issue. Seems "pip install" is not available on RPi by default at least. But at least I was using an updated package list for apt-get - but can it still be some older version? With the latest script I now get:

Code: Select all

Traceback (most recent call last):
  File "/home/pi/domoticz/scripts/ws50-sync.py", line 32, in <module>
    s.mount("http://", requests.adapters.HTTPAdapter(max_retries=3))
AttributeError: 'Session' object has no attribute 'mount'

dynasticorpheus
Posts: 114
Joined: Monday 12 October 2015 15:26
Target OS: Linux
Domoticz version: 2.3295
Location: NL
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by dynasticorpheus » Thursday 03 March 2016 20:43

hmmm this really seems like a requests issue. Please try:

1) uninstall current version of requests: apt-get remove python-requests
2a) read pip install instructions https://pip.pypa.io/en/stable/installing
2b) download pip install file: wget https://bootstrap.pypa.io/get-pip.py
3) install pip: python get-pip.py
4) install requests: (sudo) pip install requests

Nautilus
Posts: 756
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi
Domoticz version: beta
Location: Finland
Contact:

Re: Withings WS-50 Scale Syncer - Temperature & CO2

Post by Nautilus » Thursday 03 March 2016 21:15

dynasticorpheus wrote:hmmm this really seems like a requests issue. Please try:

1) uninstall current version of requests: apt-get remove python-requests
2a) read pip install instructions https://pip.pypa.io/en/stable/installing
2b) download pip install file: wget https://bootstrap.pypa.io/get-pip.py
3) install pip: python get-pip.py
4) install requests: (sudo) pip install requests
Great, thanks for the support, really appreciate it :) I think we're advancing:

Code: Select all

Withings WS-50 Syncer Version 0.4.2

[-] Dry run mode enabled, no changes to the database will be made
[-] Attaching database /home/pi/domoticz/domoticz.db [version 101]
[-] Authenticating at account.withings.com
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
[-] Downloading all measurements recorded after 2016-03-02 21:10:28 (24 hour limit)
[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,782,'2016-03-02 21:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,812,'2016-03-02 22:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,784,'2016-03-02 22:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,801,'2016-03-02 23:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,801,'2016-03-02 23:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,863,'2016-03-03 00:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,906,'2016-03-03 00:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,818,'2016-03-03 01:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,939,'2016-03-03 01:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,910,'2016-03-03 02:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,911,'2016-03-03 02:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,939,'2016-03-03 03:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,894,'2016-03-03 03:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,880,'2016-03-03 04:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,924,'2016-03-03 04:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,895,'2016-03-03 05:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,912,'2016-03-03 05:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,897,'2016-03-03 06:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,866,'2016-03-03 06:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,885,'2016-03-03 07:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,878,'2016-03-03 07:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,788,'2016-03-03 08:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,824,'2016-03-03 08:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,797,'2016-03-03 09:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,723,'2016-03-03 09:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,660,'2016-03-03 10:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,586,'2016-03-03 10:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,721,'2016-03-03 11:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,764,'2016-03-03 11:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,700,'2016-03-03 12:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,716,'2016-03-03 12:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,636,'2016-03-03 13:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,680,'2016-03-03 13:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,649,'2016-03-03 14:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,604,'2016-03-03 14:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,678,'2016-03-03 15:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,617,'2016-03-03 15:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,555,'2016-03-03 16:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,555,'2016-03-03 16:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,572,'2016-03-03 17:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,604,'2016-03-03 17:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,589,'2016-03-03 18:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,559,'2016-03-03 18:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,532,'2016-03-03 19:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,505,'2016-03-03 19:30:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,520,'2016-03-03 20:00:[-] INSERT INTO Meter(DeviceRowID,Value,Date) VALUES (111,506,'2016-03-03 20:30:[-] Updating CO2 HOURLY table with 47 measurements [FALSE]
[-] Downloading all measurements recorded after 2016-03-02 21:10:28 (24 hour limit)
[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.8,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.8,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.8,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.7,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.7,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.7,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.7,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.7,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.6,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.6,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.6,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.5,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.5,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.5,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.5,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.5,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.5,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.4,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.4,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.9,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.6,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.4,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.3,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.2,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.1,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.1,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.1,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.1,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.2,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.3,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.4,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.4,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.5,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.5,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.6,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.6,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.6,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.6,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.7,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.7,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.6,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.6,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.5,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.4,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.3,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.3,'2016[-] INSERT INTO Temperature(DeviceRowID,Temperature,Date) VALUES (112,21.3,'2016[-] Updating TEMPERATURE HOURLY table with 47 measurements [FALSE]
[-] Nothing to commit, closing database
Not sure what is the reason behind the warnings in the beginning:
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/late ... ingwarning.
SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/late ... ormwarning.
InsecurePlatformWarning

Maybe some inconsistency at Withings api's end? But I guess it would still try to insert something now onto the database. But is the date stamp incorrect, I can only see the year?

Edit: date for CO2 seems to be ok, problem only with temp values...

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest