# 2 OpenEVSEs MQTT

**URL:** <https://community.openenergymonitor.org/t/2-openevses-mqtt/12499>\
**Category:** OpenEVSE\
**Created:** [15 November 2019 22:47 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499 "2019-11-15T22:47:17Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_S](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/ryan_s/32/10619_2.png) [@Ryan\_S](https://community.openenergymonitor.org/u/Ryan_S)\
**Post date:** [15 November 2019 22:47 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/1 "2019-11-15T22:47:18Z")

</div>

So I have 2 OpenEVSE chargers and I would like to integrate them both over MQTT to the EmonCMS. I can get 1 to connect and show data, but when I bring the other one in it shows connected, but no data shows and I see no change on the inputs of EmonCMS

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [16 November 2019 01:35 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/2 "2019-11-16T01:35:53Z")

</div>

You should set the base topic to be different on the 2nd unit e.g `emon/openevse2`

 ![15](https://community.openenergymonitor.org/uploads/default/original/2X/7/71bfe5e88b249fec882537662bbc54b35402625f.png)

---

<div class="post-metadata">

**Author:** ![Ryan\_S](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/ryan_s/32/10619_2.png) [@Ryan\_S](https://community.openenergymonitor.org/u/Ryan_S)\
**Post date:** [16 November 2019 02:29 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/3 "2019-11-16T02:29:20Z")

</div>

I’m done that, but it never seems to show up. Wonder if I’m not waiting long enough.

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [16 November 2019 12:15 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/4 "2019-11-16T12:15:01Z")

</div>

> [@glyn.hudson](#):
>
> You should set the base topic to be different on the 2nd unit e.g `emon/openevse2`

@glyn.hudson, is the MQTT Client ID hardcoded? If so the MQTT broker will complain 2 devices using same ID.

---

<div class="post-metadata">

**Author:** ![Ryan\_S](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/ryan_s/32/10619_2.png) [@Ryan\_S](https://community.openenergymonitor.org/u/Ryan_S)\
**Post date:** [16 November 2019 12:17 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/5 "2019-11-16T12:17:40Z")

</div>

> [@borpin](#):
>
> @glyn.hudson, is the MQTT Client ID hardcoded? If so the MQTT broker will complain 2 devices using same ID.

That is something I’m wondering myself.

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [16 November 2019 12:21 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/6 "2019-11-16T12:21:54Z")

</div>

If you check the MQTT log, you will see errors (if there is an issue).

```auto
cat /var/log/mosquitto/mosquitto.log

```

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [16 November 2019 12:23 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/7 "2019-11-16T12:23:55Z")

</div>

> [@Ryan\_S](#):
>
> That is something I’m wondering myself.

Does the first one you start always work?

---

<div class="post-metadata">

**Author:** ![Ryan\_S](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/ryan_s/32/10619_2.png) [@Ryan\_S](https://community.openenergymonitor.org/u/Ryan_S)\
**Post date:** [16 November 2019 12:28 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/8 "2019-11-16T12:28:29Z")

</div>

> [@borpin](#):
>
> Does the first one you start always work?

It appeared to, yet when I brought in the 2nd OpenEVSE it never seemed to appear. Will take a look at that log.

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [16 November 2019 12:29 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/9 "2019-11-16T12:29:46Z")

</div>

> [@Ryan\_S](#):
>
> It appeared to, yet when I brought in the 2nd OpenEVSE it never seemed to appear.

So If you start the first it works fine. If you stop the first and just start the second, what is happening? Do you ever see the second set of data?

---

<div class="post-metadata">

**Author:** ![Ryan\_S](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/ryan_s/32/10619_2.png) [@Ryan\_S](https://community.openenergymonitor.org/u/Ryan_S)\
**Post date:** [16 November 2019 12:38 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/10 "2019-11-16T12:38:28Z")

</div>

Here’s what I see with OpenEVSE2 only submitting over MQTT.

 ![image](https://community.openenergymonitor.org/uploads/default/original/2X/5/57b5a22bc53d4e82b3ebe562e4377d819b6aeedb.png)

When I bring in OpenEVSE1 over MQTT this is what it shows on the inputs.

 ![image](https://community.openenergymonitor.org/uploads/default/original/2X/3/36649b3b2305ff9c26997e09858356180ccf5c70.png)

There is a new input of 0, but nothing else. I’m guessing they are conflicting and this is MQTTs way of handling that.

---

<div class="post-metadata">

**Author:** ![Ryan\_S](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/ryan_s/32/10619_2.png) [@Ryan\_S](https://community.openenergymonitor.org/u/Ryan_S)\
**Post date:** [16 November 2019 12:40 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/11 "2019-11-16T12:40:39Z")

</div>

> [@borpin](#):
>
> So If you start the first it works fine. If you stop the first and just start the second, what is happening? Do you ever see the second set of data?

Just a bit more data. Here is what it shows if I stop OpenEVSE2 MQTT and leave OpenEVSE1 MQTT running. It looks like it just adds OpenEVSE1’s inputs now and accepted them.

 ![image](https://community.openenergymonitor.org/uploads/default/original/2X/7/74eac93f6f5e88d1477226fc9aaa59ec49169d04.png)

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [16 November 2019 15:18 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/12 "2019-11-16T15:18:59Z")

</div>

> [@Ryan\_S](#):
>
> Just a bit more data. Here is what it shows if I stop OpenEVSE2 MQTT and leave OpenEVSE1 MQTT running.

Ok, so the base topic for that is `openevse`

What if you stop that one and start the second one?

You should get a second set of inputs under `openevse2`

If you don’t, try using the IP address of the EmonPi as the host (generally more reliable anyway) in the settings of the openevse.

---

<div class="post-metadata">

**Author:** ![Ryan\_S](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/ryan_s/32/10619_2.png) [@Ryan\_S](https://community.openenergymonitor.org/u/Ryan_S)\
**Post date:** [16 November 2019 21:15 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/13 "2019-11-16T21:15:42Z")

</div>

> [@borpin](#):
>
> Ok, so the base topic for that is `openevse`
> 
> What if you stop that one and start the second one?
> 
> You should get a second set of inputs under `openevse2`
> 
> If you don’t, try using the IP address of the EmonPi as the host (generally more reliable anyway) in the settings of the openevse.

You know what. I see what the problem is. I already had an openevse2 in there for the main connection for my feeds. It was being masked under that when I put that for the base-topic. Changed it to openevse22 and sure enough there it is.

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [17 November 2019 13:56 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/14 "2019-11-17T13:56:46Z")

</div>

> [@borpin](#):
>
> @glyn.hudson, is the MQTT Client ID hardcoded? If so the MQTT broker will complain 2 devices using same ID.

Yes, it is fixed on the V2.x ESP8266 version, the new ESP32 V3.x version uses the ESP chip ID. This version is still in beta: [GitHub - OpenEVSE/openevse\_esp32\_firmware: OpenEVSE V4 WiFi gateway using ESP32](https://github.com/openevse/ESP32_WiFi_V3.x/)

I think my experience even through mosquitto complains in the log it doesn’t functionally make any differance if the same ID is used as long as the topics in use are different. I will need to test this again to be sure.

@Ryan_S could you post a screenshot showing your MQTT config settings on both OpenEVSE’s?

---

<div class="post-metadata">

**Author:** ![Ryan\_S](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/ryan_s/32/10619_2.png) [@Ryan\_S](https://community.openenergymonitor.org/u/Ryan_S)\
**Post date:** [17 November 2019 13:59 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/15 "2019-11-17T13:59:46Z")

</div>

> [@glyn.hudson](#):
>
> @Ryan_S could you post a screenshot showing your MQTT config settings on both OpenEVSE’s?

Certainly.

Here is OpenEVSE1

 ![image](https://community.openenergymonitor.org/uploads/default/original/2X/3/3ac38142192d82954c43208f7b12e78c2f7e3623.png)

And here is OpenEVSE2

 ![image](https://community.openenergymonitor.org/uploads/default/original/2X/5/528b30d8ec10fec5ba38383a22fadd45e1c83d48.png)

At this point I don’t see an advantage to the MQTT for myself as the charge shaping is based on UK data and not my local data, but I do want it connected as I am looking at putting solar on my roof after a roof replacement next year.

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [17 November 2019 14:02 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/16 "2019-11-17T14:02:14Z")

</div>

That looks correct. However, I see the data is showing up on your Emoncms Inputs page with node name “openevse” rather than “openevse3” open “openevse4” a I would expect.

Do you know where “openevse” could be coming from? Do you have a third openevse somwhere?!

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [17 November 2019 16:58 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/17 "2019-11-17T16:58:52Z")

</div>

> [@glyn.hudson](#):
>
> I think my experience even through mosquitto complains in the log it doesn’t functionally make any differance if the same ID is used as long as the topics in use are different.

My experience is the opposite. I had 2 instances of emoncms talking to the same Broker (when the client\_ID was hardcoded) and it complained vociferously!

Easy enough to check in the mosquitto logs IIRC.

---

<div class="post-metadata">

**Author:** ![Ryan\_S](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/ryan_s/32/10619_2.png) [@Ryan\_S](https://community.openenergymonitor.org/u/Ryan_S)\
**Post date:** [17 November 2019 18:50 UTC](https://community.openenergymonitor.org/t/2-openevses-mqtt/12499/18 "2019-11-17T18:50:52Z")

</div>

> [@glyn.hudson](#):
>
> That looks correct. However, I see the data is showing up on your Emoncms Inputs page with node name “openevse” rather than “openevse3” open “openevse4” a I would expect.
> 
> Do you know where “openevse” could be coming from? Do you have a third openevse somwhere?!

That was when I was originally using emon/openevse not realizing that leaving both the same would result in them overlapping. I have since changed them to what you see above and deleted the openevse input as it is not longer needed.
