openhab/openhab — pull request #1695 by teichsta (2014-11-20 14:03:08+00:00)
Title: [Withings] Enable multiple accounts

The main change lies in parsing the openhab.cfg file differently. One can simply add the needed parameters like this

withings-oauth:userid=4866592
withings-oauth:consumerkey=74c0e77021ef5be1ec8dcb4dd88c1xckusadwe92f9541c86799dcbbfcb8fc8b236
withings-oauth:consumersecret=25f1098209xns511711b3287288f90740ff45532cef91658c5043db0b0e0c851c
withings-oauth:token=e587df2b08fec066c7643081c649e8517987f6c25d8089d4230987399e28d6
withings-oauth:tokensecret=7c16e5f2f1f5fd784211bfff7c1435jh2d9419e503c5d079e114719b66dcef9

or additionally add an user id to which this credentials belong to like:

withings-oauth:thomas.consumerkey=74c0e77021ef5be1ec8dcb4dd88c1xckusadwe92f9541c86799dcbbfcb8fc8b236
withings-oauth:thomas.consumersecret=25f1098209xns511711b3287288f90740ff45532cef91658c5043db0b0e0c851c
...

oauth:peter.consumerkey=74c0e77021ef5be1ec8dcb4dd88c1xckusadwe92f9541c86799dcbbfcb8fc8b236
withings-oauth:peter.consumersecret=25f1098209xns511711b3287288f90740ff45532cef91658c5043db0b0e0c851c

Furthermore: if there were no values stored into openhab.cfg yet the Binding store it's values into the file services/withings-oauth.cfg which goes into the ESH way of storing config values.

Best, Thomas E.-E.