Emonhub config question

Looking at emonhub/configuration.md at emon-pi · openenergymonitor/emonhub · GitHub

I noticed:

[[RFM2Pi]]
  pubchannels = ToEmonCMS,
  subchannels = ToRFM12,

[[MQTT]]
  pubchannels = ToRFM12,
  subchannels = ToEmonCMS,

Is this not a loop? RFM2Pi will get data from rf, post it to ToEmonCMS, MQtt subscribed to ToEmonCMS will pick it up and post it to ToRFM12, then RFM2Pi is subscribed to ToRFM12 and picks it up again?

Hello @h23934 no, messages from channels that RFM2Pi are subscribed to are not then published to ToEmonCMS. Messages received via sub channels are send via radio. Radio messages received are published to ToEmonCMS

Pretty confusing, having read this:
https://docs.openenergymonitor.org/emonhub/overview.html#basic-concept

It makes it sound like interfacers will always listen on subchannels and send to pubchannels, so the above config I pasted looks like a loop to me

specifically, why would MQTT have a: pubchannels = ToRFM12,

I think this may be legacy code.

Anything received by an interfacer from the outside, are not then rebublished. The interfacer will only publish data that it has received internally (often via a serial interface).

The subchannels and pubchannels are not connected to each other within the same interfacer only to other interfacers.

1 Like