Skip to content

Commit

Permalink
feat: Support for meters with encrypted DSMR (#23)
Browse files Browse the repository at this point in the history
* wip: Luxemburg meter parsing

* fix: Timeout on socket connection

Fixed #22

* feat: Basic support for reading encrypted meters

Fixed #21

* fix: Final changes to support decrypting

* docs: Started documentation

* docs: Another docs update

* chore: Remove duplicate screenshot

* chore: Lint errors
  • Loading branch information
svrooij authored Feb 26, 2021
1 parent 0221347 commit 2af356c
Show file tree
Hide file tree
Showing 44 changed files with 1,747 additions and 65 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,4 @@ typings/
# next.js build output
.next

.vscode

dist
37 changes: 37 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/src/index.ts",
"preLaunchTask": "tsc: build - tsconfig.json",
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"env": {
// "SMARTMETER_PORT": "/dev/ttyUSB0",
// "SMARTMETER_SOCKET": "192.168.94.12:3020",
"SMARTMETER_DEBUG": "true",
"SMARTMETER_web-server": "3000",
"SMARTMETER_tcp-server": "3010",
"SMARTMETER_raw-tcp-server": "3020",
"SMARTMETER_mqtt-url": "mqtt://localhost:1883",
// "SMARTMETER_enc-key": "AAAA57A9FC71698E193D7CF6103CAAAA"
// "SMARTMETER_sunspec-modbus": "192.168.1.30"

}
},
{
"type": "node",
"request": "launch",
"name": "Run current file",
"program": "${file}",
"preLaunchTask": "tsc: build - tsconfig.json",
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
// "args": ["192.168.1.14", "23"]
},
]
}
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ You can enable the webserver. This will enable you to see a simple webpage with
This webpage uses WebSockets for automatic server side data refresh. So the browser will show the latest data as it comes in. If your browser doesn't support websockets it should fallback on ajax loading.
![Screenshot of web interface](./screenshots/screenshot_web.png "Web interface demo")
![Screenshot of web interface](./docs/assets/images/screenshot_web.png "Web interface demo")
### Output -> JSON tcp socket
Expand Down Expand Up @@ -288,6 +288,42 @@ If you're running home assistant, be sure to enable mqtt discovery `--mqtt-disco
This section is for the curious ones.
### Debugging
You can easily debug this app in vscode if you add the following to the `.vscode/launch.json` file:
```jsonc
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/src/index.ts",
"preLaunchTask": "tsc: build - tsconfig.json",
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"env": {
// "SMARTMETER_SOCKET": "192.168.94.12:3020",
"SMARTMETER_DEBUG": "true",
"SMARTMETER_web-server": "3000",
"SMARTMETER_tcp-server": "3010",
"SMARTMETER_raw-tcp-server": "3020",
"SMARTMETER_mqtt-url": "mqtt://localhost:1883",
//"SMARTMETER_enc-key": "AAAA57A9FC71698E193D7CF6103CAAAA"
//"SMARTMETER_sunspec-modbus": "192.168.1.30"
}
}
]
}
```
I have one instance running, that outputs a raw tcp socket that I use for debugging on my computer.
### Support for output X
This package comes with several outputs, they all extend [Output](https://github.com/svrooij/smartmeter2mqtt/blob/master/src/output/output.ts).
Expand Down
3 changes: 3 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
_site
.sass-cache
.jekyll-metadata
24 changes: 24 additions & 0 deletions docs/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
layout: default
---

<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>

<div class="container">
<h1>404</h1>

<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
28 changes: 28 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
source "https://rubygems.org"

# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "~> 3.8.5"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0" if Gem.win_platform?

gem "just-the-docs", "0.3.3"
Loading

0 comments on commit 2af356c

Please sign in to comment.