Second emonpi on network

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?

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.

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

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.

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

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?

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