unificontrol and PyScript #526
Unanswered
nickolas1969
asked this question in
Q&A
Replies: 2 comments 5 replies
-
To better analyze the cause please provide logs of the executed pyscript script, the script body, the requirements.txt body, and the pyscript directory tree screenshot. If you don't know how to provide any of these - please let me know, and I'll describe them in detail. |
Beta Was this translation helpful? Give feedback.
5 replies
-
I did not know it existed…Nick Ellson - from iPhone (forgive typos)CCIE #20018; VCIX-NV, CNSENetwork Hobbyist"Educating Layer 8, one user at a time."On Sep 19, 2023, at 10:49 PM, ralle12345 ***@***.***> wrote:
@nickolas1969 Why don't you just use the unifi integration? It provides a switch entity for each and every wifi device. Using these you can just use the switch.turn_off service to block a client in your wifi.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My first attempt with PyScript is to use the unificontrol module to make a script that logs into my home unifi controller and blocks/unblocks a MAC address passed to the script.
I added “unificontrol” to requirements.txt as stated in the docs for adding external modules.
in my script I followed the “hello world” service example: adding my import at the top of my unifi.py script, and altering the parameters to keep “action” and look for “block” or “unblock”, and the “id” changed to “mac” and would be the MAC address to act on.
the script works in my external Ubuntu server, so code is good. Does it sound like I did the external library import correctly?
Beta Was this translation helpful? Give feedback.
All reactions