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

Implement Samsung Smart Monitor 4K M7 #121

Closed
3 tasks done
rohitagre opened this issue Jun 17, 2023 · 19 comments · Fixed by #122
Closed
3 tasks done

Implement Samsung Smart Monitor 4K M7 #121

rohitagre opened this issue Jun 17, 2023 · 19 comments · Fixed by #122
Assignees
Labels
enhancement New feature or request

Comments

@rohitagre
Copy link

Before opening the issue, have you...?

  • Searched for existing issues
  • Looked through common issues
  • Updated plugin to the latest version (if applicable)

Describe Your Problem

Samsung Smart monitor M7 is not showing up on Homebridge. I believe it is identical to Samsung TV in terms of features.

It would be great if you can add this device.

Thanks for your work

Logs

[6/17/2023, 6:35:58 PM] [smartthings-tv] Ignoring SmartThingsDevice 4K Monitor (device---id) because device type x.com.st.d.monitor is not implemented

If applicable, add screenshots to help explain your problem.

No response

Environment Information

- Plugin Version: 1.5.0
- Homebridge Version: v1.6.1
- Node.js version: v18.16.0
- NPM version: 9.5.1
- Operating System: hb-service on Raspbian
@rohitagre rohitagre added the question Further information is requested label Jun 17, 2023
@o-lukas
Copy link
Owner

o-lukas commented Jun 17, 2023

It seems like your monitor is another device type than the expected one. Since I don't own such a monitor it will be difficult for me to test if it behaves the same as the TVs.

I could try to access the monitor using an API Token of your account and check if the plugin can handle the capabilities of your monitor. I think it would be the best if you send me an email so you don't have to share any personal data publicly.

@rohitagre
Copy link
Author

I will send you an email with my API token.

I made a small change in the code, see image attached and was able to control some of the features, but there are some warnings and errors. i am attaching the logs as well
homebridge.log.txt

Screenshot 2023-06-18 at 12 14 39 AM

Let me know if you need my help in debugging this :)

@o-lukas o-lukas linked a pull request Jun 18, 2023 that will close this issue
@o-lukas
Copy link
Owner

o-lukas commented Jun 18, 2023

Thanks for sending me the API token!

I made some changes (basically the same you mentioned) and it looked quite good. All capabilities look the same or somehow equal so I'm pretty sure it should be working. I didn't want to test the features using your API token to not confuse you by turning your monitor on remotely 😄

I also checked your attached log file. I did only find one error regarding the picture mode. I compared the picture mode capability of your monitor and my TV and they are exactly the same. So it should work as expected. Did you have your monitor turned on when testing? Some capabilities require that the monitor is turned on while some also work when it's turned off.

If possible you could check the changes I made in #122 and check if it's working for you. If everything runs well I will create a new release including the changes.

@rohitagre
Copy link
Author

I checked out the changes made in #122, there are no errors in the logs but im not able to see it in homekit. I have clicked on add accessory but the TV doesnt seem to be detected. Although it shows up on homebridge config ui. please see attached screenshots.

Screenshot 2023-06-18 at 10 35 33 PM Screenshot 2023-06-18 at 10 36 29 PM
[6/18/2023, 5:04:07 PM] [Homebridge UI] Sending SIGTERM to Homebridge
[6/18/2023, 5:04:07 PM] Got SIGTERM, shutting down Homebridge...
[6/18/2023, 5:04:13 PM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[6/18/2023, 5:04:13 PM] [Homebridge UI] Shutting down Homebridge before removing cached accessories
[6/18/2023, 5:04:13 PM] [Homebridge UI] Clearing Cached Homebridge Accessories...
[6/18/2023, 5:04:13 PM] [Homebridge UI] Removed /var/lib/homebridge/accessories/.cachedAccessories.bak
[6/18/2023, 5:04:13 PM] [Homebridge UI] Removed /var/lib/homebridge/accessories/cachedAccessories
[6/18/2023, 5:04:18 PM] [HB Supervisor] Restarting Homebridge...
[6/18/2023, 5:04:18 PM] [HB Supervisor] Starting Homebridge with extra flags: -I
[6/18/2023, 5:04:18 PM] [HB Supervisor] Started Homebridge v1.6.1 with PID: 10448
[6/18/2023, 5:04:20 PM] Loaded config.json with 17 accessories and 2 platforms.
[6/18/2023, 5:04:20 PM] ---
[6/18/2023, 5:04:23 PM] Loaded plugin: homebridge-config-ui-x@4.50.4
[6/18/2023, 5:04:23 PM] Registering platform 'homebridge-config-ui-x.config'
[6/18/2023, 5:04:23 PM] ---
[6/18/2023, 5:04:29 PM] Loaded plugin: homebridge-mqttthing@1.1.44
[6/18/2023, 5:04:29 PM] Registering accessory 'homebridge-mqttthing.mqttthing'
[6/18/2023, 5:04:29 PM] ---
[6/18/2023, 5:04:29 PM] Loaded plugin: @o-lukas/homebridge-smartthings-tv@1.5.0
[6/18/2023, 5:04:29 PM] Registering platform '@o-lukas/homebridge-smartthings-tv.smartthings-tv'
[6/18/2023, 5:04:29 PM] ---
[6/18/2023, 5:04:29 PM] Loading 2 platforms...
[6/18/2023, 5:04:29 PM] [smartthings-tv] Initializing smartthings-tv platform...
[6/18/2023, 5:04:29 PM] Loading 17 accessories...
[6/18/2023, 5:04:29 PM] [Fan] Initializing mqttthing accessory...
[6/18/2023, 5:04:30 PM] [Balcony Light] Initializing mqttthing accessory...
[6/18/2023, 5:04:30 PM] [Balcony Light 2] Initializing mqttthing accessory...
[6/18/2023, 5:04:30 PM] [Balcony Light 3] Initializing mqttthing accessory...
[6/18/2023, 5:04:30 PM] [TubeLight] Initializing mqttthing accessory...
[6/18/2023, 5:04:30 PM] [LED Panel 1] Initializing mqttthing accessory...
[6/18/2023, 5:04:30 PM] [LED Panel 2] Initializing mqttthing accessory...
[6/18/2023, 5:04:30 PM] [LED Panel 3] Initializing mqttthing accessory...
[6/18/2023, 5:04:30 PM] [LED Panel 4] Initializing mqttthing accessory...
[6/18/2023, 5:04:30 PM] [LED Panel 5] Initializing mqttthing accessory...
[6/18/2023, 5:04:30 PM] [Gate Light] Initializing mqttthing accessory...
[6/18/2023, 5:04:30 PM] [Gate Pump] Initializing mqttthing accessory...
[6/18/2023, 5:04:30 PM] [Fan 1] Initializing mqttthing accessory...
[6/18/2023, 5:04:30 PM] [Fan 2] Initializing mqttthing accessory...
[6/18/2023, 5:04:30 PM] [LED Cove 1] Initializing mqttthing accessory...
[6/18/2023, 5:04:30 PM] [LED Cove 2] Initializing mqttthing accessory...
[6/18/2023, 5:04:30 PM] [LED Cove 3] Initializing mqttthing accessory...
Setup Payload:
X-HM://----
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 000-00-000 │     
    └────────────┘     
                       
[6/18/2023, 5:04:30 PM] Homebridge v1.6.1 (HAP v0.11.1) (Homecontrol) is running on port 51309.
[6/18/2023, 5:04:31 PM] [smartthings-tv] Adding new accessory: 4K Monitor (device--id)
[6/18/2023, 5:04:31 PM] [smartthings-tv] [4K Monitor] Registering capabilities for component main
[6/18/2023, 5:04:31 PM] 4K Monitor 64CC is running on port 38227.
[6/18/2023, 5:04:31 PM] Please add [4K Monitor 64CC] manually in Home app. Setup Code: 000-00-000
[6/18/2023, 5:04:33 PM] [smartthings-tv] [4K Monitor] Registering capability: Switch
[6/18/2023, 5:04:33 PM] [smartthings-tv] [4K Monitor] Registering capability: Audio Volume
[6/18/2023, 5:04:34 PM] [smartthings-tv] [4K Monitor] Registering capability: Audio Mute
[6/18/2023, 5:04:40 PM] [smartthings-tv] [4K Monitor] Not registering capability because registering of applications has been disabled: launchApp
[6/18/2023, 5:04:45 PM] [smartthings-tv] [4K Monitor] Registering capability: Media Input Source
[6/18/2023, 5:04:45 PM] [smartthings-tv] [4K Monitor] Capability Media Input Source might not work as expected because it's status is: proposed
[6/18/2023, 5:05:41 PM] [@o-lukas/homebridge-smartthings-tv] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.
[6/18/2023, 5:05:42 PM] [@o-lukas/homebridge-smartthings-tv] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.
[6/18/2023, 5:05:46 PM] [@o-lukas/homebridge-smartthings-tv] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.
[6/18/2023, 5:05:49 PM] [@o-lukas/homebridge-smartthings-tv] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.
[6/18/2023, 5:05:51 PM] [@o-lukas/homebridge-smartthings-tv] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.
[6/18/2023, 5:05:54 PM] [@o-lukas/homebridge-smartthings-tv] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.
[6/18/2023, 5:05:57 PM] [@o-lukas/homebridge-smartthings-tv] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.
[6/18/2023, 5:06:00 PM] [@o-lukas/homebridge-smartthings-tv] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.
[6/18/2023, 10:36:22 PM] [@o-lukas/homebridge-smartthings-tv] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.
[6/18/2023, 10:36:24 PM] [@o-lukas/homebridge-smartthings-tv] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.
[6/18/2023, 10:36:28 PM] [@o-lukas/homebridge-smartthings-tv] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info.
Screenshot 2023-06-18 at 10 39 42 PM Screenshot 2023-06-18 at 10 39 51 PM

@o-lukas
Copy link
Owner

o-lukas commented Jun 18, 2023

Looks kind of strange because your monitor seems to be published:

Please add [4K Monitor 64CC] manually in Home app. Setup Code: 000-00-000

Might be a problem with the active identifier which returns -1 according to the log. I will have a look at it the next days and will let you know if I could find out anything.

@o-lukas
Copy link
Owner

o-lukas commented Jun 19, 2023

I made some changes in 46b51df and now try to prevent an illegal active identifier. Could you please try again with this fix. If it does not work as expected you please enable debug mode and attach a new log file.

@AdventAtlas
Copy link

I have some Smart Monitors M1 incase I can lend a hand with this issue

@o-lukas
Copy link
Owner

o-lukas commented Jun 23, 2023

@AdventAtlas I have created a new pre-release containing the current changes. It would be great if you could test the plugin with the M1 monitors and check if everything is working correctly.

@AdventAtlas
Copy link

Will do, got a quick guide on installing prereleases? I'm used to just installing the plugins via homebridge itself

@o-lukas
Copy link
Owner

o-lukas commented Jun 23, 2023

If you're using Homebride Config UI you can simply click on the tools icon of the plugin and then select Install alternate version and then select the next version.

HomebridgeUI_AlternateVersion

@rohitagre
Copy link
Author

log.log
No luck... All settings remain the same as before.

@o-lukas
Copy link
Owner

o-lukas commented Jun 26, 2023

I tried to fix another issue with the input sources and published a new pre-release. Maybe you could try again if it does work now.

Sorry for the inconveniences but it's pretty hard to develop without being able to test properly...

@o-lukas
Copy link
Owner

o-lukas commented Jul 2, 2023

@rohitagre @AdventAtlas did any of you have a change to have a look at it?

@rohitagre
Copy link
Author

no sir, no luck :( i still cannot see the tv in my home app, although i can see it on homebridge-config-ui under accessories.

@AdventAtlas
Copy link

Just tested today. All my monitors work, turn in on and off and switching input.
Had to manually add them to the home app.

Got these error messages referencing the devices. Once the plugin discovered them.
[Name of Device] Error when executing setInputSource of capability samsungvd.mediaInputSource: Request failed with status code 409: {"requestId":"xxxxxxxxxxxxx","error":{"code":"ConflictError","message":"invalid device state","details":[]}}

And this error was when my devices showed "Offline" in the smart thing's app, when I fixed this the error didn't show up anymore, just in case you wanted to add a more descriptive message.
[Name of Device] Error when executing off of capability switch: Request failed with status code 409: {"requestId":"xxxxxxxxxxxxx","error":{"code":"ConflictError","message":"invalid device state","details":[]}}

@AdventAtlas
Copy link

no sir, no luck :( i still cannot see the tv in my home app, although i can see it on homebridge-config-ui under accessories.

Did you check the homebridge UI and see if it was asking for a manual setup?

@o-lukas
Copy link
Owner

o-lukas commented Jul 3, 2023

Just tested today. All my monitors work, turn in on and off and switching input. Had to manually add them to the home app.

Got these error messages referencing the devices. Once the plugin discovered them. [Name of Device] Error when executing setInputSource of capability samsungvd.mediaInputSource: Request failed with status code 409: {"requestId":"xxxxxxxxxxxxx","error":{"code":"ConflictError","message":"invalid device state","details":[]}}

And this error was when my devices showed "Offline" in the smart thing's app, when I fixed this the error didn't show up anymore, just in case you wanted to add a more descriptive message. [Name of Device] Error when executing off of capability switch: Request failed with status code 409: {"requestId":"xxxxxxxxxxxxx","error":{"code":"ConflictError","message":"invalid device state","details":[]}}

@AdventAtlas the invalid device state message is an error message of the SmartThings API and usually indicates that the device is turned off but the plugins tries to execute a command which needs it to be turned on. If everything works as expected you can usually ignore it.

@o-lukas
Copy link
Owner

o-lukas commented Jul 3, 2023

no sir, no luck :( i still cannot see the tv in my home app, although i can see it on homebridge-config-ui under accessories.

Did you check the homebridge UI and see if it was asking for a manual setup?

You're right. I forgot to mention that the monitor (as well as the TVs) need to be registered manually as they are published as external accessory.

@o-lukas o-lukas added enhancement New feature or request and removed question Further information is requested labels Jul 8, 2023
@o-lukas
Copy link
Owner

o-lukas commented Jul 8, 2023

I've merged the changes to the main branch and created a new release. If there are any problems remaining please open a new issue for these problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants