# Second emonpi on network

**URL:** <https://community.openenergymonitor.org/t/second-emonpi-on-network/21378>\
**Category:** emonSD\
**Created:** [21 September 2022 13:19 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378 "2022-09-21T13:19:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![graemetherunner](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/g/d78d45/32.png) [@graemetherunner](https://community.openenergymonitor.org/u/graemetherunner)\
**Post date:** [21 September 2022 13:19 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/1 "2022-09-21T13:19:19Z")

</div>

I’m setting up (badly) a second emon pi in a separate property that is on the same network as my existing emonpi. Note - This new emonpi installation will soon control a second openevse on the network.

When I first turned on the new emonpi the setup started but then stopped part way so I never got the option to set it up with a different name. I then edited /etc/emonhub/emonhub.conf

all good so far, but all the stuff in emoncms needs to change to work and I’m thinking a factory reset may be a better way forward. I found some old threads with a factoryreset but they dont seem to work… (sudo su ~/emonpi/./factoryreset)

any thoughts on the best way?

---

<div class="post-metadata">

**Author:** ![Zarch](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/zarch/32/7947_2.png) [@Zarch](https://community.openenergymonitor.org/u/Zarch)\
**Post date:** [21 September 2022 13:25 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/2 "2022-09-21T13:25:02Z")

</div>

Out of the box any new install hostname is called emonpi  
If you already have an emonpi on your network then DNS will get screwy and you’ll probably have to reboot your existing emonpi and this new pi.

So boot the new pi (from a fresh sd card install), but not plugged into the network

Once booted, login (attach screen, keyb etc to Pi)

sudo raspi-config nonint do\_hostname “newname”  
sudo reboot

Once rebooted, you can put this back on the network and there should be no conflicts.

---

<div class="post-metadata">

**Author:** ![graemetherunner](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/g/d78d45/32.png) [@graemetherunner](https://community.openenergymonitor.org/u/graemetherunner)\
**Post date:** [21 September 2022 14:02 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/3 "2022-09-21T14:02:58Z")

</div>

thanks for the reply, but I’ve already edited emonhub.conf  
what difference would raspi-config make as when I check its already using my new name

---

<div class="post-metadata">

**Author:** ![Zarch](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/zarch/32/7947_2.png) [@Zarch](https://community.openenergymonitor.org/u/Zarch)\
**Post date:** [21 September 2022 14:26 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/4 "2022-09-21T14:26:44Z")

</div>

Not sure.

I’m just relaying what works for me when I want to build a new emonpi on my network.  
Changing the hostname (off network) seems key to me so that I don’t screw networking on both my existing emonpi and the new build.

---

<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:** [21 September 2022 14:53 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/5 "2022-09-21T14:53:27Z")

</div>

You can change the hostname on one of the units by editing `/etc/hosts` and `/etc/hostname`

---

<div class="post-metadata">

**Author:** ![graemetherunner](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/g/d78d45/32.png) [@graemetherunner](https://community.openenergymonitor.org/u/graemetherunner)\
**Post date:** [21 September 2022 18:52 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/6 "2022-09-21T18:52:31Z")

</div>

Many thanks, done both of those. is that all thats required given the addition of the openevse (which will be the 2nd on the network) that will happen soon?

---

<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:** [22 September 2022 01:39 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/7 "2022-09-22T01:39:42Z")

</div>

I can’t see any issue with that, the openevse will have an unique hostname e.g `openevse_xxxx`

---

<div class="post-metadata">

**Author:** ![graemetherunner](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/g/d78d45/32.png) [@graemetherunner](https://community.openenergymonitor.org/u/graemetherunner)\
**Post date:** [8 November 2022 16:04 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/8 "2022-11-08T16:04:24Z")

</div>

So, 2nd charger on the network now installed and working.

I have 2 issues Temperature is displaying “NaN” - I found some old posts about this and checked debug mode but my units temp sensor is turned on. I also found a post about units shipping without temp sensors - is this the case when ordered through OEM shop?

second issue is I can’t get the new unit to connect to its emoncms. MQTT is working fine. I’ve tried both [http://emonpipc/emoncms](http://emonpipc/emoncms) or just [http://emonpipc](http://emonpipc) with node openevse and writekey from the node device key. The network resolves to [http://emponpipc](http://emponpipc) fine… what am I doing wrong?  
Thank you

---

<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:** [8 November 2022 18:00 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/9 "2022-11-08T18:00:09Z")

</div>

> [@graemetherunner](#):
>
> I also found a post about units shipping without temp sensors - is this the case when ordered through OEM shop?

Yes, please contact shop support to obtain a temperature sensor which can be plugged in: [Contact](https://shop.openenergymonitor.com/support/)

> [@graemetherunner](#):
>
> second issue is I can’t get the new unit to connect to its emoncms. MQTT is working fine. I’ve tried both [http://emonpipc/emoncms](http://emonpipc/emoncms) or just [http://emonpipc](http://emonpipc) with node openevse and writekey from the node device key. The network resolves to [http://emponpipc](http://emponpipc) fine… what am I doing wrong?

I’m assuming `emponpipc` is your emonpi hostname? You could try `http://emponpipc.local`? Local hostname resolving can be unreliable and depends on your router hardware. Just to test could you try posting to the emonpi IP address?

---

<div class="post-metadata">

**Author:** ![graemetherunner](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/g/d78d45/32.png) [@graemetherunner](https://community.openenergymonitor.org/u/graemetherunner)\
**Post date:** [9 November 2022 12:59 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/10 "2022-11-09T12:59:33Z")

</div>

Thanks contacted the shop.

yes emonpipc is the hostname of the second emonpi on the network that needs to work with the new openevse. my browser resolves fine to both emonpipc or emonpipc.local… but openevse just says connected:no failed to connect.

I’ve tried using the ip (192.168.1.228) and still no connection - tried new device key… still nothing

---

<div class="post-metadata">

**Author:** ![graemetherunner](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/g/d78d45/32.png) [@graemetherunner](https://community.openenergymonitor.org/u/graemetherunner)\
**Post date:** [28 November 2022 09:22 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/11 "2022-11-28T09:22:59Z")

</div>

Does anyone have any thoughts on this / steps I need to do to work out why this isn’t working?

Many thanks

---

<div class="post-metadata">

**Author:** ![Robert.Wall](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/robert.wall/32/38246_2.png) [@Robert.Wall](https://community.openenergymonitor.org/u/Robert.Wall)\
**Post date:** [28 November 2022 11:53 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/12 "2022-11-28T11:53:23Z")

</div>

@glyn.hudson ?

---

<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:** [28 November 2022 15:00 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/13 "2022-11-28T15:00:54Z")

</div>

Can you confirm what is/isn’t working and the overall setup, please? 2 EmonPis and 2 OpenEVSEs?

---

<div class="post-metadata">

**Author:** ![graemetherunner](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/g/d78d45/32.png) [@graemetherunner](https://community.openenergymonitor.org/u/graemetherunner)\
**Post date:** [28 November 2022 17:06 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/14 "2022-11-28T17:06:31Z")

</div>

Yes 2 properties with separate incoming elec supply but both on the same network. To get the second pi to work I changed /etc/hosts and /etc/hostname to emonpipc.

This seems to work fine I can connect to it via my browser etc etc

The problem I have is trying to get the second openevse to connect to emonpipc all I get is connected “no - failed to connect”

However MQTT connects fine to emonpipc

Does the above make sense?

---

<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:** [28 November 2022 17:38 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/15 "2022-11-28T17:38:08Z")

</div>

> [@graemetherunner](#):
>
> The problem I have is trying to get the second openevse to connect to emonpipc

Can you connect to the second OpenEVSE directly?

I’m not sure if the OpenEVSE sets a hostname for it’s own portal. If so it is probably the same as the first one which may be the issue.

Using ‘local’ hostnames is a recipe for disaster especially if not using fixed IPs.

---

<div class="post-metadata">

**Author:** ![graemetherunner](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/g/d78d45/32.png) [@graemetherunner](https://community.openenergymonitor.org/u/graemetherunner)\
**Post date:** [28 November 2022 18:13 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/16 "2022-11-28T18:13:57Z")

</div>

yes I can connect to the second openevse directly they have unique hostnames (preset)…

eg  
openevse1 is openevse-9c60  
openevse2 is openevse-5b20

(these are not exact values but they are the right format)

I have tried to get the connection to emonpipc using the emon ip address… but this doesnt work either.

The bit that puzzles me (and I dont understand stuff well enough) is that openevse2 mqtt’s to emonpipc fine so whats the difference between the openevse doing mqtt:// & http://

---

<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:** [28 November 2022 19:39 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/17 "2022-11-28T19:39:12Z")

</div>

> [@graemetherunner](#):
>
> I have tried to get the connection to emonpipc using the emon ip address

That really doesn’t make sense. Do you mean the EmonPi’s IP Address as displayed on the LCD?

> [@graemetherunner](#):
>
> but this doesnt work either.

What error message do you get?

I can’t think of any reason why connection by the IP address would not work unless there is something very strange with your network. Just one subnet in use?

Hyphens in host names can cause an issue.

So you can open the web interface of both EmonPis and both OpenEVSEs - Yes?

You know the IP addresses of all 4? Are they fixed / reserved?

You have set the MQTT broker for EmonPi 1 in OpenEVSE 1 settings (using IP address)? And the MQTT Setting for EmonPi 2 in OpenEVSE 2?

Have you an independent MQTT tool setup? Can you connect to both brokers?

---

<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:** [28 November 2022 23:10 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/18 "2022-11-28T23:10:31Z")

</div>

> [@borpin](#):
>
> I can’t think of any reason why connection by the IP address would not work unless there is something very strange with your network. Just one subnet in use?

Correct, IP address connection should always work unless there is an issue with the network.

However, is sounds like the OP has successfully changed the hostname of the emonPi so the two emonPis have unique hostnames.

@graemetherunner can you ping the openevses from the emonPi’s?

---

<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:** [29 November 2022 07:00 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/19 "2022-11-29T07:00:04Z")

</div>

> [@glyn.hudson](#):
>
> You can change the hostname on one of the units by editing `/etc/hosts` and `/etc/hostname`

For future reference, probably better to say to use the `raspi-config` tool, I’d suggest 🙂

---

<div class="post-metadata">

**Author:** ![graemetherunner](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/g/d78d45/32.png) [@graemetherunner](https://community.openenergymonitor.org/u/graemetherunner)\
**Post date:** [29 November 2022 16:47 UTC](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378/20 "2022-11-29T16:47:47Z")

</div>

I’m unable to connect directly (keyboard / screen) to the emonpipc so…

ping emonpipc from my laptop returns  
192.168.1.228  
sent 4 packets 100% success 3ms

but put that into openevse and I still get

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

To connect to emonpipc I’ll ssh and then try the same later but assume it will be the same.  
Yes I can open web interface of all 4 devices  
Network is relatively straightforward & all on one subnet (192.168.1.xxx)  
No independent? mqtt but it just works see below.

 ![image](https://community.openenergymonitor.org/uploads/default/original/3X/5/1/510c5e059dc8e58731bb40bd840ef12c5637d6a4.png)

Where have I gone wrong?

[Next page](https://community.openenergymonitor.org/t/second-emonpi-on-network/21378.md?page=2)
