Skip to content

Commit

Permalink
Merge branch 'release/2.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ruettgers committed Apr 15, 2020
2 parents e24ee09 + 3c9ba9f commit acecc23
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 35 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.1.1] - 2020-04-15
### Changed
- Fixed MQTT topic to include the whole OBIS identifier
- Look for a reading head attached to GPIO pin D2 by default
- Switched to official libSML repository
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,30 +69,30 @@ If everything is configured properly and running with a sensor in place, SMLRead

```
MB-Monty ➜ ~ mosquitto_sub -h 10.4.32.103 -v -t smartmeter/mains/#
smartmeter/mains/info Hello from 00C7551E, running SMLReader version 2.1.0.
smartmeter/mains/sensor/1/obis/1-0:1.8.0/value 3531049.9
smartmeter/mains/sensor/1/obis/1-0:2.8.0/value 13.2
smartmeter/mains/sensor/1/obis/1-0:1.8.1/value 0.0
smartmeter/mains/sensor/1/obis/1-0:2.8.1/value 13.2
smartmeter/mains/sensor/1/obis/1-0:1.8.2/value 3531050.0
smartmeter/mains/sensor/1/obis/1-0:2.8.2/value 0.0
smartmeter/mains/sensor/1/obis/1-0:16.7.0/value 2366.8
smartmeter/mains/sensor/2/obis/1-0:1.8.0/value 3531049.9
smartmeter/mains/sensor/2/obis/1-0:2.8.0/value 13.2
smartmeter/mains/sensor/2/obis/1-0:1.8.1/value 0.0
smartmeter/mains/sensor/2/obis/1-0:2.8.1/value 13.2
smartmeter/mains/sensor/2/obis/1-0:1.8.2/value 3531050.0
smartmeter/mains/sensor/2/obis/1-0:2.8.2/value 0.0
smartmeter/mains/sensor/2/obis/1-0:16.7.0/value 2366.8
smartmeter/mains/sensor/3/obis/1-0:1.8.0/value 3531049.9
smartmeter/mains/sensor/3/obis/1-0:2.8.0/value 13.2
smartmeter/mains/sensor/3/obis/1-0:1.8.1/value 0.0
smartmeter/mains/sensor/3/obis/1-0:2.8.1/value 13.2
smartmeter/mains/sensor/3/obis/1-0:1.8.2/value 3531050.0
smartmeter/mains/sensor/3/obis/1-0:2.8.2/value 0.0
smartmeter/mains/sensor/3/obis/1-0:16.7.0/value 2366.8
smartmeter/mains/info Hello from 00C7551E, running SMLReader version 2.1.1.
smartmeter/mains/sensor/1/obis/1-0:1.8.0*255/value 3546245.9
smartmeter/mains/sensor/1/obis/1-0:2.8.0*255/value 13.2
smartmeter/mains/sensor/1/obis/1-0:1.8.1*255/value 0.0
smartmeter/mains/sensor/1/obis/1-0:2.8.1*255/value 13.2
smartmeter/mains/sensor/1/obis/1-0:1.8.2*255/value 3546245.9
smartmeter/mains/sensor/1/obis/1-0:2.8.2*255/value 0.0
smartmeter/mains/sensor/1/obis/1-0:16.7.0*255/value 451.2
smartmeter/mains/sensor/2/obis/1-0:1.8.0*255/value 3546245.9
smartmeter/mains/sensor/2/obis/1-0:2.8.0*255/value 13.2
smartmeter/mains/sensor/2/obis/1-0:1.8.1*255/value 0.0
smartmeter/mains/sensor/2/obis/1-0:2.8.1*255/value 13.2
smartmeter/mains/sensor/2/obis/1-0:1.8.2*255/value 3546245.9
smartmeter/mains/sensor/2/obis/1-0:2.8.2*255/value 0.0
smartmeter/mains/sensor/2/obis/1-0:16.7.0*255/value 451.2
smartmeter/mains/sensor/3/obis/1-0:1.8.0*255/value 3546245.9
smartmeter/mains/sensor/3/obis/1-0:2.8.0*255/value 13.2
smartmeter/mains/sensor/3/obis/1-0:1.8.1*255/value 0.0
smartmeter/mains/sensor/3/obis/1-0:2.8.1*255/value 13.2
smartmeter/mains/sensor/3/obis/1-0:1.8.2*255/value 3546245.9
smartmeter/mains/sensor/3/obis/1-0:2.8.2*255/value 0.0
smartmeter/mains/sensor/3/obis/1-0:16.7.0*255/value 451.2
```

### Debugging
Expand Down
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[common]
platform = [email protected]
lib_deps =
git+https://github.com/mruettgers/libsml
git+https://github.com/volkszaehler/libsml
EspSoftwareSerial
MicroDebug
IotWebConf
Expand Down
4 changes: 2 additions & 2 deletions src/MqttPublisher.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ class MqttPublisher
char obisIdentifier[32];
char buffer[255];

sprintf(obisIdentifier, "%d-%d:%d.%d.%d",
sprintf(obisIdentifier, "%d-%d:%d.%d.%d*%d",
entry->obj_name->str[0], entry->obj_name->str[1],
entry->obj_name->str[2], entry->obj_name->str[3],
entry->obj_name->str[4]);
entry->obj_name->str[4], entry->obj_name->str[5]);

String entryTopic = baseTopic + "sensor/" + (sensor->config->name) + "/obis/" + obisIdentifier + "/";

Expand Down
10 changes: 2 additions & 8 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "Arduino.h"
#include "Sensor.h"

const char *VERSION = "2.1.0";
const char *VERSION = "2.1.1";

// Modifying the config version will probably cause a loss of the existig configuration.
// Be careful!
Expand All @@ -14,13 +14,7 @@ const uint8_t STATUS_PIN = LED_BUILTIN;
static const SensorConfig SENSOR_CONFIGS[] = {
{.pin = D2,
.name = "1",
.numeric_only = false},
{.pin = D5,
.name = "2",
.numeric_only = false},
{.pin = D6,
.name = "3",
.numeric_only = false}};
.numeric_only = false}};

const uint8_t NUM_OF_SENSORS = sizeof(SENSOR_CONFIGS) / sizeof(SensorConfig);

Expand Down

0 comments on commit acecc23

Please sign in to comment.