Skip to content

Commit

Permalink
(simatec) Beta 0.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
simatec committed Sep 20, 2022
1 parent 90d8432 commit 2c3d142
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ When the adapter crashes or an other Code error happens, this error message that

## Changelog
<!-- ### __WORK IN PROGRESS__ -->
### __WORK IN PROGRESS__
* (simatec) small Bugfixes

### 0.5.3 (2022-09-20)
* (simatec) Hybrid-G4 added
* (simatec) small Bugfixes
Expand Down
17 changes: 8 additions & 9 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,23 +564,22 @@ async function requestLocalAPI() {
const url = `http://${adapter.config.hostIP}/?${data}`;

const apiData = (await axios.post(url, !version || version == 2 ? null : data, { cancelToken: source.token, headers: { 'X-Forwarded-For': '5.8.8.8' } })).data;

adapter.log.debug(`local request: ${JSON.stringify(apiData)}`)
adapter.log.debug(`local request: ${JSON.stringify(apiData)}`);

clearTimeout(requestTimeOut);
offlineCounter = 0;
isOnline = true;
version = apiData.ver.split('.')[0]

switch (apiData.type) {
case '5':
case '6':
case '7':
case '16':
case 5:
case 6:
case 7:
case 16:
type = 3;
break;
case '14':
case '15':
case 14:
case 15:
type = 4;
break;
default:
Expand Down

0 comments on commit 2c3d142

Please sign in to comment.