Skip to content

Commit

Permalink
Fixed issue caused by a shelly gen 1 when it sends a CoIoT message /c…
Browse files Browse the repository at this point in the history
…it/d without blk
  • Loading branch information
Luligu committed Jul 2, 2024
1 parent dcf79ca commit c4ae1d2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.

If you like this project and find it useful, please consider giving it a star on GitHub at https://github.com/Luligu/matterbridge-shelly and sponsoring it.

## [0.7.1] - 2024-07-02

### Fixed

- [shelly]: Fixed issue caused by a shelly gen 1 when it sends a CoIoT message /cit/d without blk.

<a href="https://www.buymeacoffee.com/luligugithub">
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
</a>

## [0.7.0] - 2024-06-30

### Changed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "matterbridge-shelly",
"version": "0.7.0",
"version": "0.7.1",
"description": "Matterbridge shelly plugin",
"author": "https://github.com/Luligu",
"license": "Apache-2.0",
Expand Down
5 changes: 4 additions & 1 deletion src/coapServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,10 @@ export class CoapServer extends EventEmitter {
const desc: CoIoTDescription[] = [];
this.log.debug(`parsing ${MAGENTA}blocks${db}:`);
const blk: CoIoTBlkComponent[] = payload.blk;
// TODO here once crashed...
if (!blk) {
this.log.error(`No blk found for host ${host} in ${msg.url}`);
return;
}
blk.forEach((b) => {
this.log.debug(`- block: ${CYAN}${b.I}${db} description ${CYAN}${b.D}${db}`);
const sen: CoIoTSenProperty[] = payload.sen;
Expand Down

0 comments on commit c4ae1d2

Please sign in to comment.