Comments (5)
This is normal behavior if you install (any package) into your global site-packages that has a conflicting dependency version. Documenting this behavior is outside the scope of Fauxmo, since it's normal behavior for pip
. I recommend you read up on virtual environments and the venv
tool that's been included with Python since around 3.4.
In short, let's say that hypothetically something in a recent HomeAssistant update broke compatibility with Fauxmo (it hasn't, to my knowledge, however this isn't at all unlikely due to their impressive development pace and release cycles). So in that case, if a user had the latest (and incompatible) HomeAssistant installed, and then the user installed Fauxmo, what should pip
do? Which package gets broken? pip
's default behavior basically assumed that the package you're currently trying to install has precedence, so it will install (and uninstall) what it needs for that package to work, irrespective of other packages installed into the same environment.
The workaround for this issue is using a "virtual environment" -- which basically blinds Python to anything that hasn't been installed specific to that environment. So, for example, what I've done is to install HomeAssistant (latest version) into its own virtual environment, and Fauxmo into a separate virtual environment (which installs its required and tested version of HomeAssistant there, completely separate from the other HomeAssistant installation). When installing into venvs, you'll then get an executable path that runs inside that environment, protected from other venvs -- for example, you could have /abs/path/to/fauxmo/venv/bin/python
and /abs/path/to/fauxmo/venv/bin/fauxmo
, and both that python interpreter and that fauxmo console script would only have access to other packages installed into the virtual env at /abs/path/to/fauxmo/venv
.
Hopefully that makes some sense. Again, I encourage you read up on venvs and why they are considered a best practice. For me, every project that I work on gets its own venv, and most projects that absolutely have to run reliably get their own as well, which prevents other packages from messing with them.
Closing as this is not a Fauxmo issue -- feel free to continue conversation here though.
from fauxmo.
Thanks for that excellent answer. I will look into this.
from fauxmo.
Unfortunately the "search this repository" doesn't work for code in Fauxmo because it's a forked repo (I may delete and re-upload as "unforked" someday for this reason), or else I would refer you there.
If you look into the fauxmo.handlers
module, you'll find that Fauxmo leverages the Home Assistant Python API (links in the README) to bridge the Echo to Home Assistant devices.
I would like to create some kind of user-editable plugin architecture for Fauxmo at some point and allow users to add their own plugins. As part of this, I would remove the HomeAssistant dependency and let people download the HomeAssistant plugin if they wanted that functionality. However, I'm still just in the brainstorming phase of this change.
from fauxmo.
FYI, I was able to easily upgrade it again after, once I learned the arguments for pip3 to do so. Afterward, my configuration worked again.
from fauxmo.
What does fauxmo rely on home assist for?
from fauxmo.
Related Issues (20)
- device state issue HOT 8
- Alexa unable to find any device HOT 8
- Support Wemo Dimmer Switch HOT 6
- Echo Dot, NOW not discovering fauxmo HOT 31
- Emulate TV HOT 1
- The service won't start properly HOT 24
- Windows 8.1 HOT 15
- Fauxmo as a binary ? HOT 16
- Running fauxmo with hundreds of devices HOT 4
- Fauxmo Service does not start even after several new setups HOT 2
- HA plugin, device not responding HOT 6
- Problem getting state after turn on/iff HOT 5
- Just asking for a little help.. HOT 27
- The fauxmo on|off|unknown statuses should probably be enums, not strings
- Make fake state options more discoverable
- Ability to specify percentage? HOT 9
- Unexpected keyword argument "initial_state" HOT 4
- AttributeError: 'CommandLinePlugin' object has no attribute '_latest_action' HOT 9
- Alexa keeps saying "device not responding" HOT 11
- POST request using ESP32 to Fauxmo works when running Fauxmo with -vvv but not -vv HOT 26
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fauxmo.