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

login error - is RLC-510a supported? #60

Closed
Helias opened this issue Aug 15, 2022 · 6 comments
Closed

login error - is RLC-510a supported? #60

Helias opened this issue Aug 15, 2022 · 6 comments

Comments

@Helias
Copy link
Contributor

Helias commented Aug 15, 2022

Hi, I tried to login using the following code:

from reolinkapi.camera import Camera

ip: str = '127.0.0.1'
username: str = "admin"
password: str = "12345"
https: bool = True
defer_login: bool = False
profile: str = "main"

c = Camera(ip, username, password, https, defer_login, profile)
c.login()

and I get the following error

[
   {
      "cmd" : "Login",
      "code" : 1,
      "error" : {
         "detail" : "param error",
         "rspCode" : -4
      }
   }
]

I am wondering if RLC-510a camera is supported, I don't see it in this issue #35

@Alexandre333
Copy link

Alexandre333 commented Aug 16, 2022

Hi Helias, I had the same error code at first. I didn't open the corresponding port of my router for the camera, i followed this tutorial https://www.youtube.com/watch?v=KiqPcch8wK8&ab_channel=Reolink

@themoosman
Copy link
Contributor

I wonder if they changed the API in some of the newer cameras.

@Helias
Copy link
Contributor Author

Helias commented Aug 19, 2022

Hi Helias, I had the same error code at first. I didn't open the corresponding port of my router for the camera, i followed this tutorial https://www.youtube.com/watch?v=KiqPcch8wK8&ab_channel=Reolink

Thanks! I will use it and let you know if it works.
if it works I could write how I did and close the issue

@themoosman
Copy link
Contributor

There are so many things wrong with that video. That said, this lib should work without opening ports on the firewall. @Helias looking at your original code sample, that IP address you're using is wrong.

@Helias
Copy link
Contributor Author

Helias commented Aug 19, 2022

You're right, I made it work with the code that I posted, I probably forgot something about https=True in the function parameters.

Thanks a lot, I solved it, now I am getting this issue.

[{'cmd': 'Login', 'code': 0, 'value': {'Token': {'leaseTime': 3600, 'name': 'fd6648961fc1c0b'}}}]
Login success
[tcp @ 0x1a9dcc0] Connection to tcp://192.168.0.176:554?timeout=0 failed: Connection refused
[tcp @ 0x18d6480] Connection to tcp://192.168.0.176:554?timeout=0 failed: Connection refused
opening stream
stream closed

@Helias
Copy link
Contributor Author

Helias commented Aug 19, 2022

I solved it NOT opening the port BUT enabling the TCP port inside the camera panel.
image

@Helias Helias closed this as completed Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants