Comments (6)
Good suggestion, thanks! I'll add a config path argument some time this weekend!
from pylips.
Hey @b2un0,
Terribly sorry for the delay: I had to deal with some personal stuff and had zero time to work on Pylips. I will fix this issue by the end of this week.
Sorry again!
from pylips.
Hey, @b2un0!
Better late than never: the new version should support custom config paths, use it like this:
python pylips.py --config '/home/eslavnov/repos/Pylips/some_settings.ini'
I've run some tests and it seems to be working fine, but it could be that I've missed something - please let me know if it works for you. Thanks!
from pylips.
as an alternative, i would like an option to define mandatory options from ENV Vars:
parser = argparse.ArgumentParser(description="Control Philips TV API (versions 5 and 6)")
parser.add_argument("--host", dest="host", help="TV's ip address", default=os.environ.get('PYLIPS_HOST', None))
parser.add_argument("--user", dest="user", help="Username", default=os.environ.get('PYLIPS_USERNAME', None))
parser.add_argument("--pass", dest="password", help="Password", default=os.environ.get('PYLIPS_PASSWORD', None))
parser.add_argument("--command", help="Command to run", default="")
parser.add_argument("--path", dest="path", help="API's endpoint path")
parser.add_argument("--body", dest="body", help="Body for post requests")
parser.add_argument("--verbose", dest="verbose", help="Display feedback", default=os.environ.get('PYLIPS_VERBOSE', "1"))
parser.add_argument("--apiv", dest="apiv", help="Api version", default=os.environ.get('PYLIPS_APIV', ""))
but in this case, i have no idea how to define the mqtt broker wihtout mounting again the settings.ini from outside..
from pylips.
thank you, yes it works:
version: '3.5'
volumes:
data:
services:
55PUS6551:
image: b2un0/pylips:latest
restart: unless-stopped
network_mode: bridge
logging:
driver: "journald"
volumes:
- data:/config
command: "python /opt/pylips/pylips.py --config /config/55PUS6551.ini"
entrypoint: ""
70PUS7304:
image: b2un0/pylips:latest
restart: unless-stopped
network_mode: bridge
logging:
driver: "journald"
volumes:
- data:/config
command: "python /opt/pylips/pylips.py --config /config/70PUS7304.ini"
entrypoint: ""
from pylips.
Glad to hear that, thanks!
from pylips.
Related Issues (20)
- [FEAT] Docs on pairing protocol HOT 22
- [FEAT] control volume via HDMI / CEC HOT 3
- [FEAT] Some new found endpoints to document HOT 5
- 65pus6703/12 cannot pair[BUG] HOT 3
- [BUG] IP blocked by TV HOT 1
- 2020 Android TV Ambilight "lounge lights" doesn't respond[BUG] HOT 2
- 'PowerON' failure HOT 2
- [BUG] set_channel command not working
- [FEAT] Switch Picture style HOT 1
- [BUG] Pairing process fail on android TV 8 (55OLED803)
- [FEAT] Using pylips as a python module? (+ Ambilight colour control) HOT 1
- Ambilight + Hue configuration endpoint HOT 1
- [FEAT] Open Browser at URL
- Ambiligt missing modes HOT 1
- [BUG] 2020/2021 support hack?
- [BUG] Port 1926 not opened 43PUS7956
- [help request] Google assistant CURL command
- sending letters as for keyboard HOT 1
- 55PUS8007[BUG] HOT 6
- [BUG] "TypeError: option values must be strings" when writing apiversion to config HOT 2
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 pylips.