How to change an emonTx (with ESP8266) IP address

I am about to change my router & network, and need to prepare how to change my LAN IPs; I believe that I know how to change the emonPi’s IP (via ssh) but am not sure how to change the EmonTx’s (c/w ESP wifi modules). I need to change them from 192.168.1.xxx to 192.168.2.xxx.

Logging in to emonHub via 192.168.1.161 lets me change where they report to (the emonpi.local), but I can’t see how to change their own IP.

I will also need to change the wifi details, as all of my access points will change too.

I hope it can be done without deleting / resetting the Inputs & Feeds etc

TIA

Edit - changed thread name to reflect the use of an ESP8266 Wi-Fi module. BT, Moderator

The instructions for setting up the EmonTx with the ESP wifi module are here:

Reading through that, it looks like the IP address of the EmonTx WiFi module is not important to the configuration of the Emon system, as long as it can communicate with the EmonCMS endpoint (your EmonPi).

To change the WiFi network they are connected to, you need to connect to each one individually and change the WiFi settings (as per the guide above). You should be able to use your current DHCP table from your router to work out which IP addresses your devices are using so you can point your browser at them directly.

EDIT: I noticed the following on the Github page for EmonESP:
If re-connection fails (e.g. network cannot be found) the EmonESP will automatically revert back to WiFi AP mode after a short while to allow a new network to be re-configued if required. Re-connection to existing network will be attempted every 5min.
So you may have to power down your “old” WiFi access point once you have the new one running and then go through the initial WiFi selection setup from the setup guide to reconnect it to your new WiFi network

Thanks @Greebo - that all makes sense & I will do all of that when the new router arrives.

The other thing you can do (which I do), is edit the SSID and Password on the new router to match the old router. Everything just connects to the new router without any changes to device settings :grinning:

You might be reconfiguring/splitting networks, but if not, this is a great solution.

The other thing to consider is not using the ISP router, but have your own so if you change ISP you need to change very little. I’m a bit of an ISP tart to get the best deals.

Thanks @borpin - good points.

I currently use a (non-ISP) Draytek Vigor modem/router c/w Apple APs which has been good, but I am moving across to a Ubiquiti Unifi set up (router, switches and APs). I have always run my own domain names as well, so flitting between ISPs has never been a problem either :crazy_face:

Be intrigued to see how you get on as I have an APLite and USG and it is not been plain sailing.

What will you run the controller on? I’ve got mine on a DietPi VM right now. Needs a fair bit of memory I find.

You can specify multiple WiFi networks so I’d be inclined to just replicate the SSIDs - the IPs will just get picked up off DHCP then.

I will use the “free 3 year Cloud Hosting” to start with, and then see where to go from there as I learn more about the platform. To start with I will have a USG, x3 AC-LITE APs and x3 8 port switches. I’ve also bought a pair of Unifi M2 wifi “aerials” as I would like to get www connectivity at the top of the drive which is about 150 metres from the nearest ethernet socket. But I will wait for a bit before I install them. (I had tried a pair of mains power line adapters (I have power but no www at the top of the drive), but they didn’t work - probably due to the distance.

1 Like

Odd, I’d have thought they would. Both plugged into the same phase?

Same phase (we only have one), but possibly not on the same CU “circuit”. But if not, then certainly served by the same sub/daughter CU.

Yesterday I was surprised that I could see the wifi propagated by the “slave” powerline box when in my office (which is where I intend to beam the M2 signal from), but because my office is served by a totally different Mains In meter than the house/garage/drive gate, I can’t imagine that that would work. Maybe a pair of AC-Lites would though? Interesting …

Making good progress, but still some niggles …

I can’t connect to one of my three emonTx’s which is in the loft. All three EmonTx’s are “powered” by an ESP wifi dongle.

The co-located wireless AP (Apple Airport Express) has an IP of 192.168.2.22

The AP is connected to the internet, and it is showing one wireless client 192.168.2.53

The router is 192.168.2.1, and within the router control panel I gave the emonTx 192.168.2.53

I can ping 192.168.2.53 OK - albeit with not great speeds, but whenever I enter that address in a browser nothing returns. This is completely unlike the other two emonTx’s that I have which have also been given static IPs, and are connecting to other Airport Expresses fine; they are also both “reporting” through to the emonPi via http as well.

The only thing that doesn’t “look” quite right is that the two working EmonTx’s show up as made by Espressi, whereas the errant one shows as made by Hangzhou. See attached.

What else might I try to re-establish control of this Tx? I have tried powering off/on the emonTx, the AP and the whole network.

TIA
.


.

.