NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.33k stars 14.3k forks source link

ebusd scanconfig parameter error on single quote #329720

Open GrumpyMeow opened 4 months ago

GrumpyMeow commented 4 months ago

Describe the bug

In the service the following command is placed: /nix/store/as46yr5411364fgsqsysmpczn61n0qcn-ebusd-23.3/bin/ebusd '--configpath' 'https://cfg.ebusd.eu/' '--device' '/dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_018437BD-if00-port0' '--foreground' '--log' 'all:notice' '--log' 'bus:notice' '--log' 'main:notice' '--log' 'network:notice' '--log' 'other:notice' '--log' 'update:notice' '--mqtthost' 'mqtt.lan' '--mqttint' '/nix/store/as46yr5411364fgsqsysmpczn61n0qcn-ebusd-23.3/etc/ebusd/mqtt-hassio.cfg' '--mqttjson' '--mqttpass' '' '--mqttport' '1883' '--mqttuser' '' '--port' '8888' '--scanconfig' 'none' '--updatecheck' 'off'

Ebusd expects parameters in the form of "--scanconfig=none" .

Steps To Reproduce

ervices.ebusd = {
    enable = true;
    port = 8888;
    device = "/dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_018437BD-if00-port0";
    scanconfig = "none";
    mqtt = {
      enable = true;
      home-assistant = true;
      host = "mqtt.lan";
      user = "";
      password = "";
    };
  };

results in:

ExecStart=/nix/store/as46yr5411364fgsqsysmpczn61n0qcn-ebusd-23.3/bin/ebusd '--configpath' 'https://cfg.ebusd.eu/' '--device' '/dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_018437BD-if00-port0' '--foreground' '--log' 'all:notice' '--log' 'bus:notice' '--log' 'main:notice' '--log' 'network:notice' '--log' 'other:notice' '--log' 'update:notice' '--mqtthost' 'mqtt.lan' '--mqttint' '/nix/store/as46yr5411364fgsqsysmpczn61n0qcn-ebusd-23.3/etc/ebusd/mqtt-hassio.cfg' '--mqttjson' '--mqttpass' '' '--mqttport' '1883' '--mqttuser' '' '--port' '8888' '--scanconfig' 'none' '--updatecheck' 'off' 

Running this command gives:

2024-07-24 19:11:37.175 [main error] invalid arguments

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.8-2-pve, NixOS, 24.05 (Uakari), 24.05.3164.63d37ccd2d17`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - channels(root): `"nixos-24.05, unstable"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

I expect this lines needs to change: https://github.com/NixOS/nixpkgs/blob/31aab37515b844a4d8debe9db20c082fabc1544d/nixos/modules/services/home-automation/ebusd.nix#L141

Add a :+1: reaction to issues you find important.

pio2398 commented 1 week ago

Seem to be fixed on release 24.11.