This is explained in other threads re MQTT and how it works.
The emonPi has the Mosquitto MQTT Broker (rather than server) installed by default and some of the data will pass through that.
The MQTT details on the ESP are for sending (strictly speaking publishing) data to the Broker. emonCMS then subscribes to those topics (i.e. wants and data published to that topic) and uses that an an input. You can subscribe to multiple topics at once in a tree structure and by default, emonCMS subscribes to any data published on the emon/
base topic.
There are 2 ways to get data;
- you subscribe to the relevant
emon
topic in Node-RED - effectively look at the input to emonCMS - as part of the input processing publish data to a new topic (NOT
emon
) for Node-RED (NR) to pick up. This is useful where the data has arrived via the HTTP API.
You can simply point NR to the broker (by IP) on the emonPi and subscribe to topics and publish data back (for other systems).
The suggestion is to not run Node-RED on your emonPi (recent thread about a dead emonPi).
Suggest you have a good dig around with Google and understand how MQTT works.