Skip to content

Commit b22fa50

Browse files
authored
Merge pull request #8 from volkmarnissen/modbuscache
[bug]Modbus Error Handling, Slave Specification Detection, TCP RTU bridge, Fixes
2 parents f5b0d91 + a55babf commit b22fa50

File tree

6 files changed

+65
-77
lines changed

6 files changed

+65
-77
lines changed

.vscode/launch.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
// Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7+
{
8+
"name": "Launch Chrome",
9+
"request": "launch",
10+
"type": "chrome",
11+
"url": "http://localhost:4200",
12+
"preLaunchTask": "npm: start",
13+
"webRoot": "${workspaceFolder}"
14+
},
715
{
816
"name": "ng serve",
917
"request": "launch",

CHANGELOG.md

Lines changed: 44 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,92 @@
11
# Changelog for angular
22

3-
## [Unreleased](https://github.com/modbus2mqtt/angular/tree/HEAD)
3+
## [v0.12.19](https://github.com/volkmarnissen/angular/tree/v0.12.19) (2025-01-16)
44

5-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.20...HEAD)
5+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.18...v0.12.19)
66

7-
**Merged pull requests:**
7+
## [v0.12.18](https://github.com/volkmarnissen/angular/tree/v0.12.18) (2025-01-15)
88

9-
- Angular TcpBridge Fix [\#7](https://github.com/modbus2mqtt/angular/pull/7) ([volkmarnissen](https://github.com/volkmarnissen))
10-
- \[bug\]Modbus Error Handling, Slave Specification Detection, TCP RTU bridge, Fixes [\#6](https://github.com/modbus2mqtt/angular/pull/6) ([volkmarnissen](https://github.com/volkmarnissen))
11-
- Modbus Error Handling and Monitoring [\#5](https://github.com/modbus2mqtt/angular/pull/5) ([volkmarnissen](https://github.com/volkmarnissen))
9+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.17...v0.12.18)
1210

13-
## [v0.12.20](https://github.com/modbus2mqtt/angular/tree/v0.12.20) (2025-04-14)
11+
## [v0.12.17](https://github.com/volkmarnissen/angular/tree/v0.12.17) (2025-01-02)
1412

15-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.19...v0.12.20)
13+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.16...v0.12.17)
1614

17-
**Merged pull requests:**
15+
## [v0.12.16](https://github.com/volkmarnissen/angular/tree/v0.12.16) (2024-12-31)
1816

19-
- Please update me [\#4](https://github.com/modbus2mqtt/angular/pull/4) ([volkmarnissen](https://github.com/volkmarnissen))
20-
- Fixed package-lock.json [\#3](https://github.com/modbus2mqtt/angular/pull/3) ([volkmarnissen](https://github.com/volkmarnissen))
21-
- Adding support for discrete inputs [\#2](https://github.com/modbus2mqtt/angular/pull/2) ([arturmietek](https://github.com/arturmietek))
17+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.15...v0.12.16)
2218

23-
## [v0.12.19](https://github.com/modbus2mqtt/angular/tree/v0.12.19) (2025-01-16)
19+
## [v0.12.15](https://github.com/volkmarnissen/angular/tree/v0.12.15) (2024-12-30)
2420

25-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.18...v0.12.19)
21+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.14...v0.12.15)
2622

27-
## [v0.12.18](https://github.com/modbus2mqtt/angular/tree/v0.12.18) (2025-01-15)
23+
## [v0.12.14](https://github.com/volkmarnissen/angular/tree/v0.12.14) (2024-12-30)
2824

29-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.17...v0.12.18)
25+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/0.12.14...v0.12.14)
3026

31-
## [v0.12.17](https://github.com/modbus2mqtt/angular/tree/v0.12.17) (2025-01-02)
27+
## [0.12.14](https://github.com/volkmarnissen/angular/tree/0.12.14) (2024-12-13)
3228

33-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.16...v0.12.17)
29+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.13...0.12.14)
3430

35-
**Merged pull requests:**
31+
## [v0.12.13](https://github.com/volkmarnissen/angular/tree/v0.12.13) (2024-12-13)
3632

37-
- Adding signed int 32 and unsigned int 32 options to number format [\#1](https://github.com/modbus2mqtt/angular/pull/1) ([arturmietek](https://github.com/arturmietek))
33+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.12...v0.12.13)
3834

39-
## [v0.12.16](https://github.com/modbus2mqtt/angular/tree/v0.12.16) (2024-12-31)
35+
## [v0.12.12](https://github.com/volkmarnissen/angular/tree/v0.12.12) (2024-12-11)
4036

41-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.15...v0.12.16)
37+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.11...v0.12.12)
4238

43-
## [v0.12.15](https://github.com/modbus2mqtt/angular/tree/v0.12.15) (2024-12-30)
39+
## [v0.12.11](https://github.com/volkmarnissen/angular/tree/v0.12.11) (2024-11-22)
4440

45-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.14...v0.12.15)
41+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.10...v0.12.11)
4642

47-
## [v0.12.14](https://github.com/modbus2mqtt/angular/tree/v0.12.14) (2024-12-30)
43+
## [v0.12.10](https://github.com/volkmarnissen/angular/tree/v0.12.10) (2024-11-19)
4844

49-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/0.12.14...v0.12.14)
45+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.9...v0.12.10)
5046

51-
## [0.12.14](https://github.com/modbus2mqtt/angular/tree/0.12.14) (2024-12-13)
47+
## [v0.12.9](https://github.com/volkmarnissen/angular/tree/v0.12.9) (2024-11-16)
5248

53-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.13...0.12.14)
49+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.8...v0.12.9)
5450

55-
## [v0.12.13](https://github.com/modbus2mqtt/angular/tree/v0.12.13) (2024-12-13)
51+
## [v0.12.8](https://github.com/volkmarnissen/angular/tree/v0.12.8) (2024-11-14)
5652

57-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.12...v0.12.13)
53+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.7...v0.12.8)
5854

59-
## [v0.12.12](https://github.com/modbus2mqtt/angular/tree/v0.12.12) (2024-12-11)
55+
## [v0.12.7](https://github.com/volkmarnissen/angular/tree/v0.12.7) (2024-10-23)
6056

61-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.11...v0.12.12)
57+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.6...v0.12.7)
6258

63-
## [v0.12.11](https://github.com/modbus2mqtt/angular/tree/v0.12.11) (2024-11-22)
59+
## [v0.12.6](https://github.com/volkmarnissen/angular/tree/v0.12.6) (2024-10-16)
6460

65-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.10...v0.12.11)
61+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.5...v0.12.6)
6662

67-
## [v0.12.10](https://github.com/modbus2mqtt/angular/tree/v0.12.10) (2024-11-19)
63+
## [v0.12.5](https://github.com/volkmarnissen/angular/tree/v0.12.5) (2024-09-24)
6864

69-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.9...v0.12.10)
65+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.4...v0.12.5)
7066

71-
## [v0.12.9](https://github.com/modbus2mqtt/angular/tree/v0.12.9) (2024-11-16)
67+
## [v0.12.4](https://github.com/volkmarnissen/angular/tree/v0.12.4) (2024-09-16)
7268

73-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.8...v0.12.9)
69+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.3...v0.12.4)
7470

75-
## [v0.12.8](https://github.com/modbus2mqtt/angular/tree/v0.12.8) (2024-11-14)
71+
## [v0.12.3](https://github.com/volkmarnissen/angular/tree/v0.12.3) (2024-09-06)
7672

77-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.7...v0.12.8)
73+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.2...v0.12.3)
7874

79-
## [v0.12.7](https://github.com/modbus2mqtt/angular/tree/v0.12.7) (2024-10-23)
75+
## [v0.12.2](https://github.com/volkmarnissen/angular/tree/v0.12.2) (2024-08-27)
8076

81-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.6...v0.12.7)
77+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.12.0...v0.12.2)
8278

83-
## [v0.12.6](https://github.com/modbus2mqtt/angular/tree/v0.12.6) (2024-10-16)
79+
## [v0.12.0](https://github.com/volkmarnissen/angular/tree/v0.12.0) (2024-08-16)
8480

85-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.5...v0.12.6)
81+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.11.0...v0.12.0)
8682

87-
## [v0.12.5](https://github.com/modbus2mqtt/angular/tree/v0.12.5) (2024-09-24)
83+
## [v0.11.0](https://github.com/volkmarnissen/angular/tree/v0.11.0) (2024-08-05)
8884

89-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.4...v0.12.5)
85+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/v0.10.1...v0.11.0)
9086

91-
## [v0.12.4](https://github.com/modbus2mqtt/angular/tree/v0.12.4) (2024-09-16)
87+
## [v0.10.1](https://github.com/volkmarnissen/angular/tree/v0.10.1) (2024-08-05)
9288

93-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.3...v0.12.4)
94-
95-
## [v0.12.3](https://github.com/modbus2mqtt/angular/tree/v0.12.3) (2024-09-06)
96-
97-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.2...v0.12.3)
98-
99-
## [v0.12.2](https://github.com/modbus2mqtt/angular/tree/v0.12.2) (2024-08-27)
100-
101-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.12.0...v0.12.2)
102-
103-
## [v0.12.0](https://github.com/modbus2mqtt/angular/tree/v0.12.0) (2024-08-16)
104-
105-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.11.0...v0.12.0)
106-
107-
## [v0.11.0](https://github.com/modbus2mqtt/angular/tree/v0.11.0) (2024-08-05)
108-
109-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/v0.10.1...v0.11.0)
110-
111-
## [v0.10.1](https://github.com/modbus2mqtt/angular/tree/v0.10.1) (2024-08-05)
112-
113-
[Full Changelog](https://github.com/modbus2mqtt/angular/compare/0b2169b1bceece9fa4c2c6940ef33dafe96ae43b...v0.10.1)
89+
[Full Changelog](https://github.com/volkmarnissen/angular/compare/0b2169b1bceece9fa4c2c6940ef33dafe96ae43b...v0.10.1)
11490

11591

11692

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
"@angular/platform-browser-dynamic": "^19.0.5",
3535
"@angular/router": "^19.0.1",
3636
"@babel/preset-typescript": "^7.26.0",
37-
"@modbus2mqtt/server.shared": "github:modbus2mqtt/server.shared#main",
38-
"@modbus2mqtt/specification.shared": "github:modbus2mqtt/specification.shared#main",
37+
"@modbus2mqtt/server.shared": "github:modbus2mqtt/server.shared",
38+
"@modbus2mqtt/specification.shared": "github:modbus2mqtt/specification.shared",
3939
"@ngx-translate/core": "^16.0.3",
4040
"@popperjs/core": "^2.11.8",
4141
"@types/ws": "^8.5.13",

src/app/modbus-error/modbus-error.component.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ export class ModbusErrorComponent implements OnInit {
4848
ModbusTasks.initialConnect,
4949
];
5050
constructor(private entityApiService: ApiService) {}
51-
ngOnInit(): void {}
51+
ngOnInit(): void {
52+
setInterval(() => {
53+
this.currentDate = Date.now()
54+
}, 60*1000);
55+
}
5256
getTaskName(task: ModbusTasks): string {
5357
switch (task) {
5458
case ModbusTasks.deviceDetection:
@@ -85,7 +89,9 @@ export class ModbusErrorComponent implements OnInit {
8589
if (this.currentDate == undefined) return Date.now();
8690
return this.currentDate;
8791
}
88-
getMinAgo(mins: number, date: Date = new Date()): Date {
92+
getMinAgo(mins: number): Date {
93+
let date = new Date(this.getCurrentDate())
94+
8995
let dt = new Date(
9096
date.getFullYear(),
9197
date.getMonth(),

src/app/select-slave/select-slave.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,9 +464,7 @@ export class SelectSlaveComponent extends SessionStorage implements OnInit {
464464
private slave2Form(slave: Islave, fg: FormGroup) {
465465
fg.get("name")!.setValue((slave.name ? slave.name : null) as string | null);
466466
fg.get("specificationid")!.setValue({ filename: slave.specificationid });
467-
fg.get("pollInterval")!.setValue([
468-
slave.pollInterval ? slave.pollInterval : 1000,
469-
]);
467+
fg.get("pollInterval")!.setValue(slave.pollInterval ? slave.pollInterval : 1000);
470468
fg.get("pollMode")!.setValue(
471469
slave.pollMode == undefined ? PollModes.intervall : slave.pollMode,
472470
);

0 commit comments

Comments
 (0)