Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3.0.0 - replace python mqtt script with mqtt.js #62

Merged
merged 106 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
202a157
added basic mqtt client + logs
LeLunZ Jun 1, 2024
1b15759
Fixed import
LeLunZ Jun 1, 2024
79ec674
Added log in disconnect
LeLunZ Jun 1, 2024
8e0d0c4
update characteristic in mqtt callbacks
LeLunZ Jun 1, 2024
091063b
Added topic to log message
LeLunZ Jun 1, 2024
e4d5410
Reworked application
LeLunZ Jun 2, 2024
b1c8a68
Fix log
LeLunZ Jun 2, 2024
c50a160
Fix wrong mac adress
LeLunZ Jun 2, 2024
8fdb76e
Fix missing argument
LeLunZ Jun 2, 2024
f6b3589
Fix sendKey -> sendkey
LeLunZ Jun 2, 2024
1f4fb7f
added additional log message
LeLunZ Jun 2, 2024
56a29bb
Fixed activeIdentifier not set on first pull
LeLunZ Jun 2, 2024
f60332a
Fix key input
LeLunZ Jun 2, 2024
6395b13
disable mqtt queueQoSZero
LeLunZ Jun 2, 2024
54a04f4
added faster checking for tv state
LeLunZ Jun 2, 2024
057ddee
Force disconnection
LeLunZ Jun 2, 2024
0bde79f
reconnect only once
LeLunZ Jun 2, 2024
1f5edab
added mqtt event close/end
LeLunZ Jun 2, 2024
36207aa
added pollingInterval to schema
LeLunZ Jun 2, 2024
17d4192
Added default for pollingInterval incase of missing migration
LeLunZ Jun 2, 2024
d0ea199
Added native script for authorization
LeLunZ Jun 2, 2024
be245f0
Fix type error
LeLunZ Jun 2, 2024
337cadf
Move authorize into its own script
LeLunZ Jun 2, 2024
0798754
Add shebang to authorize.ts
LeLunZ Jun 2, 2024
f96aceb
Fix open issues
LeLunZ Jun 3, 2024
8fe038b
Fix authorization workflow
LeLunZ Jun 3, 2024
4d82562
Added error message for failed authorization
LeLunZ Jun 3, 2024
60c4953
Subscribe to correct topic
LeLunZ Jun 3, 2024
a132b8e
Subscribe to correct topic
LeLunZ Jun 3, 2024
9555150
fix result validation
LeLunZ Jun 3, 2024
6fe8cdb
Changed subscribe location in authorize
LeLunZ Jun 3, 2024
a6e5ae0
Addapted changelog
LeLunZ Jun 3, 2024
e48bbce
deleted python script
LeLunZ Jun 3, 2024
da06549
Removed python dependencies
LeLunZ Jun 3, 2024
34c0a25
Merge branch 'master' into v3.0.0
LeLunZ Jun 3, 2024
d1de423
added dynamic threshold to counter logic
LeLunZ Jun 3, 2024
71022b6
Changed README and adapted default values
LeLunZ Jun 3, 2024
12ca2d4
Fixed bug with false negative/positives handling
LeLunZ Jun 3, 2024
7532696
Fixed source comparison
LeLunZ Jun 3, 2024
aadfd65
Only disconnect if needed
LeLunZ Jun 3, 2024
117bc64
Fix liniting issues
LeLunZ Jun 3, 2024
1587caa
Added more instructions to README.md
LeLunZ Jun 3, 2024
518ec38
Added settings for Always On TVs
LeLunZ Jun 5, 2024
1478235
changed version in package.json
LeLunZ Jun 5, 2024
32d0050
fix config schema
LeLunZ Jun 5, 2024
43f36d5
Fix macaddress input
LeLunZ Jun 5, 2024
a54cfbb
Early terminate process instead of throwing an error
LeLunZ Jun 5, 2024
007c7c9
Added placeholder and fixed type in config.schema
LeLunZ Jun 5, 2024
ab902a8
Changed layout order in schema
LeLunZ Jun 5, 2024
3734913
Fix macaddress not assigned in platform.ts
LeLunZ Jun 5, 2024
6fdd091
Send WOL Packages multiple times
LeLunZ Jun 5, 2024
314aaac
Increase wol timeout
LeLunZ Jun 5, 2024
fb51bbc
added form to schema
LeLunZ Jun 6, 2024
011f735
hide ssl cert/key if not needed
LeLunZ Jun 6, 2024
ee11656
Added wol options to codebase
LeLunZ Jun 6, 2024
5e75b8e
Merge branch 'master' into v3.0.0
LeLunZ Jun 6, 2024
758a6b8
Updated Changelog
LeLunZ Jun 6, 2024
7edd9b9
Removed address from wolOptions
LeLunZ Jun 6, 2024
5b1a771
Removed telnet dependencie
LeLunZ Jun 8, 2024
2e38209
Added apps as input sources
LeLunZ Jun 8, 2024
bbfea3b
Fix config schema
LeLunZ Jun 8, 2024
005e057
Added log message for adding apps
LeLunZ Jun 8, 2024
b88849d
Fix if condition
LeLunZ Jun 8, 2024
c18ed79
Fixed issues
LeLunZ Jun 8, 2024
6e9d359
Added empty urlType parameter
LeLunZ Jun 8, 2024
ca02f03
Fix typing issue
LeLunZ Jun 8, 2024
dc99fe0
Fix typing issue
LeLunZ Jun 8, 2024
83f1a95
fixed inputs for changing app
LeLunZ Jun 8, 2024
249dd74
Workaround for clicking on unknown
LeLunZ Jun 8, 2024
92ffe9d
Replace write response with update characteristic
LeLunZ Jun 8, 2024
f66640a
Remove updateCharacteristic
LeLunZ Jun 8, 2024
fe9ecaf
Refactoring into smaller parts/removing duplicates
LeLunZ Jun 8, 2024
30befd9
Add key_mute to speakerService
LeLunZ Jun 8, 2024
f1af11c
Add documentation
LeLunZ Jun 8, 2024
98b983e
Add new features into readme
LeLunZ Jun 8, 2024
09683e4
FIx readme
LeLunZ Jun 8, 2024
ed967c7
Fix readme
LeLunZ Jun 8, 2024
28d94c4
Fix readme
LeLunZ Jun 8, 2024
84dbffb
Fix link in readme
LeLunZ Jun 8, 2024
50cdacc
Changed wording in readme
LeLunZ Jun 8, 2024
8a380aa
Updated Changelog
LeLunZ Jun 8, 2024
0a0c055
Fix broken config variable check
LeLunZ Jun 8, 2024
94f5c60
Bump version to 3.0.0-beta.2
LeLunZ Jun 8, 2024
91979ea
update tsconfig.json
LeLunZ Jun 9, 2024
61c9c81
renamed mqtt-helper
LeLunZ Jun 9, 2024
2ee9028
improved changelog and readme
LeLunZ Jun 9, 2024
c190eb0
Added comment
LeLunZ Jun 9, 2024
c8ef74a
Bump version to 3.0.0-beta.3
LeLunZ Jun 9, 2024
e53b9e0
Fix broken module config
LeLunZ Jun 9, 2024
a4162eb
Bump version to 3.0.0-beta.4 to fix broken module
LeLunZ Jun 9, 2024
566bb36
align tsconfig with homebridge-plugin-template
LeLunZ Jun 9, 2024
4f4cb7d
align tsconfig with homebridge-plugin-template
LeLunZ Jun 9, 2024
c6a8a09
Fix imports in index.ts
LeLunZ Jun 9, 2024
c7f7326
Fix imports in all files
LeLunZ Jun 9, 2024
16aea81
ES6 import removed
LeLunZ Jun 9, 2024
473b4ed
Fix missing import
LeLunZ Jun 9, 2024
abcce6a
Bump version to 3.0.0-beta.5 to actually fix broken modules
LeLunZ Jun 9, 2024
80ee31e
Fix custom scripts
LeLunZ Jun 9, 2024
ffce6d8
Added connection errors to scripts
LeLunZ Jun 9, 2024
44f6720
Added script termination and line ending after error message
LeLunZ Jun 9, 2024
7cff38c
Bump version to 3.0.0-beta.6 to fix custom scripts
LeLunZ Jun 9, 2024
0344687
Added validation for new config options
LeLunZ Jun 10, 2024
927390a
replaced logger with logging
LeLunZ Jul 22, 2024
5180bb1
bumped version to 3.0.0 and updated all versions
LeLunZ Jul 22, 2024
6255d94
bumped version of dev dependencies
LeLunZ Jul 22, 2024
d5653fe
updated README
LeLunZ Jul 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@
"plugin:@typescript-eslint/recommended" // uses the recommended rules from the @typescript-eslint/eslint-plugin
],
"parserOptions": {
"ecmaVersion": 2018,
"ecmaVersion": 2022,
"sourceType": "module"
},
"ignorePatterns": [
"dist"
],
"rules": {
"no-restricted-imports": ["error", { "patterns": [{
"group": ["./scripts/*"],
"message": "Scripts should not be imported in the main codebase. They are only meant to be run from the command line."
}]
}],

"quotes": ["warn", "single"],
"indent": ["warn", 2, { "SwitchCase": 1 }],
"semi": ["off"],
Expand Down
54 changes: 0 additions & 54 deletions .homebridge/config.json

This file was deleted.

51 changes: 47 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# 2.0.2
# 3.0.0

- Fixed plugin to work with newer versions of homebridge.
- Fixed order of Input Sources
- Added additional logs and error handling
This release has **braking changes**.
Please read through the plugins documentation and update your configuration accordingly.

### Config Changes

- `ifname` is now `macaddress` and should be the mac address of the homebridge server
- changes in `devices`
- `showApps` (default: false) - show apps as input sources
- `apps` (default: []) - list of apps to show as input sources
- if none are provided, all apps are shown
- `tvType` for always on tvs added
- `default` normal tv
- `fakeSleep` tv with always on where fakeSleep property is used
- `pictureSettings` tv with always on where sleep needs to be detected through the tvs picture settings
- if `tvType` is `pictureSettings` the following properties are required
- `menuId` - the picture setting to check for sleep
- `menuFlag` - the value of the picture settings to check for sleep
- Advanced Settings section:
- `pollingInterval` (default: 4) - seconds to wait between polling the tv for the on/off state
- if you have a tv that is always on, polling is disabled and changing this doesn't do anything
- `wolInterval` (default: 400) - milliseconds to wait between sending WoL packets
- `wolRetries` (default: 3) - number of times to send WoL packets to account for packet loss



### Changed
- Instead of using the ifname to get the macaddress, users should now enter there macaddress directly
- Plugin now connects to mqtt directly while tv is online
- Connection will stay open as long as possible
- Input Source is now updated in real time
- Changing source with the home app works now most of the time
- WoL packets are now sent multiple times in the background
- I noticed that the tv sometimes doesn't wake up on the first packet as the packet got lost or the network interface of the tv has some issues
- Removed telnet dependency as it wasn't used anymore


### Added
- Support for showing apps as Input Sources
- showApps and apps config options
- Added support for always on tvs
- see tvType and the menuId and menuFlag properties
- Added `hisense-tv-authorize` and `hisense-tv-always-on-test` scripts to help with the setup
- Added additional config properties
- pollingInterval
- wolInterval
- wolRetries
Loading