amazon-dash icon indicating copy to clipboard operation
amazon-dash copied to clipboard

Upgraded dist, service running but will not act on press unless in debug

Open 88gts opened this issue 4 years ago • 4 comments

What is the purpose of your issue?

  • [X] Bug report (encountered problems with amazon-dash)

Guideline for bug reports

You can delete this section if your report is not a bug

  • amazon-dash version: v 1.4.0
  • Python version: 3.7.3
  • Pip & Setuptools version: 18.1
  • Operating System: Raspbian Buster
  • [X] The pip install or setup install command has been completed without errors
  • [X] The python -m amazon_dash.install command has been completed without errors
  • [X] The amazon-dash discovery command works without errors
  • [X] I have created/edited the configuration file
  • [X] Amazon-dash service or amazon-dash --debug run works

Description

After a dist upgrade, I can get my config to work only as debug.

[pi@pigts3:/var/www/scripts/pump $ sudo amazon-dash --debug run --config /etc/amazon-dash.yml 
Welcome to Amazon-dash v1.4.0 using Python 3.7.3
December 31 is the last day to block requests from your Amazon-dash buttons to Amazon servers. In 2020 your buttons can be bricked in an update from Amazon servers.
Listening for events. Amazon-dash will execute the events associated with the registered buttons.
2021-02-16 09:41:47,914 - amazon-dash - DEBUG   - Desk device executed (mac fc:a6:67:28:b9:c7)
2021-02-16 09:42:11,465 - amazon-dash - DEBUG   - Desk device executed (mac fc:a6:67:28:b9:c7)]

Service is currently running, but does not recognize/act on the button presses unless I have debug running in parallel.

pi@pigts3:/var/www/scripts/pump $ ps aux | grep amazon-dash
root       486  0.2  1.5  38700 29884 ?        Ss   09:33   0:01 /usr/bin/python3 /usr/local/bin/amazon-dash run --config /etc/amazon-dash.yml

pi@pigts3:/var/www/scripts/pump $ 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 Tue 2021-02-16 09:33:14 PST; 13min ago
 Main PID: 486 (amazon-dash)
    Tasks: 1 (limit: 3860)
   CGroup: /system.slice/amazon-dash.service
           └─486 /usr/bin/python3 /usr/local/bin/amazon-dash run --config /etc/amazon-dash.yml

Feb 16 09:33:14 pigts3 systemd[1]: Started Amazon Dash service.
Feb 16 09:33:16 pigts3 env[486]: Welcome to Amazon-dash v1.4.0 using Python 3.7.3
Feb 16 09:33:16 pigts3 env[486]: December 31 is the last day to block requests from your Amazon-dash buttons to Amazon servers. In 2020 your buttons can be bricked in an update from Amazon 
Feb 16 09:33:16 pigts3 env[486]: Listening for events. Amazon-dash will execute the events associated with the registered buttons.

88gts avatar Feb 16 '21 17:02 88gts

Tried to pip3 uninstall and reinstall, but it still did not work (is there a force option?)

88gts avatar Feb 16 '21 18:02 88gts

Do actions work with debugger open?

Nekmo avatar Feb 18 '21 19:02 Nekmo

I am getting the same. Cannot run this unless it's debug. I am using docker. I tried to install the "develop" tag but it's not even working anymore. With the "latest" tag at least it worked with debug... Such a pity that this has been abandoned, I found a few buttons that would be nice to use, instead of putting in the trash and contributing to pollution.

user897943 avatar Sep 11 '21 16:09 user897943

Do actions work with debugger open?

It works for me only when running with --debug option:

docker exec -it amazon-dash /bin/sh root#: amazon-dash --debug run

press the button while listening on Home Assistant, and I can see the event.

If I restart the container and press the button without doing the above, then it does not work, no events appear, so it's only communicating with HA after pressing it.

I did pip install -U amazon_dash and updated that. I also ran inside the container: apk update apk upgrade sync reboot and restarted the container, just in case it was outdated stuff... made no difference.

user897943 avatar Sep 11 '21 17:09 user897943