xchwarze / samsung-tv-ws-api

Samsung Smart TV WS API wrapper
GNU Lesser General Public License v3.0
255 stars 42 forks source link

Is it possible to change matte options on art already on TV? #107

Open rvrolyk opened 2 years ago

rvrolyk commented 2 years ago

I see it's possible to set it during the upload but is there a means to change it post-upload? thanks!

vandenbrakel commented 2 years ago

Example has this:

Apply a filter to a specific piece of art

tv.art().set_photo_filter('SAM-F0206', 'ink')

But I haven't gotten it to work yet. Does your upload work? Mine are stuck...

Op vr 1 apr. 2022 om 00:29 schreef rvrolyk @.***>:

I see it's possible to set it during the upload but is there a means to change it post-upload? thanks!

— Reply to this email directly, view it on GitHub https://github.com/xchwarze/samsung-tv-ws-api/issues/107, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2HB2UTJUIABLN5KDAZ4VDVCYRMZANCNFSM5SG4OZ3A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rvrolyk commented 2 years ago

I did get upload working to some extent. After some number it starts to stall though. A filter is the “overlay” it can put on a photo rather than the border. I’d like to be able to change the border (mat) after photos exist since I have a large number and you can’t multi-select in their app.

On Fri, Apr 1, 2022 at 3:39 AM vandenbrakel @.***> wrote:

Example has this:

Apply a filter to a specific piece of art

tv.art().set_photo_filter('SAM-F0206', 'ink')

But I haven't gotten it to work yet. Does your upload work? Mine are stuck...

Op vr 1 apr. 2022 om 00:29 schreef rvrolyk @.***>:

I see it's possible to set it during the upload but is there a means to change it post-upload? thanks!

— Reply to this email directly, view it on GitHub https://github.com/xchwarze/samsung-tv-ws-api/issues/107, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AA2HB2UTJUIABLN5KDAZ4VDVCYRMZANCNFSM5SG4OZ3A

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/xchwarze/samsung-tv-ws-api/issues/107#issuecomment-1085737456, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALHIJVAPZ6CYQLGXESFFPADVC3G4PANCNFSM5SG4OZ3A . You are receiving this because you authored the thread.Message ID: @.***>

vandenbrakel commented 2 years ago

Ah, I see. My bad. Perhaps a download/delete on tv/upload with new matte/ is an option for you then?

Could you share your upload code? When testing from my Pi it stalls for me without any errors.

Op vr 1 apr. 2022 om 16:12 schreef rvrolyk @.***>:

I did get upload working to some extent. After some number it starts to stall though. A filter is the “overlay” it can put on a photo rather than the border. I’d like to be able to change the border (mat) after photos exist since I have a large number and you can’t multi-select in their app.

On Fri, Apr 1, 2022 at 3:39 AM vandenbrakel @.***> wrote:

Example has this:

Apply a filter to a specific piece of art

tv.art().set_photo_filter('SAM-F0206', 'ink')

But I haven't gotten it to work yet. Does your upload work? Mine are stuck...

Op vr 1 apr. 2022 om 00:29 schreef rvrolyk @.***>:

I see it's possible to set it during the upload but is there a means to change it post-upload? thanks!

— Reply to this email directly, view it on GitHub https://github.com/xchwarze/samsung-tv-ws-api/issues/107, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AA2HB2UTJUIABLN5KDAZ4VDVCYRMZANCNFSM5SG4OZ3A

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/xchwarze/samsung-tv-ws-api/issues/107#issuecomment-1085737456 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ALHIJVAPZ6CYQLGXESFFPADVC3G4PANCNFSM5SG4OZ3A

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/xchwarze/samsung-tv-ws-api/issues/107#issuecomment-1085954657, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2HB2TYNRU6PSNSWLJ4443VC374DANCNFSM5SG4OZ3A . You are receiving this because you commented.Message ID: @.***>

rvrolyk commented 2 years ago

My upload call looks pretty much the same as the readme sample.

 with(open(img_path, 'rb')) as file:
      data = file.read()
      try:
          tv_id = tv.art().upload(data, file_type='JPEG', matte='shadowbox_polar')
      except:
        logging.critical('Fatal error uploading images')
vandenbrakel commented 2 years ago

Weird, that's pretty much what I do.

However I keep getting this error "-1". Not sure what it means...

DEBUG:samsungtvws.connection:SamsungTVWS websocket event: {'data': '{"id":"512de378-ccf3-467c-87f7-cf5503bbb906","event":"error","request_data":"{\"request\": \"send_image\", \"file_type\": \"jpg\", \"conn_info\": {\"d2d_mode\": \"socket\", \"connection_id\": 3945281780, \"id\": \"512de378-ccf3-467c-87f7-cf5503bbb906\"}, \"image_date\": \"2022:04:07 09:03:34\", \"matte_id\": \"shadowbox_polar\", \"file_size\": 2316776, \"id\": \"512de378-ccf3-467c-87f7-cf5503bbb906\"}","error_code":"-1","target_client_id":"53ba80de-e424-4e2f-95a4-e167cd19636f"}', 'event': 'd2d_service_message', 'from': 'fd76946e-544c-438d-867b-2af3af6ab4'}

DEBUG:samsungtvws.helper:Processing API response: {"data":{"attributes":{"name":"U2Ftc3VuZ1R2UmVtb3Rl"},"connectTime":1649318612038,"deviceName":"U2Ftc3VuZ1R2UmVtb3Rl","id":"2a8674c6-fc73-485d-a868-85038bb701b","isHost":false},"event":"ms.channel.clientDisconnect"}

Op wo 6 apr. 2022 om 18:13 schreef rvrolyk @.***>:

My upload call looks pretty much the same as the readme sample.

with(open(img_path, 'rb')) as file: data = file.read() try: tv_id = tv.art().upload(data, file_type='JPEG', matte='shadowbox_polar') except: logging.critical('Fatal error uploading images')

— Reply to this email directly, view it on GitHub https://github.com/xchwarze/samsung-tv-ws-api/issues/107#issuecomment-1090452243, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2HB2XHQNWPF3RJFEZAFTTVDWZ2XANCNFSM5SG4OZ3A . You are receiving this because you commented.Message ID: @.***>

roberthamilton-pm commented 1 year ago

Here's a list of supported matte colours (from a 2021 Frame... not sure if other models have the same set)

seafoam, black, neutral, antique, warm, polar, sand, sage, burgandy, navy, apricot, byzantine, lavender, redorange, skyblue, turqoise

'burgandy' is not a typo — that's the colour the API returns!

purpleidea commented 1 year ago

Yes. Just change this script at this location: https://github.com/xchwarze/samsung-tv-ws-api/blob/ae5d2b33cf8bca63fb7c7025724d136ece40be95/example/art_remove_mats.py#L15

Of course, I personally think the matte options are ugly so you can also use this to turn them all off! But it's a personal preference. (You paid for all those pixels, use them for the art!)

Cheers!

purpleidea commented 1 year ago

Here's a list of supported matte colours (from a 2021 Frame... not sure if other models have the same set)

You can also use "none".

Cheers!

weemscreekstudios commented 1 year ago

Of course, I personally think the matte options are ugly so you can also use this to turn them all off! But it's a personal preference. (You paid for all those pixels, use them for the art!)

Cheers!

Ha. I also seldom use the Frame's matte. But, I like the way mattes look on the wall in the Frame. So, I have a template in Gimp/Photoshop that I use to choose my own matte colors based on the image (kind of like one would do when getting something physically framed) and then copy the image matte and all to the Frame.

weemscreekstudios commented 1 year ago

Has anyone explored using this to create a "publish" service in Lightroom or Photoshop to send pictures straight to the Frame?