hardillb / TRADFRI2MQTT

MQTT Bridge for IKEA TRÅDFRI Light Gateway
https://www.hardill.me.uk/wordpress/2017/04/06/fist-pass-tradfri-mqtt-bridge/
Apache License 2.0
81 stars 12 forks source link

retained argument? #13

Closed mo8Zomo0 closed 7 years ago

mo8Zomo0 commented 7 years ago

The readme states the option "-retained", without an argument.

Running the jar with --help shows there should be one:

java -jar /root/src/TRADFRI2MQTT/target/TRADFRI2MQTT-0.0.7-SNAPSHOT.jar

usage: TRADFRI2MQTT -broker MQTT URL -ip The IP address of the gateway -psk The Secret on the base of the gateway -retained Topics are retained

and just running it with out one throws an exception:

org.apache.commons.cli.MissingArgumentException: Missing argument for option: retained at org.apache.commons.cli.DefaultParser.checkRequiredArgs(DefaultParser.java:211) at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:125) at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:76) at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:60) at uk.me.hardill.TRADFRI2MQTT.Main.main(Main.java:512) Exception in thread "main" java.lang.NullPointerException at uk.me.hardill.TRADFRI2MQTT.Main.main(Main.java:518)

If there should be an argument

if it shall not be one:

thanks!

hardillb commented 7 years ago

Feel free to raise a pull request

On 10 Aug 2017 22:56, "mo8Zomo0" notifications@github.com wrote:

The readme states the option "-retained", without an argument.

Running the jar with --help shows there should be one: java -jar /root/src/TRADFRI2MQTT/target/TRADFRI2MQTT-0.0.7-SNAPSHOT.jar

usage: TRADFRI2MQTT -broker MQTT URL -ip The IP address of the gateway -psk The Secret on the base of the gateway -retained Topics are retained

and just running it with out one throws an exception:

org.apache.commons.cli.MissingArgumentException: Missing argument for option: retained at org.apache.commons.cli.DefaultParser.checkRequiredArgs( DefaultParser.java:211) at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:125) at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:76) at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:60) at uk.me.hardill.TRADFRI2MQTT.Main.main(Main.java:512) Exception in thread "main" java.lang.NullPointerException at uk.me.hardill.TRADFRI2MQTT.Main.main(Main.java:518)

If there should be an argument

  • what shall it be?
  • more graceful way to die if not present
  • update doc

if it shall not be one:

  • adjust the code

thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hardillb/TRADFRI2MQTT/issues/13, or mute the thread https://github.com/notifications/unsubscribe-auth/ABt6jVfPfjrQjBHwhQgcAaUIfEPmcMLSks5sW3yngaJpZM4O0B31 .