#MIDIMonster add-on

1 messages ยท Page 1 of 1 (latest)

gray briar
#

@lnuk: Let's discuss changes to the add-on here

#

MIDIMonster add-on

strange lodge
#

so would you be fine with a simple PR:

    && make mqtt.so \
    && make midi.so \
+   && make rtpmidi.so \
    && cd .. \
#

or do you think there may be a way to dynamically add and remove these as needed?

gray briar
#

Please test this locally first. Adding additional backends might require dependencies at build-time and I intend to only accept pull-requests of tested changes.

#

The easiest way is to add a samba share add-on to HA, and copy the midimonster folder into the share "add-ons". You can then create local changes and see if they work.

#

You might be lucky and have RTPMIDI compile without any dependencies

#

Once it works, there is no need to remove it, as I think it's a great addition. The more backends we can get working the better imo

strange lodge
#

it builds just fine

#

I'm now trying to get it to actually work before filinga PR

#

I'll ask in the midi monster discord, but I have issues getting mDNS to work with RTP-MIDI:

Created rtpmidi instance rtp
rtpmidi    Apple mode instance rtp listening on ports 60763 (control) and 60764 (data)
rtpmidi    mDNS announce address 0: 172.30.33.1 (from eth0)
rtpmidi    Failed to join IPv6 multicast group for mDNS, discovery may be impaired: No such device
rtpmidi    Registered 4 descriptors to core
core    Routing 0 sources, largest bucket has 0 entries
rtpmidi    Failed to transmit mDNS frame
gray briar
#

Hmm, mdns inside a docker image... Well that might be a little complicated. HA probably already uses MDNS advertising for its own services, so trying to do that again inside a docker container will probably cause issues.

#

However, RTPMIDI should work fine without MDNS, as long as you have the ports opened and know the HA IP address.

strange lodge
#

interestingly it can find my iPad just fine

gray briar
#

I think discovering devices will be easy, but announcing the service over MDNS will be a pain

strange lodge
#

Oh nice, thank you!

gray briar
#

Perhaps you can use Home Assistants zeroconf implementation to do the MDNS broadcasting for you

strange lodge
#

do you know if it can be handed off to midimonster?

gray briar
#

I think the proper way to do it, is to have a companion integration "RTPMidi" to the MIDIMonster add-on. This integration can then use the zeroconf publishing in HA.

strange lodge
#

๐Ÿ˜ต

gray briar
#

Can't your RTPMIDI client just add another RTPMIDI device via ip:port?

#

Does it HAVE to use MDNS for dicovery?

strange lodge
#

I don't think CoreMIDI supports this

#

Because ๐ŸŒŸ A P P L E ๐ŸŒŸ

#

but I don't understand why it can't spit out multiple mDNS'es, is this a limitation of HASS/Docker?

#

how does the samba add-on handle this?

gray briar
#

Not an expert on te subject, but I have run into this with other docker setups. I think you can only have 1 MDNS server broadcasting on 1 IP. The way I normally solve this is to have a dedicated IP for docker containers that I need MDNS on. But perhaps there is an easier way.

#

Good point about the Samba add-on, but I don't see it broadcasting in my network

strange lodge
#

I know I've had multiple bonjour stuff doing stuff in Swift, but that could just be whatever library I was using talking with the underlying mDNS daemon ๐Ÿค”

#

Actually I see my mac broadcasting a lot services

gray briar
strange lodge
#

funnily enough that that's the app I use also

gray briar
#

And I only see my NAS, not the HA add-on broadcasting

strange lodge
#

I don't even see my NAS broadcasting SMB, only my mac

gray briar
#

The container will probably run in a bridge, so isolated from the network.

#

Maybe host networking would allow you to publish the zeroconf data on the network. No guarantees, but seems like a quick thing to test.

strange lodge
#

wait, wouldn't AirCast and AirSonos require mDNS?

#

Let me prope those, after I test your thing

gray briar
#

"host_network: true"

strange lodge
#

Oh nice, it shows up now, thank you!

#

Next step: figure out how to make the package send a sound

#

probably just need to use the mappings and map midi <=> rtpmidi

gray briar
#

You want to use HA to be a bridge between an RTMidi device and a wired MIDI device?

strange lodge
#

I want to use HA to spit my midi controller out to the local network

#

you're not the first to mention that this is kinda weird

gray briar
#

Hahaha, I find nothing weird anymore, I use HA to do showcontrol for a theater play and send MIDI commands to a light controller.

#

You do you!

strange lodge
#

It's cheaper than getting a usb-a to usb-c adapter or usb-b to usb-c cable ๐Ÿ˜‰

#

And then I can also do weird home automation with midi down the line if I feel like it

gray briar
#

Sounds like a perfectly fine use-case to me.

strange lodge
#

someone in a different server scoffed at the idea because hassos isn't an rtos

gray briar
#

Well, it all depends on your use case.

#

If you don't need real-time interaction, then who cares.

strange lodge
#

All I need is fun

#

do you know if there is a shorthand to "just map everything"?

gray briar
strange lodge
#

I am not home right now, but how did you find the name to your midi controller? did you just nick it from some other computer?

small wing
#

I just discoverd this and I am 100% behind the midimonster add-on ๐ŸŽ‰ ๐Ÿ˜