Skip to content

Commit

Permalink
Accept serial port by-id and by-path
Browse files Browse the repository at this point in the history
  • Loading branch information
pdbjjens committed Jan 29, 2025
1 parent 9c70b67 commit 9d89bcd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Jens-Peter Jensen [email protected]
Copyright (c) 2025 Jens-Peter Jensen [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ A derived version of this adapter supporting control of VBus devices is availabl
Placeholder for the next version (at the beginning of the line):
### **WORK IN PROGRESS**
-->
### **WORK IN PROGRESS**
### **WORK IN PROGRESS** - 2025H1 maintenance release

* (pdbjjens) New: Accept serial port paths /dev/serial/by-id/usb-xxxxxxxxxxxxxxxxxxx or /dev/serial/by-path/platform-xxxxxxxxxxxxxxxxxxx
* (pdbjjens) Change: Migration to ESLint 9
* (simatec) Responsive Design added

### 0.4.0 (2024-08-13) - 2024H2 maintenance release
Expand Down Expand Up @@ -94,7 +96,7 @@ The authors are in no way endorsed by or affiliated with RESOL GmbH, or any asso

MIT License

Copyright (c) 2024 Jens-Peter Jensen <[email protected]>
Copyright (c) 2025 Jens-Peter Jensen <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const ctx = {
const adapterName = require('./package.json').name.split('.').pop();
const ipformat = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
const fqdnformat = /^(?!:\/\/)(?=.{1,255}$)((.{1,63}\.){1,127}(?![0-9]*$)[a-z0-9-]+\.?)$/;
const serialformat = /^(COM|com)[0-9][0-9]?$|^\/dev\/tty.*$/;
const serialformat = /^(COM|com)[0-9][0-9]?$|^\/dev\/tty.*$|^\/dev\/serial\/by-id\/usb-.*$|^\/dev\/serial\/by-path\/platform-.*$/i;
const vbusioformat = /vbus.io|vbus.net$/;

// Currently unused: const urlformat = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;
Expand Down

0 comments on commit 9d89bcd

Please sign in to comment.