-
Notifications
You must be signed in to change notification settings - Fork 15
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
Install questions #4
Comments
Hi! To do this in Linux: first clone the repo: The run: Then the module should be installed. |
Cool,
Thank you, I'll try it.
Chris
ok. And then? I call:
sudo sp_cli.py -e cxxxxxxx@gmx.de -p Pxxxxxxxx --update
Result:
Traceback (most recent call last):
File "/usr/local/bin/sp_cli.py", line 4, in <module>
__import__('pkg_resources').run_script('sure-petcare==0.1', 'sp_cli.py')
File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 750, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 1527, in run_script
exec(code, namespace, namespace)
File "/usr/local/lib/python3.6/dist-packages/sure_petcare-0.1-py3.6.egg/EGG-INFO/scripts/sp_cli.py", line 156, in <module>
main( sys.argv )
File "/usr/local/lib/python3.6/dist-packages/sure_petcare-0.1-py3.6.egg/EGG-INFO/scripts/sp_cli.py", line 76, in main
sp.update()
File "/usr/local/lib/python3.6/dist-packages/sure_petcare-0.1-py3.6.egg/sure_petcare/__init__.py", line 337, in update
self.update_device_ids()
File "/usr/local/lib/python3.6/dist-packages/sure_petcare-0.1-py3.6.egg/sure_petcare/__init__.py", line 419, in update_device_ids
household['default_flap'] = list(flaps.keys())[0]
IndexError: list index out of range
What must i do? Or how do I properly call the application?
Sorry for many questions...
|
The error you're getting suggests that the API can't see any door devices attached to the account credentials you supplied. If you want to try to resolve the problem yourself, use Beyond that, I'm afraid I can't supply much more support than that in the circumstances. I wanted to develop this API into a more end-user friendly package, but SurePet isn't keen on that last I knew. |
Hey, is there any support for windows? I'm obviously getting the error Cheers and good work! |
If you replaced the function to return your mac, then you should be fine at
that stage. Almost any value should work there from my experience. I would
have thought that the python code would have abstracted the difference
between windows and Linux. I Will have to look into this.
As to why you aren't getting any flaps i am not sure. I take it you aren't
getting any error messages?
…On Mon, 17 Dec 2018 at 20:40, rsewell97 ***@***.***> wrote:
Hey, is there any support for windows?
I'm obviously getting the error [WinError 3] The system cannot find the
path specified: '/sys/class/net/' . Tried replacing the returned MAC
manually, but when I do that it can't find any flaps on my account? Any
other pointers?
Cheers and good work!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACF8T2pCnnmMKsCSrXSUWsRtZtmBAHVEks5u5_M1gaJpZM4XbFTU>
.
|
i have the same problem.... i am sure that the email address & PW are right.... can i adjust it manual somewhere? i tried: all times the output is: is the location of the program maybe the problem? ` ` |
@chriszuckerberg , @dzjr which model of catflap do you have? If it's the new "Cat Door Connect" (https://www.surepetcare.com/en-nz/pet-doors/microchip-cat-flap-connect), as opposed to the original, larger "Pet Door Connect" (https://www.surepetcare.com/en-nz/pet-doors/microchip-pet-door-connect), the current code (at ed59e44) doesn't have its device id. My pull request #7 should fix that. |
Ok, thank you, great application! |
Ok. a day after, the next Problem: alec@Server:~$ sudo sp_cli.py --update Traceback (most recent call last): Solution: |
Hi,
I successfully installed the setup under windows. |
I run the code directly on Ubuntu 18.04.2 LTS and ask the status via my daschboard via socket connection. It would be desirable that the query is a little faster to view the status faster, but the delay of about 30 seconds is probably due to the server at Sure-Petcare. |
I did not install Ubuntu. I have only recently started working with python. Do you have an example? |
Rasperry also works under Linux, just like Ubuntu. For example, I check via a regular thread only if the cat is in the house or out of the house and send with c.write_message ("cat_out") the state to my dashboard. The battery status tells me the normal app, so for me uninteresting.
Excuse me, I do not know why the code can not be structured here :-( |
Thank you for your help :-) I have the command: ./sp_cli.py ls_flaps The following message appears:Sure Petcare Connect CLI --- * WARNING * --- etc....Although I created a user with a readonly role in the household and executed the following commands Did I forget something else? |
Please try first with complete rights or with sudo. The rights are here: PS: the e-mail address and the password must be the same as the access data of Surepet. |
@staebchen0: |
Thanks for the hints :-) I have packed your sample program into a file and that seems to work. Why the program no message |
Ping habe ich ausgeführt und das klappt :-) |
da ich kein Linux nutze kann ich den Befehl ja nicht ausführen. Die Dateien habe ich unter Windows nicht gefunden. |
Hier das Script:
|
;-) hast du denn noch eine Idee, woran es liegen könnte? |
Nun ja, das script ist so nicht allein lauffähig, da es eine Funktion |
Nochmal: sp_cli.py --update holt scheinbar die erforderlichen Daten vom SurePet-Server und schreibt sie in die Datei ~/.surepet.cache |
Okay, Danke für deine Mühe :-) Gruß Anja |
Mit diesem GIT denke ich nicht, bin mir aber nicht sicher was über Home-Assistant läuft. |
Dank Dir! |
Mine fails when calling: python3 sp_cli.py -e ****@****.*** -p **** --update Traceback (most recent call last):
File "sp_cli.py", line 156, in <module>
main( sys.argv )
File "sp_cli.py", line 76, in main
sp.update()
File "/config/sp/sure_petcare/sure_petcare/__init__.py", line 342, in update
self.update_pet_status()
File "/config/sp/sure_petcare/sure_petcare/__init__.py", line 528, in update_pet_status
response = self._get_data(url)
File "/config/sp/sure_petcare/sure_petcare/__init__.py", line 560, in _get_data
'LastData': response.json(),
File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0) |
Please try it as root and without a python3 command because it can run itself. |
Ok will and let you know, when I get back to Australia.. overseas till Sunday |
@chriszuckerberg |
You get the data as follows: Data retrieval with: General instructions:
After update, you can use any of the following switches to query the status of positional arguments: optional arguments: |
Can anyone tell me how to install this on Rasberry image of Home Assistant? |
@jimiwester It's baked in so you just add the integration as you would any other. |
Nice, great I was a bit afraid to just enter the config in case the code would crash my setup because it had to have more installed.
It works like a charm when I added the config.
Thanks!!
24 juni 2020 kl. 18:05 skrev Rue <notifications@github.com<mailto:notifications@github.com>>:
@jimiwester<https://github.com/jimiwester> It's baked in so you just add the integration as you would any other.
Here are the docs for surepetcare<https://www.home-assistant.io/integrations/surepetcare/> integration.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#4 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AQB2VOYGN6H7CN2DCD4NKBDRYIP57ANCNFSM4F3MKTKA>.
|
Please, can you tell me how to install this great code?
The text was updated successfully, but these errors were encountered: