Closed robsonfelix closed 6 months ago
Here are my prefs on Audio/MIDI:
This is what mixer.info returns:
{
"channel": {
"number": 16,
"base_address": "ch"
},
"bus": {
"number": 6,
"base_address": "bus"
},
"matrix": {
"number": 0,
"base_address": "mtx"
},
"dca": {
"number": 4,
"base_address": "dca"
},
"fx": {
"number": 4,
"base_address": "fx"
},
"auxin": {
"number": 0,
"base_address": "auxin"
},
"auxrtn": {
"number": 2,
"base_address": "auxrtn"
},
"scenes": {
"number": 100,
"base_address": "scene"
},
"channel_sends": {
"number": 0,
"base_address": "chsend"
},
"bus_sends": {
"number": 0,
"base_address": "bussend"
}
}
Despite all of the above, I can see on the device in Home Assistant a channel X -> bus Y Fader and a channel X -> bus Y On for each channel and bus combination.
I haven't been able to get access to an XR18 to test the channel sends. So I suspect that it is doing them slightly differently than the X32. I'll look into it.
I can help on that provided you guide me through it. I am seasoned programmer, just not in Python. What can I do to help?
I think I understand what the issue is. I've released a new version that I hope will fix the issue. However I haven't been able to test against an XR18 yet. Let me know if it works.
the volume did work, but not the ON/OFF (mute)....
Is there a way for the add-on to have a global parameter to convert from the float (0..1) to either float/integer (0..100) ? I had to create a helper for every single item and then create an automation for it to work. I only did it for the main out, but I have to do it now for every single bus and channel combination. Depending on the slider you use, this is what you have to do it for it to work.
To the channel/mute problem. I've done some research and tested against an XR16. From what I can see and what I've seen from other comments online is that although the bus send mute is document in the API (and returns data), none of the XAIR mixers actually support it.
They have a channel mute, but no functionality to support muting only one bus send.
I'll look at removing that functionality from the integration as it can't work.
I ran many tests with your code and what you said seems correct. There is the ON/OFF of a channel (across buses) but even the interface on X-Air does not support the muting of a channel to that particular bus. Perhaps what could be possible is to set volume to 0 when muted, as to "emulate" that feature of XR32 that others don't have.
Now, I re-tested changing volumes on buses greater than 1 and the test app does not seems to be catching any events... would you know why??
I used:
import asyncio
import logging
from behringer_mixer import mixer_api
def updates_function(data):
print(f"The property {data.get('property')} has been set to {data.get('value')}")
async def main():
mixer = mixer_api.create("XR18", ip="x.x.x.x", logLevel=logging.WARNING)
await mixer.start()
await mixer.validate_connection()
state = await mixer.reload()
state = mixer.state()
#print(state)
info = mixer.info()
print(info)
asyncio.create_task(mixer.subscribe(updates_function))
await asyncio.sleep(20)
if __name__ == "__main__":
asyncio.run(main())
I'd rather not imitate the functionality. While it would be possible, it wouldn't work quite as expected. When a mute happens it maintains the value of the fader. While in theory I could do this internally, if the mixer or HA then got restarted I would have to maintain some kind of persistent storage that I'd rather not do. Without doing this, 'unmuting' the channel would have to set it to some specific value, not the one that it was before being muted.
In terms of "I re-tested changing volumes on buses greater than 1 and the test app does not seems to be catching any events."
I've tested with an XR16 (using your code) and changing bus volume and fader send to the bus for busses above 1 seems to work fine for me.
Channel sends now work on version v0.1.9, but MAIN volume (fader) and ON/OFF toggle (mute) do not work for main.
I think I have now resolved the issue with the mains in v0.1.10
System Health details
System Information
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.34.0 Stage | running Available Repositories | 1481 Downloaded Repositories | 27Home Assistant Cloud
logged_in | true -- | -- subscription_expiration | May 10, 2024 at 9:00 PM relayer_connected | true relayer_region | us-east-1 remote_enabled | true remote_connected | true alexa_enabled | true google_enabled | true remote_server | us-east-1-8.ui.nabu.casa certificate_status | ready instance_id | 6850c26402554a93ab61cb87d3a8f01e can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okHome Assistant Supervisor
host_os | Home Assistant OS 11.4 -- | -- update_channel | stable supervisor_version | supervisor-2024.02.1 agent_version | 1.6.0 docker_version | 24.0.7 disk_total | 62.3 GB disk_used | 37.6 GB healthy | true supported | true board | ova supervisor_api | ok version_api | ok installed_addons | Terminal & SSH (9.9.0), File editor (5.8.0), Mosquitto broker (6.4.0), ESPHome (2023.12.9), AppDaemon (0.16.4), Grafana (9.1.3), Advanced SSH & Web Terminal (17.2.0), RPC Shutdown (2.4), openWakeWord (1.8.2)Dashboards
dashboards | 1 -- | -- resources | 19 views | 56 mode | storageRecorder
oldest_recorder_run | February 28, 2024 at 3:00 PM -- | -- current_recorder_run | March 8, 2024 at 8:30 PM estimated_db_size | 4282.43 MiB database_engine | sqlite database_version | 3.41.2Sonoff
version | 3.6.0 (8dd8af9) -- | -- cloud_online | 0 / 11 local_online | 10 / 10Checklist
Describe the issue
I can change many things, but when actioning the toggle for ON/OFF on a specific channel to a bus, nothing happens. The same is true for changing value of that channel for a bus. Same for the ON/OFF for the main channel. I am using a XR18.
Reproduction steps
Just open the device in home assistant and try to change the values of any bus send of a channel.
I can set the values using your mixer.py program from your library by doing so:
But it does not work in the HA plugin.
As to the channel sends to bus, they don't even show up when running the mixer.py program.
Debug logs
Diagnostics dump
No response