Skip to content

Commit

Permalink
release v9.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz914 committed Dec 2, 2024
1 parent 38243ff commit 888fffc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ 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).

## [9.6.3] - (02.12.2024)

## Changes

- prevent crasch if production control is enabled and credentials data is not installer

## [9.6.0] - (30.11.2024)

## Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": false,
"displayName": "Enphase Envoy",
"name": "homebridge-enphase-envoy",
"version": "9.6.2",
"version": "9.6.3",
"description": "Homebridge plugin for Photovoltaic Energy System manufactured by Enphase.",
"license": "MIT",
"author": "grzegorz914",
Expand Down
7 changes: 7 additions & 0 deletions src/envoydevice.js
Original file line number Diff line number Diff line change
Expand Up @@ -2705,6 +2705,13 @@ class EnvoyDevice extends EventEmitter {
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Power Mode', powerProductionState) : false;
return true;
} catch (error) {
const errorString = error.toString();
const tokenNotValid = errorString.includes('status code 401');
if (tokenNotValid) {
this.emit('warn', 'Power production control will not work, you need installer credentials data.')
return false;
}

throw new Error(`Update power production state error: ${error.message || error}`);
};
};
Expand Down

0 comments on commit 888fffc

Please sign in to comment.