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

Doubts in the installation between python2 and python3. #129

Closed
1 of 9 tasks
LeidenSpain opened this issue Feb 28, 2019 · 6 comments
Closed
1 of 9 tasks

Doubts in the installation between python2 and python3. #129

LeidenSpain opened this issue Feb 28, 2019 · 6 comments
Assignees
Milestone

Comments

@LeidenSpain
Copy link

LeidenSpain commented Feb 28, 2019

What is the purpose of your issue?

  • Bug report (encountered problems with amazon-dash)
  • Feature request (request for a new functionality)
  • Question
  • Other

Guideline for bug reports

  • amazon-dash version: You are running Amazon-dash v1.3.2 using Python 3.6.7.
  • Python version: Python 2.7.15rc1
  • Pip & Setuptools version: pip 19.0.3 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)
  • Operating System: lubuntu 18.04
  • The pip install or setup install command has been completed without errors
  • The python -m amazon_dash.install command has been completed without errors
  • The amazon-dash discovery command works without errors
  • I have created/edited the configuration file
  • Amazon-dash service or amazon-dash --debug run works
sudo systemctl status amazon-dash
● amazon-dash.service - Amazon Dash service
   Loaded: loaded (/usr/lib/systemd/system/amazon-dash.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-02-27 22:26:09 CET; 22h ago
 Main PID: 628 (amazon-dash)
    Tasks: 1 (limit: 4429)
   CGroup: /system.slice/amazon-dash.service
           └─628 /usr/bin/python3 /usr/local/bin/amazon-dash run --config /etc/amazon-dash.yml

feb 27 22:26:09 home-server systemd[1]: Started Amazon Dash service.
feb 27 22:26:10 home-server env[628]: Welcome to Amazon-dash v1.3.2 using Python 3.6.7
feb 27 22:26:10 home-server env[628]: Listening for events. Amazon-dash will execute the events associated with the regi
lines 1-11/11 (END)

Description

Everything worked perfectly, although a few days ago I did not use the button.
Since the last use I have also updated home assistant to version 0.88.1. I do not know if it will have anything to do with it.

The service is OK.
If I press the button, I see it in the console.

home-server@home-server:~$ sudo amazon-dash discovery
Welcome to Amazon-dash v1.3.2 using Python 3.6.7
The discovery command lists the devices that are connected in your network. Each device will only be listed once. After executing this command wait approximately 10 seconds before pressing the Amazon Dash button. After pressing the button, the Mac address of the button will immediately appear on the screen. Remember the address to be able to create the configuration file.
52:c7:be:xx:xx:xx
00:fc:8b:xx:xx:xx (Amazon Device)

If you activate the service from the console, the home assistant event is activated

home-server@home-server:~sudo amazon-dash test-device 00:FC:8B:xx:xx:xx --config /etc/amazon-dash.yml
Welcome to Amazon-dash v1.3.2 using Python 3.6.7
/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
2019-02-28 20:47:32,314 - amazon-dash - INFO    - {"message": "Event dash1 fired."}

But if I press the button, nothing happens, nor do I see any record in home assistant.

I am totally and completely lost....

HELP 😄

@Nekmo
Copy link
Owner

Nekmo commented Mar 2, 2019

Hello, if test-device works and the device is recognized using discovery, everything should work. Maybe there is a problem with your network or with your computer. Some network cards may be suspended, or there may be Wifi issues after a while.

@LeidenSpain
Copy link
Author

It is the same team as always, with the same configuration.
The equipment shares files by SMB, therefore the wifi works perfectly.

@LeidenSpain
Copy link
Author

I think I've discovered where it fails.
I have decided to follow all the installation steps again, at one point I get an error (previously it worked):

sudo python -m amazon_dash.install
/usr/bin/python: No module named amazon_dash

I'm reading this post, but at the moment the error wins :(
#36

@LeidenSpain
Copy link
Author

LeidenSpain commented Mar 3, 2019

HI,

More info (I hope not to saturate the thread):
I have reinstalled amazon-dash and it gives me this message:

home-server@home-server:~$ sudo pip install amazon-dash
The directory '/home/home-server/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/home-server/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.**
Collecting amazon-dash
  Downloading https://files.pythonhosted.org/packages/05/7a/564d0ea6e9dad48394ac055098541086b95fbee45123dcc64eee9dee84f2/amazon-dash-1.3.2.tar.gz
Requirement already satisfied: PyYAML>=3.0 in /usr/local/lib/python3.6/dist-packages (from amazon-dash) (3.13)
Requirement already satisfied: click in /usr/local/lib/python3.6/dist-packages (from amazon-dash) (7.0)
Requirement already satisfied: click-default-group in /usr/local/lib/python3.6/dist-packages (from amazon-dash) (1.2)
Requirement already satisfied: jsonschema in /usr/local/lib/python3.6/dist-packages (from amazon-dash) (2.6.0)
Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages (from amazon-dash) (2.21.0)
Requirement already satisfied: scapy>=2.4.0 in /usr/local/lib/python3.6/dist-packages (from amazon-dash) (2.4.2)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.6/dist-packages (from requests->amazon-dash) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests->amazon-dash) (2018.11.29)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests->amazon-dash) (1.24.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python3/dist-packages (from requests->amazon-dash) (3.0.4)
Installing collected packages: amazon-dash
  Running setup.py install for amazon-dash ... done
Successfully installed amazon-dash-1.3.2

I do not remember the other time he gave me this message

@LeidenSpain
Copy link
Author

Finally:
#105 (comment)

sudo python3 -m amazon_dash.install

@Nekmo
Copy link
Owner

Nekmo commented Mar 3, 2019

Yes, this is a problem in some distributions. Thanks for notifying.

@Nekmo Nekmo added this to the v1.3.3 milestone Mar 11, 2019
@Nekmo Nekmo self-assigned this Mar 14, 2019
@Nekmo Nekmo changed the title Problem with HA 0.88.x???? Doubts in the installation between python2 and python3. Mar 14, 2019
@Nekmo Nekmo closed this as completed Mar 14, 2019
@Nekmo Nekmo modified the milestones: v1.3.3, v1.4.0 Mar 22, 2019
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

2 participants