Hi all! I have a HA server in my LAN and all my IoT devices are in a separate VLAN. In this way to insert all the devices I have to configure them all manually using MQTT commands. Since I’m fed up about this method, I’ve added a second NIC to the HA VM (Proxmox) that is in the IoT VLAN. When I enter the terminal I see that HA has 2 IPs, one for each network and I thought that all the Shelly (they use the same MQTT broker that uses HA, they’re not configured for cloud connection and ColoT is enabled) devices would appear in HA, but…they don’t. How do you think that I can troubleshoot this problem?

  • @Shabby4582
    link
    English
    11 day ago

    I run a number of Shelly devices on an iOT vlan with opnsense, but I used the integration- could that be an option?

    I found a couple of the shelly devices (the humidity & temperature sensor and the smoke alarm) needed to be able to access HA to send updates so I created an opnsense alias to allow them just to access the ip it’s on. I could see MQTT being useful for these maybe?

    I also have a couple of plugs and plus 1pm’s that just sit isolated on the vlan and get accessed by HA from the LAN. The integration was super easy to setup for these.

  • @Randelung
    link
    English
    4
    edit-2
    3 days ago

    There’s several parts to this.

    From your post it sounds like you’re using MQTT for the shelly devices and that the broker is separate from HA.

    • I assume HA can connect to and read from the broker? Maybe you have other devices already set up and working?
    • Do you see shelly data on the broker in any form? Does the shelly user have write access to the broker?
    • From what I gather, shellys don’t send HA MQTT discovery data. I think you need to configure them manually. HA won’t just display any data a MQTT broker has; apart from telling HA what data is interesting, it also needs to know the measurement units (and potentially error states or other info like connectivity) https://www.home-assistant.io/integrations/mqtt/#mqtt-discovery

     
    Now, you also mention ColoT. That’s only necessary if you use the shelly integration in HASS. It’s entirely separate from MQTT. You’d point the shellys directly to HA instead of the MQTT broker. It’s much easier to use. Maybe just switch to that since all device can see each other, anyway?

    It’d help if you included a few screenshots or diagrams of what you’re trying to do.

    • @peregusOP
      link
      English
      23 days ago

      Hi, yes, I have a Mosquitto container in another machine.

      • HA can connect to the MQTT broker and I already have other MQTT devices working in HA, there’s also a Shelly RGBW2 that I can turn on and off via MQTT
      • In the MQTT broker I see plenty of data from all the MQTT devices
      • I thought that HA would recognize Shelly devices by their messages. I’ll give a look at the MQTT discovery, thanks.

      I’ve mentioned ColoT because I’ve installed the Shelly integration from HASS (sorry, I’ve forgot to mention it, I’ll add it), but even there there are no devices discovered. I’m using it with mcast, I’ll try putting the HA IP. Thanks for the input, I’ll do some tests.

  • @just_another_person
    link
    English
    1
    edit-2
    3 days ago

    When you say “VLAN”, are you saying this a tagged network? It sounds like you just have two physical networks here. What is handling the tagging?

    • @peregusOP
      link
      English
      13 days ago

      It’s a tagged network. The VLANs are setup in the OPNsense router and since HA is a VM, the VLAN is taken care by Proxmox that presents an untagged NIC to the VM.

      • @just_another_person
        link
        English
        13 days ago

        Well there’s a lot of stuff happening all at once, and without a bigger picture, I can just give you some basic steps on how I would start debugging:

        • Make sure the new untagged interface is actually working as expected (check rx/tx, basic pings)
        • Try pinging the devices ONLY from that interface
        • Check the configuration of the devices if you can contact them and see what endpoint they think they are supposed to be talking to
        • If the are WiFi, make sure that wireless network can be pinged from this new interface (join a laptop and ping back and forth)
        • If all else fails, snoop that interface and see what IS traversing it
  • @[email protected]
    link
    fedilink
    English
    13 days ago

    is multicast DNS enabled and available in that VLAN?

    have you set up the network for HA using the

    ha network 
    

    commands?

    • @peregusOP
      link
      English
      13 days ago

      is multicast DNS enabled and available in that VLAN?

      In OPNsense there is no multicast DNS option to be enabled, but since the Shelly devices and HA are in the same VLAN, the router shouldn’t even come into play.

      have you set up the network for HA using the ha network commands?

      No, I didn’t, but in the HA in the “Configure network interfaces” section I see the 2 NICs with the 2 correct IPs. Should I do something else?

      • @[email protected]
        link
        fedilink
        English
        13 days ago

        If you’re using OPNsense I recommend you install and enable Avahi to help route discovery traffic, and I would double check multicast is functioning on your wifi.

        IIRC with home assistant there are some commands you can run to make it aware of your VLANs… have a look at this