Luligu / matterbridge

Matterbridge plugin manager for Matter
https://github.com/Luligu/matterbridge/blob/main/README.md
Apache License 2.0
204 stars 23 forks source link

[Frontend]: Text below QR code overflows #65

Closed stefan-schweiger closed 3 months ago

stefan-schweiger commented 3 months ago

I see that in your screenshots it does not seem to happen, but on my machine the text below QR is overflowing it's container. I'm guessing that is maybe cause I'm on a mac and a different font family is used on my system due to this:

image

Here is what it looks like on my machine:

image

I think just removing the height: 40px here should be enough to just let the components flow as intended.

https://github.com/Luligu/matterbridge/blob/0452b2e101bbb37d62676f7b43b857dc46fa4a45/frontend/src/App.css#L265

With it removed:

image
Luligu commented 3 months ago

Hi, thank you for letting me know the issue.

It is caused I imagine by a short ipv6 address.

By the way I guess I fixed it.

Could you eventually do a PR to the readme or simply send me a short file with the instructions to give to the users to create a service on mac to run matterbridge like service? Unfortunately I have 0 knowledge about mac.

stefan-schweiger commented 3 months ago

Running matterbridge itself on macOS is pretty much the same as described for your Linux part. But as for running it as a background service I wasn't able to get the LaunchAgent to work correctly. Basically what you need to do is set up a config file somewhat like this and save it into ~/Library/LaunchAgents/com.example.matterbridge.plist. But I'm somehow the path resolution is not working as expected and I can't get it to work.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>EnvironmentVariables</key>
        <dict>
            <key>PATH</key>
            <string>
                /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin</string>
        </dict>
        <key>Label</key>
        <string>com.example.matterbridge</string>
        <key>StandardErrorPath</key>
        <string>/tmp/mycommand.err.txt</string>
        <key>StandardOutPath</key>
        <string>/tmp/mycommand.out.txt</string>
        <key>ProgramArguments</key>
        <array>
            <string>/opt/homebrew/bin/matterbridge</string>
            <string>-bridge</string>
        </array>
        <key>RunAtLoad</key>
        <true />
        <key>KeepAlive</key>
        <true />
    </dict>
</plist>

Either way I can't imagine too many people using a macOS machine as their homelab and if they do I would probably advice them to just run the docker container.

Unraid

On the note of docker container this would be the "recipe" for creating a Unraid community app (which is basically just a configuration how the docker container should be started):

<?xml version="1.0"?>
<Container version="2">
  <Name>Matterbridge</Name>
  <Repository>luligu/matterbridge:latest</Repository>
  <Registry>https://registry.hub.docker.com/r/luligu/matterbridge</Registry>
  <Network>host</Network>
  <MyIP/>
  <Shell>sh</Shell>
  <Privileged>false</Privileged>
  <Support/>
  <Project/>
  <Overview>Matterbridge allows you to bridge non-Matter devices to Matter. For example you can integrate zigbee2mqtt, Shelly and Somfy Tahoma devices via existing plugins.</Overview>
  <Category/>
  <WebUI>http://[IP]:[PORT:8283]/</WebUI>
  <TemplateURL/>
  <Icon>https://github.com/Luligu/matterbridge/blob/main/frontend/public/matterbridge%2064x64.png?raw=true</Icon>
  <ExtraParams>--restart unless-stopped</ExtraParams>
  <PostArgs/>
  <CPUset/>
  <DateInstalled>1718796742</DateInstalled>
  <DonateText/>
  <DonateLink/>
  <Requires/>
  <Config Name="AppData Plugin Path" Target="/root/Matterbridge" Default="" Mode="rw" Description="" Type="Path" Display="always" Required="true" Mask="false">/mnt/user/appdata/Matterbridge/Matterbridge</Config>
  <Config Name="AppData Config Path" Target="/root/.matterbridge" Default="" Mode="rw" Description="" Type="Path" Display="always" Required="true" Mask="false">/mnt/user/appdata/Matterbridge/.matterbridge</Config>
  <Config Name="Frontend" Target="8283" Default="8283" Mode="tcp" Description="" Type="Port" Display="always" Required="true" Mask="false">8283</Config>
  <Config Name="Matter" Target="5540" Default="5540" Mode="tcp" Description="" Type="Port" Display="always" Required="true" Mask="false">5540</Config>
  <Config Name="Matter (UDP)" Target="5540" Default="5540" Mode="udp" Description="" Type="Port" Display="always" Required="true" Mask="false">5540</Config>
</Container>

Not sure if you have any interest in submitting such a thing yourself. Otherwise I can look into the process since many of the Unraid community apps have no affiliation to the actual developer.

Luligu commented 3 months ago

Thanks in any case. Every time I try to find someone who can add the guides for macOs in readme... If you manage to solve it in the future contact me.