Code Monkey home page Code Monkey logo

Comments (6)

eslavnov avatar eslavnov commented on May 28, 2024 1

Good suggestion, thanks! I'll add a config path argument some time this weekend!

from pylips.

eslavnov avatar eslavnov commented on May 28, 2024 1

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.

eslavnov avatar eslavnov commented on May 28, 2024 1

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.

b2un0 avatar b2un0 commented on May 28, 2024

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.

b2un0 avatar b2un0 commented on May 28, 2024

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: ""

2019-11-29 at 10 16

from pylips.

eslavnov avatar eslavnov commented on May 28, 2024

Glad to hear that, thanks!

from pylips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.