-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Try fixing Raspberry Pi docker image
- Loading branch information
Showing
4 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
const Smartmeter = require('../dist/index').Smartmeter; | ||
const ConfigLoader = require('../dist/index').ConfigLoader; | ||
|
||
const config = ConfigLoader.Load(); | ||
|
||
// Change something to the config | ||
//config.outputs.debug = true; | ||
|
||
const smartmeter = new Smartmeter(config); | ||
|
||
// Add your custom output | ||
// const newOutput = new xxx() // As long as it implements Output | ||
// smartmeter.addOutput(newOutput); | ||
|
||
smartmeter.start(); | ||
|
||
// Listen for exit signal and cleanly shutdown | ||
process.on('SIGINT', async () => { | ||
console.log('Exiting....'); | ||
await smartmeter.stop(); | ||
process.exit(0); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters