Skip to content

Commit 6e6f922

Browse files
committed
Rename from teleinfo-mqtt to teleinfo2mqtt
1 parent 116d143 commit 6e6f922

19 files changed

+110
-72
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ after_success:
5656
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
5757
- docker version
5858
- make prepare
59-
- make build IMAGE_NAME=$DOCKER_USERNAME/teleinfo-mqtt IMAGE_VERSION=$IMAGE_VERSION PLATFORMS=linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64
59+
- make build IMAGE_NAME=$DOCKER_USERNAME/teleinfo2mqtt IMAGE_VERSION=$IMAGE_VERSION PLATFORMS=linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64

README.md

+16-12
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1-
# teleinfo-mqtt
1+
# teleinfo2mqtt
22

3-
![Docker pulls](https://img.shields.io/docker/pulls/fmartinou/teleinfo-mqtt)
4-
![License](https://img.shields.io/github/license/fmartinou/teleinfo-mqtt)
5-
![Travis](https://img.shields.io/travis/fmartinou/teleinfo-mqtt/master)
6-
![Maintainability](https://img.shields.io/codeclimate/maintainability/fmartinou/teleinfo-mqtt)
7-
![Coverage](https://img.shields.io/codeclimate/coverage/fmartinou/teleinfo-mqtt)
3+
![Docker pulls](https://img.shields.io/docker/pulls/fmartinou/teleinfo2mqtt)
4+
![License](https://img.shields.io/github/license/fmartinou/teleinfo2mqtt)
5+
![Travis](https://img.shields.io/travis/fmartinou/teleinfo2mqtt/master)
6+
![Maintainability](https://img.shields.io/codeclimate/maintainability/fmartinou/teleinfo2mqtt)
7+
![Coverage](https://img.shields.io/codeclimate/coverage/fmartinou/teleinfo2mqtt)
88

9-
![](docs/teleinfo-mqtt-logo-250.png)
9+
![](docs/teleinfo2mqtt-logo-250.png)
1010

11-
**Teleinfo-Mqtt** allows you to read Teleinfo frames from a Serial port and publish them to an Mqtt broker.
11+
### Serial-to-MQTT Teleinfo Bridge
12+
13+
**teleinfo2mqtt** allows you to read Teleinfo frames from a Serial port and publish them to an Mqtt broker.
1214

1315
## Ready to go?
14-
### Check out the [documentation](https://fmartinou.github.io/teleinfo-mqtt/) to get started!
16+
### Check out the [documentation](https://fmartinou.github.io/teleinfo2mqtt/) to get started!
1517

1618
## Contact & Support
1719

18-
- Create a [GitHub issue](https://github.com/fmartinou/teleinfo-mqtt/issues) for bug reports, feature requests, or questions
19-
- Add a ⭐️ [star on GitHub](https://github.com/fmartinou/teleinfo-mqtt) to support the project!
20+
- Create a [GitHub issue](https://github.com/fmartinou/teleinfo2mqtt/issues) for bug reports, feature requests, or questions
21+
- Add a ⭐️ [star on GitHub](https://github.com/fmartinou/teleinfo2mqtt) to support the project!
22+
23+
<a href="https://www.buymeacoffee.com/61rUNMm" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
2024

2125
## License
2226

23-
This project is licensed under the [MIT license](https://github.com/fmartinou/teleinfo-mqtt/blob/master/LICENSE).
27+
This project is licensed under the [MIT license](https://github.com/fmartinou/teleinfo2mqtt/blob/master/LICENSE).

app/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const log = require('./log');
99
*/
1010
async function run() {
1111
const configHidden = { ...config, mqttPassword: '<hidden>' };
12-
log.info('Starting teleinfo-mqtt with configuration =', configHidden);
12+
log.info('Starting teleinfo2mqtt with configuration =', configHidden);
1313

1414
try {
1515
// Connect to the serial port

app/log/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const bunyan = require('bunyan');
22
const config = require('../config');
33

44
const log = bunyan.createLogger({
5-
name: 'teleinfo-mqtt',
5+
name: 'teleinfo2mqtt',
66
level: config.logLevel,
77
});
88

app/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "teleinfo-mqtt-app",
2+
"name": "teleinfo2mqtt-app",
33
"version": "1.0.0",
44
"description": "Publish teleinfo to mqtt topics",
55
"main": "index.js",
@@ -10,7 +10,7 @@
1010
},
1111
"repository": {
1212
"type": "git",
13-
"url": "git+https://github.com/fmartinou/teleinfo-mqtt.git"
13+
"url": "git+https://github.com/fmartinou/teleinfo2mqtt.git"
1414
},
1515
"keywords": [
1616
"teleinfo",
@@ -19,9 +19,9 @@
1919
"author": "fmartinou",
2020
"license": "ISC",
2121
"bugs": {
22-
"url": "https://github.com/fmartinou/teleinfo-mqtt/issues"
22+
"url": "https://github.com/fmartinou/teleinfo2mqtt/issues"
2323
},
24-
"homepage": "https://github.com/fmartinou/teleinfo-mqtt#readme",
24+
"homepage": "https://github.com/fmartinou/teleinfo2mqtt#readme",
2525
"dependencies": {
2626
"@serialport/parser-readline": "9.2.4",
2727
"async-mqtt": "2.6.2",

docs/_coverpage.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
![logo](teleinfo-mqtt-logo.png)
1+
![logo](teleinfo2mqtt-logo.png)
22

3-
# **Teleinfo Mqtt**
3+
# **teleinfo2Mqtt**
44

55
> Serial-to-MQTT Teleinfo Bridge
66

docs/changelog/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- :fire: Fix `STANDARD` frames bad parsing
99

1010
## 7.0.0
11-
- :star: Add support for TIC `STANDARD` mode (:warning:**EXPERIMENTAL!!!**:warning:)
11+
- :star: Add support for TIC `STANDARD` mode
1212

1313
## 6.1.0
1414
- :star: Add compatibility to [Home-Assistant add-on system](https://github.com/fmartinou/hassio-addons)

docs/configuration/README.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# Configuration
2-
Teleinfo-Mqtt can be configured using Environment Variables.
2+
**teleinfo2mqtt** can be configured using Environment Variables.
33

44
## Environment variables
55

6-
| Env var | Required | Description | Supported values | Default value when missing |
7-
|-----------------------|----------------|------------------------------------------------------------------------|----------------------------------------------------------------------------------|----------------------------|
8-
| EMIT_INTERVAL | :white_circle: | Interval in seconds between 2 MQTT emissions (0 = All frames are sent) | from `0` to `n` | `10` |
9-
| HASS_DISCOVERY | :white_circle: | Publish configuration for Home-Assistant discovery | `true`, `false` | `true` |
10-
| HASS_DISCOVERY_PREFIX | :white_circle: | Topic prefix for Home-Assistant Discovery | any | `homeassistant` |
11-
| LOG_LEVEL | :white_circle: | Log level | `error`, `info`, `debug` | `info` |
12-
| LOG_FORMAT | :white_circle: | Log format | `text`, `json` | `text` |
13-
| MQTT_BASE_TOPIC | :white_circle: | MQTT Base topic | any | `teleinfo` |
14-
| MQTT_URL | :white_circle: | MQTT Broker connection URL | any valid mqtt connection string | `mqtt://localhost:1883` |
15-
| MQTT_USER | :white_circle: | MQTT user (optional) | any | |
16-
| MQTT_PASSWORD | :white_circle: | MQTT password (optional) | any | |
17-
| SERIAL | :white_circle: | Serial Port location | any valid serial port location | `/dev/ttyUSB0` |
18-
| TIC_MODE | :white_circle: | TIC Mode | `history`, `standard` | `history` |
19-
| TZ | :white_circle: | Timezone (for logs...) | [supported values](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) | `utc` |
6+
| Env var | Required | Description | Supported values | Default value when missing |
7+
|---------------------------|----------------|------------------------------------------------------------------------|----------------------------------------------------------------------------------|----------------------------|
8+
| **EMIT_INTERVAL** | :white_circle: | Interval in seconds between 2 MQTT emissions (0 = All frames are sent) | from `0` to `n` | `10` |
9+
| **HASS_DISCOVERY** | :white_circle: | Publish configuration for Home-Assistant discovery | `true`, `false` | `true` |
10+
| **HASS_DISCOVERY_PREFIX** | :white_circle: | Topic prefix for Home-Assistant Discovery | any | `homeassistant` |
11+
| **LOG_LEVEL** | :white_circle: | Log level | `error`, `info`, `debug` | `info` |
12+
| **LOG_FORMAT** | :white_circle: | Log format | `text`, `json` | `text` |
13+
| **MQTT_BASE_TOPIC** | :white_circle: | MQTT Base topic | any | `teleinfo` |
14+
| **MQTT_URL** | :white_circle: | MQTT Broker connection URL | any valid mqtt connection string | `mqtt://localhost:1883` |
15+
| **MQTT_USER** | :white_circle: | MQTT user (optional) | any | |
16+
| **MQTT_PASSWORD** | :white_circle: | MQTT password (optional) | any | |
17+
| **SERIAL** | :white_circle: | Serial Port location | any valid serial port location | `/dev/ttyUSB0` |
18+
| **TIC_MODE** | :white_circle: | TIC Mode | `history`, `standard` | `history` |
19+
| **TZ** | :white_circle: | Timezone (for logs...) | [supported values](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) | `utc` |
2020

2121
## Complete example
2222

@@ -27,7 +27,7 @@ version: '3'
2727

2828
services:
2929
teleinfo2mqtt:
30-
image: fmartinou/teleinfo-mqtt
30+
image: fmartinou/teleinfo2mqtt
3131
container_name: teleinfo2mqtt
3232
device:
3333
- /dev/ttyUSB1:/dev/ttyUSB1
@@ -49,6 +49,6 @@ docker run -d --name teleinfo2mqtt \
4949
-e MQTT_USER="my-super-user" \
5050
-e MQTT_PASSWORD="my-secret-password" \
5151
-e TZ="Europe/Paris" \
52-
fmartinou/teleinfo-mqtt
52+
fmartinou/teleinfo2mqtt
5353
```
5454
<!-- tabs:end -->

docs/hass/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
![logo](hass.png)
44

5-
`teleinfo-mqtt` can be integrated to [Home-Assistant](https://www.home-assistant.io/) in 2 distinct ways.
5+
**teleinfo2mqtt** can be integrated to [Home-Assistant](https://www.home-assistant.io/) in 2 distinct ways.
66

77
> **Solution 1:** \
8-
Deploy the `teleinfo-mqtt` docker image by yourself ([see here](/introduction/))
8+
Deploy the `teleinfo2mqtt` docker image by yourself ([see here](/introduction/))
99

1010
> **Solution 2:** \
1111
Install the [`teleinfo2mqtt` hass.io add-on](https://github.com/fmartinou/hassio-addons)

docs/index.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8">
55
<title>Teleinfo Mqtt</title>
66
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
7-
<meta name="description" content="Teleinfo Mqtt">
7+
<meta name="description" content="teleinfo2mqtt">
88
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
99

1010
<!-- Default theme -->
@@ -13,17 +13,17 @@
1313
<!-- Prism theme (code highlighting -->
1414
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/prism.css">
1515

16-
<!-- Teleinfo-mqtt theme -->
17-
<link rel="stylesheet" href="/theme-teleinfo-mqtt.css">
16+
<!-- teleinfo2mqtt theme -->
17+
<link rel="stylesheet" href="/teleinfo2mqtt.css">
1818

1919
</head>
2020
<body>
2121
<div id="app">Please wait...</div>
2222
<script>
2323
window.$docsify = {
24-
name: 'teleinfo-mqtt',
25-
logo: '/teleinfo-mqtt-logo.png',
26-
repo: 'fmartinou/teleinfo-mqtt',
24+
name: 'teleinfo2mqtt',
25+
logo: '/teleinfo2mqtt-logo.png',
26+
repo: 'fmartinou/teleinfo2mqtt',
2727
coverpage: true,
2828
onlyCover: true,
2929
loadSidebar: 'sidebar.md',

docs/introduction/README.md

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
# Introduction
22

3-
![Docker pulls](https://img.shields.io/docker/pulls/fmartinou/teleinfo-mqtt)
4-
![License](https://img.shields.io/github/license/fmartinou/teleinfo-mqtt)
5-
![Travis](https://img.shields.io/travis/fmartinou/teleinfo-mqtt/master)
6-
![Maintainability](https://img.shields.io/codeclimate/maintainability/fmartinou/teleinfo-mqtt)
7-
![Coverage](https://img.shields.io/codeclimate/coverage/fmartinou/teleinfo-mqtt)
3+
![Docker pulls](https://img.shields.io/docker/pulls/fmartinou/teleinfo2mqtt)
4+
![License](https://img.shields.io/github/license/fmartinou/teleinfo2mqtt)
5+
![Travis](https://img.shields.io/travis/fmartinou/teleinfo2mqtt/master)
6+
![Maintainability](https://img.shields.io/codeclimate/maintainability/fmartinou/teleinfo2mqtt)
7+
![Coverage](https://img.shields.io/codeclimate/coverage/fmartinou/teleinfo2mqtt)
88

9-
**Teleinfo-Mqtt** allows you to read Teleinfo frames from a Serial port and publish them to an Mqtt broker.
9+
**teleinfo2mqtt** allows you to read Teleinfo frames from a Serial port and publish them to an Mqtt broker.
10+
11+
> **teleinfo2mqtt** supports both `HISTORY` and `̀STANDARD` modes.
1012
1113
## Quick start
1214

1315
### Run the Docker image
14-
The easiest way to start is to deploy the official _**teleinfo-mqtt**_ image.
16+
The easiest way to start is to deploy the official _**teleinfo2mqtt**_ image.
1517

1618
<!-- tabs:start -->
1719
#### **Docker Compose**
@@ -20,7 +22,7 @@ version: '3'
2022

2123
services:
2224
teleinfo2mqtt:
23-
image: fmartinou/teleinfo-mqtt
25+
image: fmartinou/teleinfo2mqtt
2426
container_name: teleinfo2mqtt
2527
device:
2628
- /dev/ttyUSB0:/dev/ttyUSB0 # Serial port device
@@ -32,18 +34,18 @@ services:
3234
docker run -d --name teleinfo2mqtt \
3335
--device=/dev/ttyUSB0:/dev/ttyUSB0 \
3436
-e MQTT_URL=mqtt://my_mqtt_broker:1883 \
35-
fmartinou/teleinfo-mqtt
37+
fmartinou/teleinfo2mqtt
3638
```
3739
<!-- tabs:end -->
3840

3941
## Contact & Support
4042

41-
- Create a [GitHub issue](https://github.com/fmartinou/teleinfo-mqtt/issues) for bug reports, feature requests, or questions
42-
- Add a ⭐️ [star on GitHub](https://github.com/fmartinou/teleinfo-mqtt) to support the project!
43+
- Create a [GitHub issue](https://github.com/fmartinou/teleinfo2mqtt/issues) for bug reports, feature requests, or questions
44+
- Add a ⭐️ [star on GitHub](https://github.com/fmartinou/teleinfo2mqtt) to support the project!
4345

4446
## License
4547

46-
This project is licensed under the [MIT license](https://github.com/fmartinou/teleinfo-mqtt/blob/master/LICENSE).
48+
This project is licensed under the [MIT license](https://github.com/fmartinou/teleinfo2mqtt/blob/master/LICENSE).
4749

4850
<!-- GitHub Buttons -->
4951
<script async defer src="https://buttons.github.io/buttons.js"></script>

docs/mqtt/README.md

+34-3
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
# Mqtt
22

33
## Topic
4-
Messages are published to a `$MQTT_BASE_TOPIC/$ADCO` topic.
4+
**teleinfo2mqtt** publishes messages to the `$mqtt_base_topicMQTT_BASE_TOPIC/c` topic.
55

66
?> [`$MQTT_BASE_TOPIC`](configuration/) is configured by env var (`teleinfo` by default)
77

8-
?> `$ADCO` is the id of your electricity meter (received from teleinfo data)
8+
?> `$mqtt_base_topic` is the id of your electricity meter (received from teleinfo data as `ADCO` or `ADSC` labels)
99

1010
## Message
1111
Messages are JSON documents whose content may vary upon your Electricity meter.
1212

1313
?> Values are sanitized and converted to Numbers if possible.
1414
You can still access the original `raw` value if necessary.
1515

16-
### Example
16+
?> When timestamps are part of the value, they are parsed to UTC timestamps and daylight saving time information.
17+
18+
### Data example
19+
20+
<!-- tabs:start -->
21+
#### **History mode**
1722
```json
1823
{
1924
"ADCO": {
@@ -59,3 +64,29 @@ You can still access the original `raw` value if necessary.
5964
}
6065
```
6166

67+
#### **Standard mode**
68+
```json
69+
{
70+
"ADSC": {
71+
"raw": "12345678901",
72+
"value": 12345678901
73+
},
74+
"EASF06":{
75+
"raw":"000000000",
76+
"value":0
77+
},
78+
"NGTF":{
79+
"raw":"H PLEINE/CREUSE",
80+
"value":"H PLEINE/CREUSE"
81+
},
82+
"SMAXSN":{
83+
"raw":"02740",
84+
"value":2740,
85+
"timestamp":{
86+
"date":"2022-06-09T06:05:31.000Z",
87+
"dst":"summer"
88+
}
89+
}
90+
}
91+
```
92+
<!-- tabs:end -->

docs/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"name": "teleinfo-mqtt-doc",
2+
"name": "teleinfo2mqtt-doc",
33
"version": "1.0.0",
44
"description": "Teleinfo Mqtt doc",
55
"main": "index.js",
66
"scripts": {
77
"doc": "docsify serve"
88
},
99
"author": "fmartinou",
10-
"repository": "fmartinou/teleinfo-mqtt",
10+
"repository": "fmartinou/teleinfo2mqtt",
1111
"license": "MIT",
1212
"devDependencies": {
1313
"docsify-cli": "4.4.3"

docs/teleinfo-mqtt.css

-4
This file was deleted.
File renamed without changes.
File renamed without changes.

docs/teleinfo2mqtt.css

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
:root {
2+
--base-font-size : 14px;
3+
--theme-color : #00355E;
4+
--content-max-width : 100em;
5+
}

0 commit comments

Comments
 (0)