<commit_before># HIoH (Home IoT Hub)

HIoH is a Web accesible Hub for interacting with IoT device data and programmed in Erlang.

## Prerequisites

Erlang > V17
An MQTT broker receiving sensor raw values


## Installation

Get the project:

```
git clone https://github.com/azku/HIoH
cd HIoH
```
Modify the config/sys.config file:
 
```erlang
[
 {sasl,[{errlog_type, error}]},
 {ws, [{topics, [[{topic,<<"/topic/to/subscribe2">>},
                  {fa,<<"fa-thermometer-quarter">>},
                  {name,<<"Livingroom Temperature">>},
                  {unit,<<"C">>}],
                 [{topic, <<"/topic/to/subscribe2">>}, 
                  {fa, <<"fa-umbrella">>}, 
                  {name, <<"Livingroom humidity">>}, {unit, <<37>>}]
                  ]},
       {http_port, 4002},
       {mqtt_host, "localhost"},
       {mqtt_client_id, <<"ws_mqtt_subscriber_client">>},
       {mqtt_username, <<"mqtt_username">>},
       {mqtt_password, <<"<PASSWORD>">>},
       {mqtt_logger_level, info}
      ]}
].

```

Notice the MQTT username and password needed to connect to the broker, the http_port in which the web server is going to run and the list of topics to subscribe. HIoH would expect the sensor messages to queue up in these topics.


Run the OTP application:

```
make run

```

Access the selected port via a modern browser and whatch the sensor data as its been received


## Goal

The main objective is to have a hub completely independent of all the devices in which you can monitor it all.
This indepence is bought at the expense of having a reliable protocol as a depencency. The MQTT protocol is believed to
be an adecuate fit for IoT and thus it's the one this project relies upon.


## Archtecture

As a picture is believed to be worth a thousand words...
 
![HIoH architecture image](hioh.png)


## License

HIoH souce code is [licensed under the MIT](LICENSE.md).


## Copyright<commit_msg>Inproved README<commit_after># HIoH (Home IoT Hub)

HIoH is a Web accesible Hub for interacting with IoT device data and programmed in Erlang.

## Prerequisites

Erlang > V17
An MQTT broker receiving sensor raw values


## Installation

Get the project:

```
git clone https://github.com/azku/HIoH
cd HIoH
```
Modify the config/sys.config file:
 
```erlang
[
 {sasl,[{errlog_type, error}]},
 {ws, [{topics, [[{topic,<<"/topic/to/subscribe2">>},
                  {fa,<<"fa-thermometer-quarter">>},
                  {name,<<"Livingroom Temperature">>},
                  {unit,<<"C">>}],
                 [{topic, <<"/topic/to/subscribe2">>}, 
                  {fa, <<"fa-umbrella">>}, 
                  {name, <<"Livingroom humidity">>}, {unit, <<37>>}]
                  ]},
       {http_port, 4002},
       {mqtt_host, "localhost"},
       {mqtt_client_id, <<"ws_mqtt_subscriber_client">>},
       {mqtt_username, <<"mqtt_username">>},
       {mqtt_password, <<"<PASSWORD>">>},
       {mqtt_logger_level, info}
      ]}
].

```

Notice the MQTT username and password needed to connect to the broker, the http_port in which the web server is going to run and the list of topics to subscribe. HIoH would expect the sensor messages to queue up in these topics.


Run the OTP application:

```
make run

```

Access the selected port via a modern browser and whatch the sensor data as its been received


## Goal

The main objective is to have a hub completely independent of all the devices in which you can monitor it all.
This indepence is bought at the expense of having a reliable protocol as a depencency. The MQTT protocol is believed to
be an adecuate fit for IoT and thus it's the one this project relies upon.


## Archtecture

As a picture is believed to be worth a thousand words...
 
![HIoH architecture image](https://raw.githubusercontent.com/azku/HIoH/master/hioh.png)


## License

HIoH souce code is [licensed under the MIT](LICENSE.md).


## Copyright
{'fraction_non_alphanumeric': 0.12008228336333247, 'fraction_numerical': 0.005142710208279763, 'mean_word_length': 3.069037656903766, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 51, 'https://': 3, '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': '2510954', 'n_tokens_mistral': 1288, 'n_tokens_neox': 1192, 'n_words': 446}