Obtain FLM configuration via MQTT [solved]

From the FLM v2.4.4 source code of /usr/sbin/wwd.lua I see that there should be a MQTT topic MOSQ_TOPIC_SENSOR_CONFIG, set to "/device/flukso-id/config/sensor", which should provide the configuration parameters of all FLM attached sensors. Also this message should be retained for any newly subscribed MQTT client.
Nevertheless, a mosquitto_sub -h host -v -t /device/#, nor a generic /# receives such a topic's payload (which in principle should work as, for example "old" gauge and counter data is resent".
What is missing?

Issue solved - the flukso-daemon requires a tiny addition to gain the capability to also publish the FLM's configuration data as an own MQTT topic; see below.

AttachmentSize
FLMlocalGauge.png172.59 KB
gebhardm's picture

After a reboot following topics are published:

  1. /device/<flukso-id>/tmpo/sync (null)
  2. /d/device/<flusko-id>/tmpo/sync [<{sid:, rid:, lvl:, bid:} per sensor>]
  3. /sensor/<sensor-id>/gauge [<gauge data>]
  4. /sensor/<sensor-id>/counter [<counter data>]

No /device/%s/config/sensor, and also the /d/device I would question...

gebhardm's picture

After a "sensor save" in the web interface also just above information is passed on...

gebhardm's picture

As I just see, there is some other tmpo topic

  1. /sensor/<sensor-id>/tmpo/0/8/1418890496/gz ?

which also looks rather weird.

gebhardm's picture

Software archaeology unearthed: The config-topic is provided just by the new ww-daemon that seems to be started only for a FLM02W...

  1.         if [ $MODEL == FLM02W ]
  2.         then
  3.                 start_ww
  4.         else
  5.                 start_fl
  6.         fi

The result
  1.   796 flukso    5320 S    /usr/sbin/fluksod -u flukso

publishes only on topics /sensor/#/gauge and /sensor/#/counter as the flukso-daemon does not contain any configuration publishing - so I stop my investigations for now and cannot hold off some irritation.
<eot>

icarus75's picture

Sensor config publishing is now centralized in tmpod. See commit ddf49f.

gebhardm's picture

Perfect - thanks; now the TMPO-daemon just needs to publish the query topics and I am happy...