Closed rotcop4u2 closed 6 years ago
switchmate uses the typical method for python dependencies. They are specified in the requirements.txt
file and can be installed with pip: pip install -r requirements.txt
I'm having some issues trying to run the ./switchmate.py scan command.. it says permission denied even when I run in sudo su
On Fri, Sep 14, 2018, 11:28 AM Brian Peiris notifications@github.com wrote:
switchmate uses the typical method for python dependencies. They are specified in the requirements.txt https://github.com/brianpeiris/switchmate/blob/master/requirements.txt file and can be installed with pip: pip install -r requirements.txt
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/brianpeiris/switchmate/issues/12#issuecomment-421395208, or mute the thread https://github.com/notifications/unsubscribe-auth/AkOsJqrOJwnRMBviUDuOGosYBx5h2wNbks5ua8swgaJpZM4WpSsM .
Can you paste the full error?
master# bash switchmate.py scan switchmate.py: line 36: switchmate.py
A python-based command line utility for controlling Switchmate switches.
Usage:
./switchmate.py scan [options]
./switchmate.py status [options]
./switchmate.py
Commands: scan Scan for switchmate devices and print their mac addresses. status Scan for switchmate devices and print their mac addresses and status. switch (on | off) Switch a device on or off. toggle Switch a device on if currently off, or off if currently on. debug Print a detailed information about a device, for debugging purposes. help Show this help screen.
Options:
-t (' switchmate.py: line 42:
from bluepy.btle import ('
root@HOMEASSISTANT:/home/homeassistant/.homeassistant/python_scripts/switchmate- master# cd ..
root@HOMEASSISTANT:/home/homeassistant/.homeassistant/python_scripts# python swi tchmate.py scan
Traceback (most recent call last):
File "switchmate.py", line 41, in
i pip3 install -r requirements.txt already and it grabbed all the dependencies
Might be easier if we chat in realtime on Gitter: https://gitter.im/brianpeiris-switchmate/Lobby
Turns out @rotcop4u2 was running HomeAssistant's flavor of Linux on a Raspberry Pi 3B+
We got things partially working with these commands:
$ pip3 install -r requirements.txt
$ sudo pip3 install bluepy
$ pushd /usr/local/lib/python3.5/dist-packages/bluepy/
$ sudo make
$ popd
$ sudo python3 ./switchmate.py scan
But there is still an issue with finding particular switches.
But there is still an issue with finding particular switches.
Are you having issues with the code seeing some devices -in my cases the code scans and if I add debug statements listing the macs it sees it sees the switchmate devices but skips past them as they don't match the service id in the code - are you seeing this also?
@rotcop4u2 Let me know if this is still an issue for you with the new fix or if I can close this issue.
I'm going to close this for now. Feel free to reopen if you need to.
Hello,
I'm trying to use your script but am unable to get the dependencies. do you know where to locate them?