n8henrie / fauxmo

Emulated Belkin WeMo devices that work with the Amazon Echo
https://n8henrie.com/2016/02/fauxmo-home-automation-with-the-amazon-echo-raspberry-pi-and-homeassistant/
Other
371 stars 78 forks source link

fauxmo.service issues #101

Closed sikalabsga closed 4 years ago

sikalabsga commented 4 years ago

My Issue

when I run the following command: sudo journalctl -b -u fauxmo.service Output log below:

-- Logs begin at Sun 2020-05-24 10:54:58 CDT, end at Sun 2020-05-24 12:44:03 CDT. --
May 24 10:55:03 raspberrypi systemd[1]: Started Fauxmo.
May 24 10:55:05 raspberrypi fauxmo[418]: Traceback (most recent call last):
May 24 10:55:05 raspberrypi fauxmo[418]:   File "/home/pi/MyHomeAutomationServer/venv/bin/fauxmo", line 10, in <module>
May 24 10:55:05 raspberrypi fauxmo[418]:     sys.exit(cli())
May 24 10:55:05 raspberrypi fauxmo[418]:   File "/home/pi/MyHomeAutomationServer/venv/lib/python3.7/site-packages/fauxmo/cli.py", line 37, in cli
May 24 10:55:05 raspberrypi fauxmo[418]:     main(config_path_str=args.config, verbosity=verbosity)
May 24 10:55:05 raspberrypi fauxmo[418]:   File "/home/pi/MyHomeAutomationServer/venv/lib/python3.7/site-packages/fauxmo/fauxmo.py", line 65, in main
May 24 10:55:05 raspberrypi fauxmo[418]:     fauxmo_ip = get_local_ip(fauxmo_config.get("ip_address"))
May 24 10:55:05 raspberrypi fauxmo[418]:   File "/home/pi/MyHomeAutomationServer/venv/lib/python3.7/site-packages/fauxmo/utils.py", line 37, in get_local_ip
May 24 10:55:05 raspberrypi fauxmo[418]:     sock.connect(("8.8.8.8", 80))
May 24 10:55:05 raspberrypi fauxmo[418]: OSError: [Errno 101] Network is unreachable
May 24 10:55:06 raspberrypi systemd[1]: fauxmo.service: Main process exited, code=exited, status=1/FAILURE
May 24 10:55:06 raspberrypi systemd[1]: fauxmo.service: Failed with result 'exit-code'.
May 24 10:55:16 raspberrypi systemd[1]: fauxmo.service: Service RestartSec=10s expired, scheduling restart.
May 24 10:55:16 raspberrypi systemd[1]: fauxmo.service: Scheduled restart job, restart counter is at 1.
May 24 10:55:16 raspberrypi systemd[1]: Stopped Fauxmo.
May 24 10:55:16 raspberrypi systemd[1]: Started Fauxmo.
May 24 10:55:16 raspberrypi fauxmo[1176]: Traceback (most recent call last):
May 24 10:55:16 raspberrypi fauxmo[1176]:   File "/home/pi/MyHomeAutomationServer/venv/bin/fauxmo", line 10, in <module>
May 24 10:55:16 raspberrypi fauxmo[1176]:     sys.exit(cli())
May 24 10:55:16 raspberrypi fauxmo[1176]:   File "/home/pi/MyHomeAutomationServer/venv/lib/python3.7/site-packages/fauxmo/cli.py", line 37, in cli
May 24 10:55:16 raspberrypi fauxmo[1176]:     main(config_path_str=args.config, verbosity=verbosity)
May 24 10:55:16 raspberrypi fauxmo[1176]:   File "/home/pi/MyHomeAutomationServer/venv/lib/python3.7/site-packages/fauxmo/fauxmo.py", line 65, in main
May 24 10:55:16 raspberrypi fauxmo[1176]:     fauxmo_ip = get_local_ip(fauxmo_config.get("ip_address"))
May 24 10:55:16 raspberrypi fauxmo[1176]:   File "/home/pi/MyHomeAutomationServer/venv/lib/python3.7/site-packages/fauxmo/utils.py", line 37, in get_local_ip
May 24 10:55:16 raspberrypi fauxmo[1176]:     sock.connect(("8.8.8.8", 80))
May 24 10:55:16 raspberrypi fauxmo[1176]: OSError: [Errno 101] Network is unreachable
May 24 10:55:16 raspberrypi systemd[1]: fauxmo.service: Main process exited, code=exited, status=1/FAILURE
May 24 10:55:16 raspberrypi systemd[1]: fauxmo.service: Failed with result 'exit-code'.
May 24 10:55:27 raspberrypi systemd[1]: fauxmo.service: Service RestartSec=10s expired, scheduling restart.
May 24 10:55:27 raspberrypi systemd[1]: fauxmo.service: Scheduled restart job, restart counter is at 2.
May 24 10:55:27 raspberrypi systemd[1]: Stopped Fauxmo.
May 24 10:55:27 raspberrypi systemd[1]: Started Fauxmo.
May 24 10:55:27 raspberrypi fauxmo[1402]: Traceback (most recent call last):
May 24 10:55:27 raspberrypi fauxmo[1402]:   File "/home/pi/MyHomeAutomationServer/venv/lib/python3.7/site-packages/fauxmo/fauxmo.py", line 95, in main
May 24 10:55:27 raspberrypi fauxmo[1402]:     module = importlib.import_module(modname)
May 24 10:55:27 raspberrypi fauxmo[1402]:   File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
May 24 10:55:27 raspberrypi fauxmo[1402]:     return _bootstrap._gcd_import(name[level:], package, level)
May 24 10:55:27 raspberrypi fauxmo[1402]:   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
May 24 10:55:27 raspberrypi fauxmo[1402]:   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
May 24 10:55:27 raspberrypi fauxmo[1402]:   File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
May 24 10:55:27 raspberrypi fauxmo[1402]: ModuleNotFoundError: No module named 'fauxmo.plugins.alexavoiceswitcherplugin'

WHYT


Please make sure you've taken these steps before submitting a new issue:

sikalabsga commented 4 years ago

Fixed my issue. The problem itself didn't have anything to do with the fauxmo.service file. To successfully autostart fauxmo.service in systemd and if you're using the RPi.GPIO in your code: In addition to: add an unprivileged user to run Fauxmo: sudo useradd -r -s /bin/false fauxmo, add user fauxmo to the gpio group: sudo adduser fauxmo gpio.

n8henrie commented 4 years ago

Glad you got it solved.

Of note, in spite of checking the box in the issue template, you did not include your config, which could have led to a solution. Please follow all recommendations in the issue template. This is now your third reminder (0, 1); future issues will be closed if you are unable to follow the template.

sikalabsga commented 4 years ago

Noted with thanks.

PS Don’t expect newbie to fully grasp at once your template requirements.

On Tue, May 26, 2020 at 14:16 Nathan Henrie notifications@github.com wrote:

Glad you got it solved.

Of note, in spite of checking the box in the issue template, you did not include your config, which could have led to a solution. Please follow all recommendations in the issue template. This is now your third reminder (0 https://github.com/n8henrie/fauxmo/issues/100#issuecomment-633267931, 1 https://github.com/n8henrie/fauxmo/issues/99#issuecomment-632303253); future issues will be closed if you are unable to follow the template.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/n8henrie/fauxmo/issues/101#issuecomment-634223993, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKVWMGJKUNH5JXTEICSS4PTRTQISNANCNFSM4NI7VGBA .

--

Yours sincerely

Nyman Sikazwe sikalabs LLC 695 Normandy St, Unit 76 Houston, TX 77015 USA (713)494-6914