Community discussions

MikroTik App
 
stoneage
just joined
Topic Author
Posts: 16
Joined: Fri Feb 21, 2020 11:50 pm

Alexa using node-red with two different bridges?

Sat Mar 14, 2020 12:10 am

Hi,

I am using Bridge-WIFI for my WIFI devices. Another bridge "Bridge-LAN" for my cable-connected devices. There is one node-red server in the bridge-LAN and there is installed a plugin for using node-red with amazon alexa. The problem now is that the alexa device is not able to find devices, when it is connected to the Bridge-WIFI, because the Devices emulated by the node-red server is in Bridge-LAN. To be sure if its really a problem because of two different Bridges I've tried to put the Accesspoints in the Brudge-LAN and everything worked well.

My question now is, how to solve that issue when I want to use my alexa devices in the Bridge-WIFI in combination with the node-red server running in Bridge-LAN?

On Wireshark I get the following output (see attachment)

bests, Christian
You do not have the required permissions to view the files attached to this post.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2984
Joined: Mon Apr 08, 2019 1:16 am

Re: Alexa using node-red with two different bridges?

Sat Mar 14, 2020 1:19 am

Within a bridge (Bridge-LAN or Bridge-wifi) you have L2 connection. That is bridge/switch connected. One subnet, one broadcast domain.
Between two bridges you have L3 connectivity. That is routed connection. Two subnets, two broadcast domains. The connection passes over the IP firewall.
Depending on the type of connection you want, you will work with either one or two bridges.
Routed connection does not pass broadcast, multicast and discovery protocols, different from the unicast IP network routing. So discovering devices based on MAC address detection, or broadcast, or (Apple) Bonjour, or Netbios (SMB, Master browser), or SSDP will not pass over a routed connection, unless you have somewhere a service that will help you (Microsoft WINS is such a service that helps with the Netbios discovery)
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2984
Joined: Mon Apr 08, 2019 1:16 am

Re: Alexa using node-red with two different bridges?

Sat Mar 14, 2020 1:39 am

You might look into PIM. Sorry no experience at all ...

viewtopic.php?t=135405
 
stoneage
just joined
Topic Author
Posts: 16
Joined: Fri Feb 21, 2020 11:50 pm

Re: Alexa using node-red with two different bridges?

Sun Mar 15, 2020 7:33 pm

You might look into PIM. Sorry no experience at all ...

viewtopic.php?t=135405
That was the perfect input!

in my case:

##Install multicast on Mikrotik Router:

https://mikrotik.com/download (extra packages)
(Drop the file into files dialog on mikrotik router and restart the router!)

##After restart use terminal:

#Create Bridges and Netowrks:

/interface bridge
add fast-forward=yes name=Bridge-WLAN protocol-mode=none
add fast-forward=yes name=Bridge-LAN protocol-mode=none

/ip pool
add name=dhcp_Bridge-WLAN ranges=172.20.200.1-172.20.200.253
add name=dhcp_Bridge-LAN ranges=192.168.1.101-192.168.1.253

/ip dhcp-server
add address-pool=dhcp_Bridge-WLAN disabled=no interface=Bridge-WLAN lease-time=2m name=DHCP-WLAN
add address-pool=dhcp_Bridge-LAN disabled=no interface=Bridge-LAN lease-time=2m name=DHCP-LAN

/interface bridge port
add bridge=Bridge-WLAN hw=no interface=Bridge-WLAN
add bridge=Bridge-LAN hw=no interface=ether2

/ip address
add address=172.20.200.254/24 interface=Bridge-WLAN network=172.20.200.0
add address=192.168.2.254/24 interface=Bridge-LAN network=192.168.2.0

/ip dhcp-server network
add address=172.20.200.0/24 dns-none=yes gateway=172.20.200.254 netmask=24
add address=192.168.2.0/24 dns-none=yes gateway=192.168.2.254 netmask=24

#Mangle Rule

/ip firewall mangle add action=change-ttl chain=prerouting disabled=yes dst-address-type=multicast log-prefix=TTL+ new-ttl=set:64 passthrough=yes port=1900 protocol=udp
/ip firewall mangle add chain=prerouting action=change-ttl new-ttl=set:64 passthrough=yes protocol=igmp log=no log-prefix=""

#Routing (ip Address is the Network-Address from Bridge-LAN!) -> Check entries: Routing -> PIM

/routing pim bsr-candidates
add interface=Bridge-WLAN
/routing pim interface
add interface=Bridge-WLAN
add interface=Bridge-LAN
/routing pim rp add address=192.168.1.254
/routing pim rp-candidates
add interface=Bridge-LAN



THX!!
 
wifiAlexa
just joined
Posts: 1
Joined: Thu Apr 27, 2023 6:54 am

Re: Alexa using node-red with two different bridges?

Thu Apr 27, 2023 6:56 am

Yes, it is possible to use Amazon Alexa with two different home automation bridges using Node-RED:

Install the node-red-contrib-alexa-home-skill and node-red-contrib-homekit nodes in your Node-RED instance.

Set up your first home automation bridge by adding a "HomeKit Bridge" node to your flow and configuring it to connect to your first home automation platform (e.g., HomeKit, SmartThings, etc.).

Add an "Alexa Home Skill" node to your flow and configure it to use the same credentials that you used when setting up your Alexa skill.

Connect the output of your "HomeKit Bridge" node to the input of your "Alexa Home Skill" node.

Repeat steps 2-4 for your second home automation bridge, connecting it to a separate "Alexa Home Skill" node.

Make sure that each "Alexa Home Skill" node is configured with a unique name for each bridge (e.g., "Living Room Bridge" and "Bedroom Bridge").

Test your flow by asking Alexa to discover devices. You should see devices from both bridges appear in the Alexa app.

By using separate "Alexa Home Skill" nodes for each home automation bridge, you can ensure that Amazon Alexa is able to control devices from both platforms without any conflicts.

Who is online

Users browsing this forum: No registered users and 16 guests