rtlamr2mqtt icon indicating copy to clipboard operation
rtlamr2mqtt copied to clipboard

Supervisor Warning - Unknown option 'port'

Open stu1811 opened this issue 2 years ago • 5 comments

Home Assistant 2022.9.6 Supervisor 2022.09.1 Frontend 20220907.2 - latest

WARNING (MainThread) [supervisor.addons.options] Unknown option 'port' for rtlamr2mqtt (6713e36e_rtlamr2mqtt)

general:
  sleep_for: 60
  verbosity: debug
  listen_only: false
  tickle_rtl_tcp: false
  device_id: single
mqtt:
  ha_autodiscovery: true
  ha_autodiscovery_topic: homeassistant
  base_topic: rtlamr
  tls_enabled: false
  host: core-mosquitto
  port: 1883
  user: "!secrets mqtt_user"
  password: "!secrets mqtt_pass"
custom_parameters:
  rtltcp: "-s 2048000"
  rtlamr: "-unique=true"
meters:
  - id: XXXXX
    protocol: r900
    name: water_meter
    format: "#######.#"
    unit_of_measurement: ft³
    icon: mdi:water-pump
  - id: XXXXXX
    protocol: scm
    name: gas_meter
    format: "####.##"
    unit_of_measurement: ft³
    icon: mdi:gas-cylinder

stu1811 avatar Sep 22 '22 17:09 stu1811

Are you running on the default port? If so try removing the port line. I don't use it myself and am on default.. I did try adding the line to my config with the default port set and got the same error, fwiw.

sargonas avatar Oct 07 '22 17:10 sargonas

Actually I think this might be because "port" is not declared in the config.yaml that is used as a validator?

try this fork of mine: https://github.com/sargonas/rtlamr2mqtt (or change the config.yaml locally) it has one simply change of adding port: str? under host: str? in the rtlamr2mqtt-addon/config.yaml file

I would test it locally but I am on a plane atm, but will try later tonight myself if I haven't heard back by then.

sargonas avatar Oct 07 '22 18:10 sargonas

Similar issue here. I'm trying to use port 11298, but the log says:

[2022-10-07 16:29:01] > port => 1883

and

[2022-10-07 16:29:06] Unknown exception connecting to MQTT broker: timed out

blandry3 avatar Oct 07 '22 19:10 blandry3

Actually I think this might be because "port" is not declared in the config.yaml that is used as a validator?

try this fork of mine: https://github.com/sargonas/rtlamr2mqtt (or change the config.yaml locally) it has one simply change of adding port: str? under host: str? in the rtlamr2mqtt-addon/config.yaml file

I would test it locally but I am on a plane atm, but will try later tonight myself if I haven't heard back by then.

Here is my mqtt config:

mqtt:
  ha_autodiscovery: true
  ha_autodiscovery_topic: homeassistant
  base_topic: rtlamr
  tls_enabled: false
  host: core-mosquitto
  port: 1883
  user: "!secrets mqtt_user"
  password: "!secrets mqtt_pass"

I tried modified addons/git/6713e36e/rtlamr2mqtt-addon/config.yaml per your suggestion. Restarting the addon and rebuilding and then restarting didn't stop the warnings in Supervisor. Do I need to do anything else to force the container to update?

The update...

  mqtt:
    host: str?
    port: str?
    user: str?
    password: str?
    ha_autodiscovery: bool?
    ha_autodiscovery_topic: str?
    base_topic: str
    tls_enabled: bool?
    tls_ca: str?
    tls_cert: str?
    tls_keyfile: str?
    tls_insecure: bool?

stu1811 avatar Oct 10 '22 12:10 stu1811

I was away for a few weeks and couldn't follow this issue. I will take a look and it as soon as possible.

Thank you for reporting.

allangood avatar Oct 19 '22 13:10 allangood

It should be fixed now.

allangood avatar Nov 04 '22 00:11 allangood

New version gets a different error:

[2022-11-03 20:56:28] Using "/data/options.json" config file
[2022-11-03 20:56:28] MQTT Host defined in config file. Ignoring Supervisor Configuration...
[2022-11-03 20:56:28] RTLAMR2MQTT Starting...
[2022-11-03 20:56:28] RTL SDR Device 0bda:2832 found on USB port 005:002 - Index: 0
Traceback (most recent call last):
  File "/usr/bin/rtlamr2mqtt.py", line 440, in <module>
    elif re.match(r"(^[0-9]{3}:([0-9]{3}$)))", usb_device_id) is not None:
  File "/usr/local/lib/python3.10/re.py", line 190, in match
    return _compile(pattern, flags).match(string)
  File "/usr/local/lib/python3.10/re.py", line 303, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/usr/local/lib/python3.10/sre_compile.py", line 788, in compile
    p = sre_parse.parse(p, flags)
  File "/usr/local/lib/python3.10/sre_parse.py", line 969, in parse
    raise source.error("unbalanced parenthesis")
re.error: unbalanced parenthesis at position 23

stu1811 avatar Nov 04 '22 00:11 stu1811

#174 fix this issue

allangood avatar Nov 05 '22 00:11 allangood