<commit_before># evrythng-freertos-sdk

# Intro

An MQTT based Evrythng demo application for the FreeRTOS simulator.

# Overview

The Evrythng demo application uses Evrythng API to work with Evrythng cloud. Demo applicatio is running on the FreeRTOS simulator.

## EVRYTHNG SDK Functions

* All Evrythng API functions are described in the following file:
```
Posix_GCC_Simulator/FreeRTOS_Posix/evrythng/evrythng.h
```

# Demo Application

* Location
```
Posix_GCC_Simulator/FreeRTOS_Posix/main.c
```
* The demo application for FreeRTOS demonstrates how to work with MQTT client. It connects to the Evrythng cloud and sends publish messages every five seconds.

## Compile and execution instructions

The instructions are the following:

* Copy certificate to file: 
```
Posix_GCC_Simulator/FreeRTOS_Posix/client.pem
```

* Build evrythng demo application using the next command:
```
cd Posix_GCC_Simulator/FreeRTOS_Posix/Release
make
```

* Run demo application:
```
./FreeRTOS_Posix
```

## How the demo application works

* Demo application subscribes to all the properties
* Demo application publishes "led" property every five seconds

# Sample execution

```
./FreeRTOS_Posix 
Running as PID: 8400
Client ID: 367535629
Encription enabled
Connecting
Evrythng client Connected
Publishing led: 1
Received message: [{"id":"55156509b09e71a487846207","timestamp":1427465481825,"key":"led","value":"1"}]
Publishing led: 0
Received message: [{"id":"5515650eb09e71a487846218","timestamp":1427465486820,"key":"led","value":"0"}]
```

#define THNG_ID "UCYg8n4ePBpRKpBsraepsbdb"
#define API_KEY "<KEY>"
#define EVRYTHNG_URL "tcp://mqtt.evrythng.com:1883"
#define EVRYTHNG_URL "ssl://mqtt.evrythng.com:443"


./build_debug/evrythng-demo --pub -u ssl://mqtt.evrythng.com:443 -t UCYg8n4ePBpRKpBsraepsbdb -k <KEY> -n led -c `pwd`/client.pem

<commit_msg>removing private info from readme<commit_after># evrythng-freertos-sdk

# Intro

An MQTT based Evrythng demo application for the FreeRTOS simulator.

# Overview

The Evrythng demo application uses Evrythng API to work with Evrythng cloud. Demo applicatio is running on the FreeRTOS simulator.

## EVRYTHNG SDK Functions

* All Evrythng API functions are described in the following file:
```
Posix_GCC_Simulator/FreeRTOS_Posix/evrythng/evrythng.h
```

# Demo Application

* Location
```
Posix_GCC_Simulator/FreeRTOS_Posix/main.c
```
* The demo application for FreeRTOS demonstrates how to work with MQTT client. It connects to the Evrythng cloud and sends publish messages every five seconds.

## Compile and execution instructions

The instructions are the following:

* Copy certificate to file: 
```
Posix_GCC_Simulator/FreeRTOS_Posix/client.pem
```

* Build evrythng demo application using the next command:
```
cd Posix_GCC_Simulator/FreeRTOS_Posix/Release
make
```

* Run demo application:
```
./FreeRTOS_Posix
```

## How the demo application works

* Demo application subscribes to all the properties
* Demo application publishes "led" property every five seconds

# Sample execution

```
./FreeRTOS_Posix 
Running as PID: 8400
Client ID: 367535629
Encription enabled
Connecting
Evrythng client Connected
Publishing led: 1
Received message: [{"id":"55156509b09e71a487846207","timestamp":1427465481825,"key":"led","value":"1"}]
Publishing led: 0
Received message: [{"id":"5515650eb09e71a487846218","timestamp":1427465486820,"key":"led","value":"0"}]
```

{'fraction_non_alphanumeric': 0.09903026741110785, 'fraction_numerical': 0.053482221569203646, 'mean_word_length': 5.753968253968254, 'pattern_counts': {'":': 16, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '582067', 'n_tokens_mistral': 1311, 'n_tokens_neox': 1143, 'n_words': 336}