Adding devices to HA from a different sub-net

Here’s my scenario:

  • I have a cable modem, provided by the cable service here in my country. It is connected by cable, to a router (lan port). My modem has DHCP enabled and the router has it disabled, in other words, even connected to the router, the modem is the one providing IP’s. So, all the devices connected have the same IP structure - 192.168.0.xx

  • Here’s what I did: My router was being used only as a bridge, none of its functions were being explored. So, I switched the cable to the wan port and then enabled the DHCP as well, having a second network (192.168.31.xx)… now I’m properly using the router with all its possibilities. Now I have modem with DHP, giving IP´s 192.168.0.xx and the router giving IPs 192.168.31.xx

Everything works fine… except my HA … all devices I need to write the IP address to the code (roborock S50, sonoffs, ip cameras), and if they are connected to the router, not the modem, I had to switch to 31.xx instead of 0.xx, all of them stopped working.

Is there any way to have HA integrated with this other sub-network I just created?

I wish I had the option to pick specific devices and choose the modem dhp, skiping router dhcp …

This isn’t really an HA question, more of a general networking question.

Is there no way to just use the modem as a true modem without its DHCP running? The setup you describe sounds like a lot of trouble to maintain. I’d try to get to a nice simple topology:

modem <--> router <--> switch <--> devices

where the switch is probably built into the router along with an wifi access point.

What models are the modem and router?

I wish I could use only the router to provide IPs, but the router is located far from the modem. And near the modem, I have my TV, ps4, Xbox and the raspberry running the HA, all of them using RJ45 cable…

If the modem and router were located side by side, I definitely would use only the router and forget the modem (it sucks)

I could return the environment as it was, but I would lose cool functions that my router provides (wifi optimization, QOS, etc.) … and the modem is very basic, the wifi range sucks, there are no resources at all…

My modem is a Humax HGB10R-02 and the Router a Xiaomi Mi R4AC