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

Turn off privacy mode doesn't work #2

Closed
rikman122 opened this issue Oct 4, 2020 · 11 comments
Closed

Turn off privacy mode doesn't work #2

rikman122 opened this issue Oct 4, 2020 · 11 comments
Labels
Invalid Bug/Enhancement not related to integration or already available.

Comments

@rikman122
Copy link

Hi! Nice job here!

I'm testing the integration and find out that turning off privacy mode isn't working. I can turn it on but not off. This is the service call:
tapo_control.set_privacy_mode
entity_id: tapo_control.cam
privacy_mode: 'off'

I'm in the latest HA core and v1.0 tapo control integration.

@JurajNyiri
Copy link
Owner

JurajNyiri commented Oct 4, 2020

Hello,

your service call looks alright.

Which camera do you have?

Is there any error in the log?

@rikman122
Copy link
Author

Hi,

I have Tapo C200 camera. No errors in logs and turning the privacy mode on with the same service works.

@JurajNyiri
Copy link
Owner

JurajNyiri commented Oct 4, 2020

Please try following:

  • Update to 1.2
  • If it still doesn't work, try running with following script, that one is 100% working on my Tapo C200. Just replace the entity_id and script id and name if you want to
set_bedroom_camera_away:
  alias: Set Bedroom Camera Away
  sequence:
  - data:
      privacy_mode: 'off'
    service: tapo_control.set_privacy_mode
    entity_id: tapo_control.bedroom

Triple check the entity_id is correct.

And always check logs and paste here if there is something there... if the script works, please screenshot how you were calling it before.

In the meantime I will be working on further enhancing error handling, there are still some places which I need to improve that will help us debug these kind of issues.

@rikman122
Copy link
Author

rikman122 commented Oct 4, 2020

Hi,

Updated to 1.2 and tried the service and your script but isn't working.

Entity id is correct because if I change 'off' to 'on' in your script or service it works.

No errors in log are displayed.

If it helps, my camera firmware version is 1.0.14 (latest)

@JurajNyiri
Copy link
Owner

Hey,

I have discovered new/alternative ways to call the same functions of cameras in 1.3. It also includes error handler for every single function.

Try if it works, if it doesn't there should at least be an error in the log unless camera responded with success.

Please let me know how it goes.

Also, what FW are you running?

@rikman122
Copy link
Author

Hi,

Just tried and nothing change. No log errors reported so I tried triggering an error by passing 'offff' and then I can see an error saying: "Incorrect privacy_mode value. Possible values: on, off." so logs works well.

The camera FW is the latest one (1.0.14). If there is something more you need or any way I can help you with debug just ask it. I have programming skills if needed.

Thank you

@JurajNyiri
Copy link
Owner

Hey,

that is really weird, that would mean that camera responded with success.

I am using the same FW.

You can try with getting pytapo from pip (the lib I built for component) and calling the method directly there and see if it works and maybe put some prints for debug etc.

I will be available in about 2-3 hours for a call if you are available, that will be faster to debug.
You can add me on Google Hangouts for example and we can debug together faster, mail is [email protected]

@msaphoto
Copy link

msaphoto commented Oct 4, 2020

on my devices, neither on nor off work. i have no errors in the log either. neither on the 100 nor the 200.
the other parameter, preset, led, pan works.

@JurajNyiri
Copy link
Owner

These might help to track the issue down.

from pytapo import Tapo

user = "" # user you set in Advanced Settings -> Camera Account
password = "" # password you set in Advanced Settings -> Camera Account
host = "" # ip of the camera, example: 192.168.1.52

tapo = Tapo(host, user, password)

print(tapo.setPrivacyMode(True))
print(tapo.setPrivacyMode(False))

If it only returns True, that means the camera is responding with zero error code, which means success.

@rikman122
Copy link
Author

Ok finally find out what was going on. @msaphoto Maybe this is happening to you too.

I was testing everything by watching at the streaming on the Tapo app for Android. What happens is that if you set the privacy mode on, you will see in the Tapo App that it actually works BUT if then you turn off privacy mode, the Tapo app will stay at black screen till you relunch the app. So actually it was working but my bad was to use the Tapo app to see the stream.

So sorry for the incovenience and thank you for the support

@JurajNyiri
Copy link
Owner

Closing this issue as it was resolved.

@JurajNyiri JurajNyiri added the Invalid Bug/Enhancement not related to integration or already available. label Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Invalid Bug/Enhancement not related to integration or already available.
Projects
None yet
Development

No branches or pull requests

3 participants