<commit_before># Kotio

Home automation application for
* controlling devices via [tellstick duo](http://old.telldus.com/products/tellstick_duo)
* reading sensors via [tellstick duo](http://old.telldus.com/products/tellstick_duo)
* reading sensors via [ruuvitag](https://ruuvitag.com/)

## Status

Currently the server is able to scan for ruuvitag beacons and return their sensor data as JSON.

## Development

### Server

Both tellstick and ruuvitag node libraries require node-gyp so make sure you have it installed: `npm install -g node-gyp`.

Tellstick also requires the tellstick dev library, see https://github.com/Hexagon/node-telldus#installation for details.

Accessing bluetooth advertising **requires** sudo/root privileges or a [noble workaround](https://github.com/sandeepmistry/noble#running-on-linux)

#### Install dependencies
<commit_msg>Update readme to contain instructions how to run server on Raspberry Pi<commit_after># Kotio

Home automation application for
* controlling switches via [tellstick duo](http://old.telldus.com/products/tellstick_duo)
* reading sensors via [tellstick duo](http://old.telldus.com/products/tellstick_duo)
* reading sensors via [ruuvitag](https://ruuvitag.com/)

## Status

Currently the server is able to scan for ruuvitag beacons and return their sensor data as JSON.

Some initial testing has been done with tellstick to scan for switches and turn on and off switches, and to read tellstcik compatible sensors.

## Development

### Server

Server runs on node.js. I have used v6.10.3 on my development computer and v6.9.1 on my original Raspberry Pi B.

#### Tellstick

Tellstick requires the tellstick dev library

  `sudo apt-get install libtelldus-core-dev`

#### Bluetooth

Accessing bluetooth advertising **requires** sudo/root privileges or a [noble workaround](https://github.com/sandeepmistry/noble#running-on-linux)

Bluetooth requires some utilities https://github.com/sandeepmistry/noble#linux. You can omit `bluez` if you are using Raspberry Pi and you need to install bluez manually (next section).

`sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev`

##### Raspberry Pi and Bluetooth

Raspberry Pi and bluetooth low energy is a bit harder operation, see http://www.elinux.org/RPi_Bluetooth_LE if you are running RPi with wheezy or https://learn.adafruit.com/install-bluez-on-the-raspberry-pi/installation if you are running RPi with jessie.

#### Node.js on original Raspberry Pi or Raspberry Pi Zero

Steven de Salas has a nice git repository that contains scripts to install node.js on older RPi's https://github.com/sdesalas/node-pi-zero.

Both tellstick and ruuvitag node libraries require node-gyp so make sure you have it installed: `npm install -g node-gyp`.

#### Install dependencies

{'fraction_non_alphanumeric': 0.08678429960388909, 'fraction_numerical': 0.0025207057976233344, 'mean_word_length': 4.860759493670886, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2692106', 'n_tokens_mistral': 853, 'n_tokens_neox': 796, 'n_words': 311}