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

Family Hub Camera not working on Samsung TIZEN 4.0 #28473

Open
GuruPG opened this issue Nov 2, 2019 · 79 comments
Open

Family Hub Camera not working on Samsung TIZEN 4.0 #28473

GuruPG opened this issue Nov 2, 2019 · 79 comments

Comments

@GuruPG
Copy link

GuruPG commented Nov 2, 2019

Home Assistant release with the issue:
0.101.2

Last working Home Assistant release (if known):
Unknown

Operating environment (Hass.io/Docker/Windows/etc.):
Hass.io runing on Raspberry 4

Integration:
https://www.home-assistant.io/integrations/familyhub/

Description of problem:
Camera feed does not work after fridge has upgraded to TIZEN 4.0 firmware.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

camera:
  - platform: familyhub
    ip_address: '192.168.0.103'

Traceback (if applicable):

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 40, in real_ip_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 73, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 136, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 122, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 496, in get
    return await self.handle(request, camera)
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 513, in handle
    image = await camera.async_camera_image()
  File "/usr/src/homeassistant/homeassistant/components/familyhub/camera.py", line 47, in async_camera_image
    return await self.family_hub_cam.async_get_cam_image()
  File "/usr/local/lib/python3.7/site-packages/pyfamilyhublocal/__init__.py", line 29, in async_get_cam_image
    glazeCameraInfo = await self._get_cam_info()
  File "/usr/local/lib/python3.7/site-packages/pyfamilyhublocal/__init__.py", line 57, in _get_cam_info
    data = json.loads(await response.read())
  File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Additional information:

@angustyler
Copy link

I have the same issue - as very clearly described above. Happy to provide any diagnostic data if helpful.

@DKrics
Copy link

DKrics commented Jan 5, 2020

Hasn't worked for me for sometime now, too (months).
Here's my log.
Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start resp = await task File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle resp = await handler(request) File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 40, in real_ip_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 73, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 136, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 123, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 496, in get return await self.handle(request, camera) File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 513, in handle image = await camera.async_camera_image() File "/usr/src/homeassistant/homeassistant/components/familyhub/camera.py", line 47, in async_camera_image return await self.family_hub_cam.async_get_cam_image() File "/usr/local/lib/python3.7/site-packages/pyfamilyhublocal/__init__.py", line 29, in async_get_cam_image glazeCameraInfo = await self._get_cam_info() File "/usr/local/lib/python3.7/site-packages/pyfamilyhublocal/__init__.py", line 57, in _get_cam_info data = json.loads(await response.read()) File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.7/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@stale
Copy link

stale bot commented Apr 4, 2020

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 4, 2020
@zirdum
Copy link

zirdum commented Apr 4, 2020

Issue is still present.

@stale stale bot removed the stale label Apr 4, 2020
@GuruPG
Copy link
Author

GuruPG commented Apr 4, 2020

Same

@DKrics
Copy link

DKrics commented Apr 4, 2020

Still not working despite up to date version of HA.

@gmony911
Copy link

Issue is still presistent

@dvbit
Copy link

dvbit commented Jun 3, 2020

same over here

@angustyler
Copy link

angustyler commented Jun 3, 2020 via email

@aLTeReGo-SWI
Copy link

Still not working running 0.112.4

@stale
Copy link

stale bot commented Oct 12, 2020

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 12, 2020
@GuruPG
Copy link
Author

GuruPG commented Oct 12, 2020

Still an open issue.

@stale stale bot removed the stale label Oct 12, 2020
@ReenigneArcher
Copy link

Same issue, just tried setting up the integration today.

@ishboo
Copy link

ishboo commented Nov 22, 2020

Same issue

@github-actions
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 20, 2021
@angustyler
Copy link

angustyler commented Feb 20, 2021 via email

@github-actions github-actions bot removed the stale label Feb 20, 2021
@veilofsecurity
Copy link

The underlying python module no longer works as is with Tizen 4.0. It's looking for this URL: http://ip:17654/.krate/owner/share/scloud/glazeCameraInfo.txt to parse and then make subsequent requests for the actual images. This URL now returns a 404 as do the typical camera_#.jpg URLs. I have been unable to find what the new URL should be if it even exists. Samsung may have just removed the access altogether.

@ReenigneArcher
Copy link

The Samsung Family Hub app for Android (and probably ios) is able to show the inside view of the fridge. Maybe the integration could be fixed by inspecting the traffic for the official app and replicating it to the integration.

@hesspoint
Copy link

Same issue here :( still does not work on 2021.6.6

@modogo2000
Copy link

Same issue core-2021.8.1

@atv2016
Copy link

atv2016 commented Jan 14, 2024 via email

@kopierschnitte
Copy link

I've modified and used the code in a different software (iobroker) and it works like a charm 😉

Quite sure it should work out of the box for home assistant (which I don't have any experience with).

@atv2016
Copy link

atv2016 commented Jan 14, 2024 via email

@Krzysztonek
Copy link

The installation procedure requires the following:
obraz
The SmartThings token is obvious, but what Device ID should be entered here? A camera itself?

In the configuration.yaml file I added:

camera:
  - platform: familyhub
    ip_address: "<MY_FRIDGE_IP_ADDRESS>"
    name: Inside My Fridge

However, camera.inside_my_fridge doesn't seem to be the right device id. Any hint, please?

@kopierschnitte
Copy link

Not familiar with HA but on my system, the device id is a unique identifier for each Smartthings device (the fridge in your case) and is assigned by Samsung. Maybe you find somewhere in HA?

@atv2016
Copy link

atv2016 commented Jan 15, 2024 via email

@kopierschnitte
Copy link

Yes, I already did some experiments and I just needed some details to implement it ;-)

@Krzysztonek
Copy link

Krzysztonek commented Jan 15, 2024

Not familiar with HA but on my system, the device id is a unique identifier for each Smartthings device (the fridge in your case) and is assigned by Samsung. Maybe you find somewhere in HA?

I found my fridge id on my SmartThings account:
obraz
However, this id makes.... nothing. Neither a camera, nor an entity appears on the integration screen:
obraz

@kopierschnitte
Copy link

Well, the device id looks ok. But I'm afraid I can't help with the remaining problems :-(

@Krzysztonek
Copy link

Krzysztonek commented Jan 15, 2024

What a pity! We have been so closed to reach this goal... ;)
Anyway, thank you! ❤️

@Krzysztonek
Copy link

Krzysztonek commented Jan 15, 2024

Guys, I was WRONG... IT really WORKS!

This integration seemingly does nothing, but in fact IT DOES all those things.
When integration is running, three camera devices appear in HA:

camera.top
camera.middle
camera.bottom

All three cameras are steady, no motion is detectable. But if you want to look inside your fridge being outside your home at the mall, then VOILLA!

obraz

This integration is very useful when doing some shopping, looking remotely inside the fridge and buying exactly what is needed, not overpaying for unwanted goods..

@atv2016
Copy link

atv2016 commented Jan 15, 2024 via email

@ReenigneArcher
Copy link

@Krzysztonek what scopes did you give your smartthings token? I see the 3 cameras are created, but there are no images. Wonder if it's a token issue.

@atv2016
Copy link

atv2016 commented Jan 15, 2024 via email

@atv2016
Copy link

atv2016 commented Jan 15, 2024 via email

@atv2016
Copy link

atv2016 commented Jan 15, 2024 via email

@atv2016
Copy link

atv2016 commented Jan 15, 2024 via email

@ReenigneArcher
Copy link

@atv2016 you get a token from here: https://account.smartthings.com/tokens

Not sure what scopes are necessary though.

@ReenigneArcher
Copy link

ReenigneArcher commented Jan 15, 2024

It works with these selections... can any be removed?

image
image

Edit: previous post was wrong

@ReenigneArcher
Copy link

Camera aspect ratio is 2.27 for those interested.

image

@atv2016
Copy link

atv2016 commented Jan 15, 2024 via email

@maxx
Copy link

maxx commented Jan 26, 2024

Token comes from https://account.smartthings.com/tokens
Device ID comes from https://my.smartthings.com/advanced/devices

@MrNickIE
Copy link

For those coming here to figure this out.....

Install the improved SmartThings integration (to get all the settings/sensors)

Install this https://github.com/ibielopolskyi/smartthings_fridge_camera/tree/main manually by uploading to custom components folder.

Add the entry to your configuration.yaml with the camera IP per #28473 (comment)

Restart your HA.

Wait. Its took my system a while to start grabbing images.

Add the integration, and get the token and device ID from the smartthings website.

#win

@thenoid
Copy link

thenoid commented Feb 27, 2024

Install the improved SmartThings integration (to get all the settings/sensors)

Got a link to "the improved SmartThings integration"

@MrNickIE
Copy link

@thenoid
Copy link

thenoid commented Mar 2, 2024

Hmm - the new/improved smartthings seems to break the power monitoring (contemplator1998/smartthings#5) anyone have the fix?

@moebis
Copy link

moebis commented Mar 9, 2024

Hmm - the new/improved smartthings seems to break the power monitoring (contemplator1998/smartthings#5) anyone have the fix?

Yep, I'm having the same issues and other have said the same thing, watts reading dies with this HACS version.

@MrNickIE
Copy link

MrNickIE commented Mar 9, 2024

Sorry All, I also do have that issue. Hopefully someone smarter than I can figure it out :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests