Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken rf transmit behaviour in this version #212

Merged

Conversation

alandpearson
Copy link
Contributor

Hi

I did some testing with this and found RF transmit no longer works,
Here is the fix.

Thanks

  1. The emonhub configuration for mqtt includes both sub and pub channels - change the if statement at line 256 to allow this
  2. Add tx/# to the mqtt subscribe at line 260
  3. rf sendving via nodeval has 5 topic parts not 4, fix line 304 (see below)
  4. Reinstate necessary if statements:
    if topic_parts[0] == self._settings["nodevar_format_basetopic"][:-1]:
    and
    if topic_parts[0] == self._settings["node_format_basetopic"][:-1]:
    to avoid incorrect "Payload format error" messages

To transmit via MQTT, example for emonglcd:
topic: emonhub/tx/0/values/msg
example payload:10,14,49,25,27,04,24,150,835,1600,502

1) The emonhub configuration for mqtt has both sub and pub - change the if statement at line 256 to allow this
2) Add tx/# to the mqtt subscribe at line 260
3) rf sendving via nodeval has 5 topic parts not 4, fix line 304 (see
   below)
4) Reinstate if statements:
 if topic_parts[0] == self._settings["nodevar_format_basetopic"][:-1]:
and
 if topic_parts[0] == self._settings["node_format_basetopic"][:-1]:
to avoid incorrect "Payload format error" messages

To transmit via MQTT, example for emonglcd:
topic:emonhub/tx/0/values/msg
payload:10,14,49,25,27,04,24,150,835,1600,502
@TrystanLea TrystanLea merged commit 6d1eac4 into openenergymonitor:mqtt_subscribe May 20, 2024
@TrystanLea
Copy link
Member

Thanks @alandpearson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants