<commit_before># BS440  v2.0.0
Python code to talk to Medisana BS440 bluetooth enabled bathroom scale
User managementboy reports succes with the Medisana BS444 too.

# Blog info
https://keptenkurk.wordpress.com/2016/02/07/connecting-the-medisana-bs440-bluetooth-scale/
with a full step-by-step installation instruction on
https://keptenkurk.wordpress.com/2017/03/05/connecting-the-medisana-bs440-bluetooth-scale-epilogue/

# Prequisits
* Installed Pygatt 3.0.0 release
* Installed BLE adapter
* Installed Bluez

# Tested on:
* Raspberry Pi B+ running latest Jessie
	4.4.38+ #938 
	Thu Dec 15 15:17:54 GMT 2016 armv6l GNU/Linux)
* USB bluetooth adapter:
	USB device found, idVendor=0a5c, idProduct=21e8
	USB device strings: Mfr=1, Product=2, SerialNumber=3
	Product: BCM20702A0
* Bluez 5.44 installed
* Pygatt 3.0.0 installed


# Description
BS440 listens for information from a Medisana BS430/BS440/BS444 or compatible bluetooth 
scale. When received, it passes the information to all found data processors found in
the plugin folder.

# Preferences
Before using this app, copy __BS440.example.ini_ to _BS440.ini_ and personalize your settings.
This file contains the general parameters for communicating with the scale.

# Plugins
Currenly these plugins are currently available
BS400mail: Mail the last 3 stored sets of data to the user
BS400csv : Store results locally in csv and graph results through webserver
BS440domoticz: Store data in virtual sensors of Domoticz home control system
BS440google: Store data to Google Fit account
BS440runalizel: Store data to local Runalyze database

Plugins are found in the plugin folder and named BS440pluginname.py. Each plugin uses
its private .ini file named BS440pluginname.ini
To enable a plugin, copy or symlink it to the name without leading underscore.
Eg.: `ln -s plugins/_BS440pluginname.py plugins/BS440mail.py`

Directions on how to install prequisits, configure and use a specific plugin is found
in the Wiki
  
##mail
Maintainer: Keptenkurk
Last 3 results are mailed to the user mail adress as configured in BS440mail.ini

## BS440csv
Maintainer: DjZU
Data is added to a local CSV file. Data is presented by running plotBS440.py which 
starts a webserver and serves graphs to the user.

## Domoticz
Maintainer: Tristan79 - Status: Testing
Configure the Domoticz and user details in BS440domoticz.ini.  
When data is received, the sensors will be automatically generated. That easy!

The optional option _hardware_name_ is the name of the dummy hardware to you can use,
if you leave it empty or commented it out, it uses _Medisana_ as default.

After a first run _BS440domoticz.ini_ is updated. In which you can override
the ids to use (if necessary). Note that the weight sensors are identified by _ID_ and _Unit_
while the other sensors are identified by _idx_ in _BS440domoticz.ini_.

![domoticz](https://raw.githubusercontent.com/Tristan79/BS440/master/BS440domoticz.png)

## BS440google
maintainer: managementboy - Status: Testing
BS440google updates weight and fat parameters in Google fit (http://fit.google.com)
For creating an account and authentication file please see the Wiki for this
repository.(https://github.com/keptenkurk/BS440/wiki/How-to-use-Google-Fit)

# Thanks to
Ch<NAME> - maintainer of Pygatt
Tristan79 - Domoticz plugin
DjZU - CSV plugin
managementboy - Google plugin
Raudi, Remb0, Edmundo

# Disclaimer
This software is build out of personal interest and not related to 
Medisana AG in any way.<commit_msg>Reformat, fix spelling and reword the plugin section a bit<commit_after># BS440  v2.0.0
Python code to talk to Medisana BS440 bluetooth enabled bathroom scale
User managementboy reports succes with the Medisana BS444 too.

# Blog info
https://keptenkurk.wordpress.com/2016/02/07/connecting-the-medisana-bs440-bluetooth-scale/
with a full step-by-step installation instruction on
https://keptenkurk.wordpress.com/2017/03/05/connecting-the-medisana-bs440-bluetooth-scale-epilogue/

# Prerequisites
* Installed Pygatt 3.0.0 release
* Installed BLE adapter
* Installed Bluez

# Tested on:
* Raspberry Pi B+ running latest Jessie
	4.4.38+ #938 
	Thu Dec 15 15:17:54 GMT 2016 armv6l GNU/Linux)
* USB bluetooth adapter:
	USB device found, idVendor=0a5c, idProduct=21e8
	USB device strings: Mfr=1, Product=2, SerialNumber=3
	Product: BCM20702A0
* Bluez
  * 5.44
  * 5.23-2+rpi2 (from package manager)
* Pygatt 3.0.0 installed


# Description
BS440 listens for information from a Medisana BS410/BS430/BS440/BS444 or compatible bluetooth 
scale. When received, it passes the information to all found data processors found in
the plugin folder.

# Preferences
Before using this app, copy __BS440.example.ini_ to _BS440.ini_ and personalize your settings.
This file contains the general parameters for communicating with the scale, and which plugins to use.

# Plugins
Currenly these plugins are available:
* BS440mail: Mail the last 3 stored sets of data to the user
* BS440csv: Store results locally in csv and graph results through webserver
* BS440domoticz: Store data in virtual sensors of Domoticz home control system
* BS440google: Store data to Google Fit account
* BS440runalizel: Store data to local Runalyze database

Plugins are found in the plugin folder and named BS440pluginname.py. Each plugin uses
its private .ini file named BS440pluginname.ini
To enable a plugin, add it to the `plugins` key in `BS440.ini`.

Directions on how to install prerequisites, configure and use a specific plugin is found
in the Wiki
  
## BS440mail
Maintainer: Keptenkurk

Last 3 results are mailed to the user mail adress as configured in BS440mail.ini

## BS440csv
Maintainer: DjZU

Data is added to a local CSV file. Data is presented by running plotBS440.py which 
starts a webserver and serves graphs to the user.

## Domoticz
Maintainer: Tristan79 - Status: Testing

Configure the Domoticz and user details in BS440domoticz.ini.  
When data is received, the sensors will be automatically generated. That easy!

The optional option _hardware_name_ is the name of the dummy hardware to you can use,
if you leave it empty or commented it out, it uses _Medisana_ as default.

After a first run _BS440domoticz.ini_ is updated. In which you can override
the ids to use (if necessary). Note that the weight sensors are identified by _ID_ and _Unit_
while the other sensors are identified by _idx_ in _BS440domoticz.ini_.

![domoticz](https://raw.githubusercontent.com/Tristan79/BS440/master/BS440domoticz.png)

## BS440google
maintainer: managementboy - Status: Testing

BS440google updates weight and fat parameters in Google fit (http://fit.google.com)
For creating an account and authentication file please see the Wiki for this
repository.(https://github.com/keptenkurk/BS440/wiki/How-to-use-Google-Fit)

# Thanks to
* <NAME> - maintainer of Pygatt
* Tristan79 - Domoticz plugin
* DjZU - CSV plugin
* managementboy - Google plugin
* Raudi, Remb0, Edmundo

# Disclaimer
This software is built out of personal interest and not related to 
Medisana AG in any way.
{'fraction_non_alphanumeric': 0.05783714651129743, 'fraction_numerical': 0.047747619724314336, 'mean_word_length': 4.6124401913875595, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1388627', 'n_tokens_mistral': 2363, 'n_tokens_neox': 2105, 'n_words': 908}