New Bang Olufsen Masterlink Gateway / Beolink Gateway integration (MLGW/BLGW)

Cool project, i tried but with little luck…

here is the error message:

2021-02-20 04:31:39 ERROR (Thread-5) [root] Uncaught thread exception

Traceback (most recent call last):

File “/usr/local/lib/python3.8/threading.py”, line 932, in _bootstrap_inner

self.run()

File “/usr/local/lib/python3.8/threading.py”, line 870, in run

self._target(*self._args, **self._kwargs)

File “/config/custom_components/mlgw/gateway.py”, line 211, in _ml_thread

encoded_telegram = decode_ml_to_dict(telegram)

File “/config/custom_components/mlgw/gateway.py”, line 622, in decode_ml_to_dict

decoded[“from_device”] = decode_device(telegram[1])

IndexError: bytearray index out of range

1 Like

Ok, @lutzha I uploaded new code that should fix the authentication issue. Try it out and let me know if it works!

@Tom_Limkilde : I added exception handling to that code, let me know if it works now!

Just to let you know I have the MLGW_telegram running now.
I needed to activate the function on the TV. (doh) :laughing:

Now it’s time to play around.

1 Like

Dear Giovanni

Now the login works with the configuration, but there is a problem with the sources:

image

Here is the log:

2021-02-22 08:56:46 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for mlgw which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2021-02-22 08:56:52 DEBUG (MainThread) [custom_components.mlgw.config_flow] Async Step User Config Flow called
2021-02-22 08:57:08 DEBUG (MainThread) [custom_components.mlgw.config_flow] Async Step User Config Flow called
2021-02-22 08:57:09 INFO (MainThread) [custom_components.mlgw.gateway] Trying to connect to ML CLI: 192.168.1.210
2021-02-22 08:57:09 INFO (MainThread) [custom_components.mlgw.gateway] Connected to ML CLI: 192.168.1.210
2021-02-22 08:57:09 INFO (MainThread) [custom_components.mlgw.gateway] Trying to connect to MLGW
2021-02-22 08:57:09 DEBUG (MainThread) [custom_components.mlgw.gateway] mlgw: >SENT: Ping: [No payload]
2021-02-22 08:57:09 DEBUG (Thread-9) [custom_components.mlgw.gateway] mlgw: Msg type: Pong. Payload: [No payload]
2021-02-22 08:57:10 INFO (MainThread) [custom_components.mlgw.gateway] Opened connection to ML Gateway to 192.168.1.210 port: 9000
2021-02-22 08:57:10 DEBUG (MainThread) [custom_components.mlgw.gateway] mlgw: >SENT: Beo4 Command: MLN=1 0x01 <all>
2021-02-22 08:57:10 DEBUG (Thread-8) [custom_components.mlgw.gateway] ML telegram: {'from_device': 'MLGW', 'to_device': 'VIDEO_MASTER', 'type': 'COMMAND', 'src_dest': 'NONE', 'orig_src': 'NONE', 'payload_type': 'MLGW_REMOTE_BEO4', 'payload_len': '5', 'payload': {'command': '<all>', 'dest_selector': 'Audio Source'}, 'timestamp': '2021-02-22T08:57:10.340000', 'bytes': 'c0f0010a00000020050200010000ff'}
2021-02-22 08:57:11 DEBUG (MainThread) [custom_components.mlgw.gateway] mlgw: >SENT: Beo4 Command: MLN=4 0x01 <all>
2021-02-22 08:57:11 DEBUG (Thread-8) [custom_components.mlgw.gateway] ML telegram: {'from_device': 'MLGW', 'to_device': '0x6', 'type': 'COMMAND', 'src_dest': 'NONE', 'orig_src': 'NONE', 'payload_type': 'MLGW_REMOTE_BEO4', 'payload_len': '5', 'payload': {'command': '<all>', 'dest_selector': 'Audio Source'}, 'timestamp': '2021-02-22T08:57:11.343000', 'bytes': '06f0010a00000020050200010000ff'}
2021-02-22 08:57:12 DEBUG (MainThread) [custom_components.mlgw.gateway] mlgw: >SENT: Beo4 Command: MLN=6 0x01 <all>
2021-02-22 08:57:12 DEBUG (Thread-8) [custom_components.mlgw.gateway] ML telegram: {'from_device': 'MLGW', 'to_device': '0x2', 'type': 'COMMAND', 'src_dest': 'NONE', 'orig_src': 'NONE', 'payload_type': 'MLGW_REMOTE_BEO4', 'payload_len': '5', 'payload': {'command': '<all>', 'dest_selector': 'Audio Source'}, 'timestamp': '2021-02-22T08:57:12.343000', 'bytes': '02f0010a00000020050200010000ff'}
2021-02-22 08:57:13 DEBUG (MainThread) [custom_components.mlgw.gateway] mlgw: >SENT: Beo4 Command: MLN=5 0x01 <all>
2021-02-22 08:57:13 DEBUG (Thread-8) [custom_components.mlgw.gateway] ML telegram: {'from_device': 'MLGW', 'to_device': '0xc', 'type': 'COMMAND', 'src_dest': 'NONE', 'orig_src': 'NONE', 'payload_type': 'MLGW_REMOTE_BEO4', 'payload_len': '5', 'payload': {'command': '<all>', 'dest_selector': 'Audio Source'}, 'timestamp': '2021-02-22T08:57:13.348000', 'bytes': '0cf0010a00000020050200010000ff'}
2021-02-22 08:57:14 DEBUG (MainThread) [custom_components.mlgw.gateway] mlgw: >SENT: Beo4 Command: MLN=2 0x01 <all>
2021-02-22 08:57:14 DEBUG (Thread-8) [custom_components.mlgw.gateway] ML telegram: {'from_device': 'MLGW', 'to_device': '0x3', 'type': 'COMMAND', 'src_dest': 'NONE', 'orig_src': 'NONE', 'payload_type': 'MLGW_REMOTE_BEO4', 'payload_len': '5', 'payload': {'command': '<all>', 'dest_selector': 'Audio Source'}, 'timestamp': '2021-02-22T08:57:14.351000', 'bytes': '03f0010a00000020050200010000ff'}
2021-02-22 08:57:14 DEBUG (Thread-8) [custom_components.mlgw.gateway] ML telegram: {'from_device': '0x3', 'to_device': 'ALL', 'type': 'REQUEST', 'src_dest': 'NONE', 'orig_src': 'NONE', 'payload_type': 'LOCK_MANAGER_COMMAND', 'payload_len': '1', 'payload': {'subtype': 'Request Key'}, 'timestamp': '2021-02-22T08:57:14.527000', 'bytes': '8003010b0000005c010101'}
2021-02-22 08:57:14 DEBUG (Thread-8) [custom_components.mlgw.gateway] ML telegram: {'from_device': '0x2', 'to_device': '0x3', 'type': 'RESPONSE', 'src_dest': 'NONE', 'orig_src': 'NONE', 'payload_type': 'LOCK_MANAGER_COMMAND', 'payload_len': '1', 'payload': {'subtype': 'Transfter Key'}, 'timestamp': '2021-02-22T08:57:14.553000', 'bytes': '030201140000005c010201'}
2021-02-22 08:57:14 DEBUG (Thread-8) [custom_components.mlgw.gateway] ML telegram: {'from_device': '0x3', 'to_device': '0x2', 'type': 'COMMAND', 'src_dest': 'NONE', 'orig_src': 'NONE', 'payload_type': 'LOCK_MANAGER_COMMAND', 'payload_len': '1', 'payload': {'subtype': 'Key Received'}, 'timestamp': '2021-02-22T08:57:14.576000', 'bytes': '0203010a0000005c010401'}
2021-02-22 08:57:15 DEBUG (MainThread) [custom_components.mlgw.gateway] mlgw: >SENT: Beo4 Command: MLN=3 0x01 <all>
2021-02-22 08:57:15 DEBUG (Thread-8) [custom_components.mlgw.gateway] ML telegram: {'from_device': 'MLGW', 'to_device': '0x4', 'type': 'COMMAND', 'src_dest': 'NONE', 'orig_src': 'NONE', 'payload_type': 'MLGW_REMOTE_BEO4', 'payload_len': '5', 'payload': {'command': '<all>', 'dest_selector': 'Audio Source'}, 'timestamp': '2021-02-22T08:57:15.353000', 'bytes': '04f0010a00000020050200010000ff'}
2021-02-22 08:57:15 DEBUG (Thread-8) [custom_components.mlgw.gateway] ML telegram: {'from_device': '0x4', 'to_device': 'ALL', 'type': 'REQUEST', 'src_dest': 'NONE', 'orig_src': 'NONE', 'payload_type': 'LOCK_MANAGER_COMMAND', 'payload_len': '1', 'payload': {'subtype': 'Request Key'}, 'timestamp': '2021-02-22T08:57:15.525000', 'bytes': '8004010b0000005c010101'}
2021-02-22 08:57:15 DEBUG (Thread-8) [custom_components.mlgw.gateway] ML telegram: {'from_device': '0x3', 'to_device': '0x4', 'type': 'RESPONSE', 'src_dest': 'NONE', 'orig_src': 'NONE', 'payload_type': 'LOCK_MANAGER_COMMAND', 'payload_len': '1', 'payload': {'subtype': 'Transfter Key'}, 'timestamp': '2021-02-22T08:57:15.553000', 'bytes': '040301140000005c010201'}
2021-02-22 08:57:15 DEBUG (Thread-8) [custom_components.mlgw.gateway] ML telegram: {'from_device': '0x4', 'to_device': '0x3', 'type': 'COMMAND', 'src_dest': 'NONE', 'orig_src': 'NONE', 'payload_type': 'LOCK_MANAGER_COMMAND', 'payload_len': '1', 'payload': {'subtype': 'Key Received'}, 'timestamp': '2021-02-22T08:57:15.577000', 'bytes': '0304010a0000005c010401'}
2021-02-22 08:57:16 INFO (SyncWorker_14) [custom_components.mlgw.media_player] ML LOG returned ML id VIDEO_MASTER for MLN 1
2021-02-22 08:57:16 INFO (SyncWorker_14) [custom_components.mlgw.media_player] ML LOG returned ML id 0x6 for MLN 4
2021-02-22 08:57:16 INFO (SyncWorker_19) [custom_components.mlgw.media_player] ML LOG returned ML id 0x2 for MLN 6
2021-02-22 08:57:16 INFO (SyncWorker_14) [custom_components.mlgw.media_player] ML LOG returned ML id 0xc for MLN 5
2021-02-22 08:57:16 INFO (SyncWorker_9) [custom_components.mlgw.media_player] ML LOG returned ML id 0x3 for MLN 2
2021-02-22 08:57:16 INFO (SyncWorker_10) [custom_components.mlgw.media_player] ML LOG returned ML id 0x4 for MLN 3
2021-02-22 08:57:26 INFO (MainThread) [custom_components.mlgw.media_player] got back the ml Ids
2021-02-22 09:07:10 DEBUG (Thread-9) [custom_components.mlgw.gateway] mlgw: >SENT: Ping: [No payload]
2021-02-22 09:07:11 DEBUG (Thread-9) [custom_components.mlgw.gateway] mlgw: Msg type: Pong. Payload: [No payload]

Everything works correctly with manual configuration …

can you please send me the mlgwpservices.json file that you downloaded the other day? it’s not finding compatible sources and we need to patch the code.
thank you.

Hi Giovanni

as wished …

Best regards
Lutz

{"timestamp":1613486237,"port":9000,"sn":"25264041","project":"BLGW","installer":{"name":"Lutz","contact":"@Lutz"},"version":2,"location":{"centerlat":47.2,"centerlon":8.4667,"radius":0},"zones":[{"name":"Home","number":240,"scenes":[],"products":[],"cameras":[]},{"name":"Wohnbereich","number":1,"scenes":[],"products":[{"MLN":1,"name":"Beovision 10 (Master)","Beo4NavButton":true,"sources":[{"name":"TV","selectID":128,"selectCmds":[{"format":"F0","unit":0,"cmd":128}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"8.10","channels":[{"icon":"http:\/\/mlgw.bang-olufsen.dk\/BeoHome\/Images\/Logos\/TV%20Channels\/ARD%20HD.bmp","name":"ARD","selectSEQ":[1,53]},{"icon":"http:\/\/mlgw.bang-olufsen.dk\/BeoHome\/Images\/Logos\/TV%20Channels\/Zdf.bmp","name":"ZDF","selectSEQ":[2,53]},{"icon":"http:\/\/mlgw.bang-olufsen.dk\/BeoHome\/Images\/Logos\/TV%20Channels\/Rtl.bmp","name":"RTL","selectSEQ":[3,53]},{"icon":"http:\/\/mlgw.bang-olufsen.dk\/BeoHome\/Images\/Logos\/TV%20Channels\/Sat1%20Ch.bmp","name":"SAT1","selectSEQ":[4,53]},{"icon":"http:\/\/mlgw.bang-olufsen.dk\/BeoHome\/Images\/Logos\/TV%20Channels\/Pro7%20Hd.bmp","name":"PRO7","selectSEQ":[5,53]},{"icon":"http:\/\/mlgw.bang-olufsen.dk\/BeoHome\/Images\/Logos\/TV%20Channels\/Kabel%20Eins%20Austria%20Hd.Bmp","name":"Kabel1","selectSEQ":[6,53]},{"icon":"http:\/\/mlgw.bang-olufsen.dk\/BeoHome\/Images\/Logos\/TV%20Channels\/Rtl2%20Hd.bmp","name":"RTL2","selectSEQ":[7,53]},{"icon":"http:\/\/mlgw.bang-olufsen.dk\/BeoHome\/Images\/Logos\/TV%20Channels\/Vox.bmp","name":"VOX","selectSEQ":[8,53]}],"sourceId":"","sourceType":""},{"name":"Apple","selectID":138,"selectCmds":[{"format":"F0","unit":0,"cmd":138}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"8.10","sourceId":"","sourceType":""},{"name":"Radio","selectID":129,"selectCmds":[{"format":"F0","unit":0,"cmd":129}],"destination":1,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"10.0","channels":[{"icon":"http:\/\/mlgw.bang-olufsen.dk\/BeoHome\/Images\/Logos\/TV%20Channels\/Sfr.bmp","name":"SRF3","selectSEQ":[1,53]},{"icon":"http:\/\/mlgw.bang-olufsen.dk\/BeoHome\/Images\/Logos\/Radio%20Stations\/Swr%203.bmp","name":"SWR3","selectSEQ":[2,53]},{"icon":"http:\/\/mlgw.bang-olufsen.dk\/BeoHome\/Images\/Logos\/Radio%20Stations\/Hitradio%20Z.bmp","name":"Hitradio","selectSEQ":[3,53]}],"sourceId":"","sourceType":""},{"name":"Deezer","selectID":146,"selectCmds":[{"format":"F0","unit":0,"cmd":146}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"9.0","bcpHost":"","sourceId":"","sourceType":""},{"name":"LineIn","selectID":131,"selectCmds":[{"format":"F0","unit":0,"cmd":131}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"8.10","sourceId":"","sourceType":""},{"name":"AP A-Aux","selectID":145,"selectCmds":[{"format":"F0","unit":0,"cmd":145}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"8.10","sourceId":"","sourceType":""}]},{"MLN":21,"sn":"24473052","name":"BeoSound Moment 24473052","Beo4NavButton":true,"sources":[{"name":"TuneIn","selectCmds":[{"format":"F20","unit":0,"cmd":129}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":false,"uiType":"10.0","sourceId":"radio:[email protected]","sourceType":"TUNEIN"},{"name":"PatternPlay","selectCmds":[{"format":"F20","unit":1,"cmd":211}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":false,"uiType":"0.2","sourceId":"patternplay:[email protected]","sourceType":"PATTERNPLAY"},{"name":"Line-In","selectCmds":[{"format":"F20","unit":0,"cmd":131}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":false,"uiType":"0.2","sourceId":"linein:[email protected]","sourceType":"LINE IN"},{"name":"Music stream","selectCmds":[{"format":"F20","unit":1,"cmd":132}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":false,"uiType":"0.2","sourceId":"dlna:[email protected]","sourceType":"DLNA_DMR"},{"name":"QPlay","selectCmds":[{"format":"F20","unit":2,"cmd":150}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":false,"uiType":"0.0","sourceId":"qplay:[email protected]","sourceType":"QPLAY"},{"name":"Bluetooth","selectCmds":[{"format":"F20","unit":2,"cmd":131}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":false,"uiType":"0.0","sourceId":"bluetooth:[email protected]","sourceType":"BLUETOOTH"},{"name":"Music","selectCmds":[{"format":"F20","unit":0,"cmd":145}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":false,"uiType":"9.0","sourceId":"music:[email protected]","sourceType":"MUSIC"}]}],"cameras":[]},{"name":"Arbeitszimmer","number":2,"scenes":[],"products":[{"MLN":4,"name":"Beovision 7","Beo4NavButton":false,"sources":[{"name":"TV","selectID":128,"selectCmds":[{"format":"F0","unit":0,"cmd":128}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"8.10","sourceId":"","sourceType":""},{"name":"DTV","selectID":138,"selectCmds":[{"format":"F0","unit":0,"cmd":138}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"8.10","sourceId":"","sourceType":""},{"name":"DVD","selectID":134,"selectCmds":[{"format":"F0","unit":0,"cmd":134}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"8.10","sourceId":"","sourceType":""},{"name":"Radio","selectID":129,"selectCmds":[{"format":"F0","unit":0,"cmd":129}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"10.0","sourceId":"","sourceType":""},{"name":"Deezer","selectID":146,"selectCmds":[{"format":"F0","unit":0,"cmd":146}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"9.0","bcpHost":"","sourceId":"","sourceType":""},{"name":"AP A-AUX","selectID":145,"selectCmds":[{"format":"F0","unit":0,"cmd":145}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"8.10","sourceId":"","sourceType":""},{"name":"Join","selectID":151,"selectCmds":[{"format":"F0","unit":0,"cmd":151}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"8.10","sourceId":"","sourceType":""},{"name":"Apple","selectID":133,"selectCmds":[{"format":"F0","unit":0,"cmd":133}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.2","sourceId":"","sourceType":""},{"name":"LineIn","selectID":131,"selectCmds":[{"format":"F0","unit":0,"cmd":131}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.2","sourceId":"","sourceType":""}]}],"cameras":[]},{"name":"Bad","number":3,"scenes":[],"products":[{"MLN":6,"name":"Beosound 2500 Bad","Beo4NavButton":false,"sources":[{"name":"Radio","selectID":129,"selectCmds":[{"format":"F0","unit":0,"cmd":129}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.0","sourceId":"","sourceType":""},{"name":"Deezer","selectID":146,"selectCmds":[{"format":"F0","unit":0,"cmd":146}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.0","sourceId":"","sourceType":""},{"name":"Join","selectID":151,"selectCmds":[{"format":"F0","unit":0,"cmd":151}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.0","sourceId":"","sourceType":""},{"name":"Pattern","selectID":145,"selectCmds":[{"format":"F0","unit":0,"cmd":145}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.0","sourceId":"","sourceType":""},{"name":"LineIn","selectID":131,"selectCmds":[{"format":"F0","unit":0,"cmd":131}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.2","sourceId":"","sourceType":""}]}],"cameras":[]},{"name":"Schlafzimmer","number":4,"scenes":[],"products":[{"MLN":5,"name":"Beovision 10 Schlafzimmer","Beo4NavButton":false,"sources":[{"name":"TV","selectID":128,"selectCmds":[{"format":"F0","unit":0,"cmd":128}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.2","sourceId":"","sourceType":""},{"name":"Apple","selectID":138,"selectCmds":[{"format":"F0","unit":0,"cmd":138}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.2","sourceId":"","sourceType":""},{"name":"Radio","selectID":129,"selectCmds":[{"format":"F0","unit":0,"cmd":129}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"10.0","sourceId":"","sourceType":""},{"name":"Deezer","selectID":146,"selectCmds":[{"format":"F0","unit":0,"cmd":146}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"9.0","bcpHost":"","sourceId":"","sourceType":""},{"name":"AP A-Aux","selectID":145,"selectCmds":[{"format":"F0","unit":0,"cmd":145}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.2","sourceId":"","sourceType":""}]}],"cameras":[]},{"name":"Essen","number":5,"scenes":[],"products":[{"MLN":2,"name":"Beosound 3500 Wohnzimmer","Beo4NavButton":false,"sources":[{"name":"Radio","selectID":129,"selectCmds":[{"format":"F0","unit":0,"cmd":129}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"8.10","sourceId":"","sourceType":""},{"name":"Deezer","selectID":146,"selectCmds":[{"format":"F0","unit":0,"cmd":146}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"8.10","sourceId":"","sourceType":""},{"name":"Join","selectID":151,"selectCmds":[{"format":"F0","unit":0,"cmd":151}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"8.10","sourceId":"","sourceType":""},{"name":"AP A-AUX","selectID":145,"selectCmds":[{"format":"F0","unit":0,"cmd":145}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"8.10","sourceId":"","sourceType":""},{"name":"LineIn","selectID":131,"selectCmds":[{"format":"F0","unit":0,"cmd":131}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"8.10","sourceId":"","sourceType":""}]}],"cameras":[]},{"name":"Küche","number":6,"scenes":[],"products":[{"MLN":3,"name":"Beosound 2500 Küche","Beo4NavButton":false,"sources":[{"name":"Radio","selectID":129,"selectCmds":[{"format":"F0","unit":0,"cmd":129}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.0","sourceId":"","sourceType":""},{"name":"Deezer","selectID":146,"selectCmds":[{"format":"F0","unit":0,"cmd":146}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.0","sourceId":"","sourceType":""},{"name":"Join","selectID":151,"selectCmds":[{"format":"F0","unit":0,"cmd":151}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.0","sourceId":"","sourceType":""},{"name":"AP A-Aux","selectID":145,"selectCmds":[{"format":"F0","unit":0,"cmd":145}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.0","sourceId":"","sourceType":""},{"name":"LineIn","selectID":131,"selectCmds":[{"format":"F0","unit":0,"cmd":131}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.2","sourceId":"","sourceType":""}]}],"cameras":[]},{"name":"Beleuchtung","number":7,"scenes":[],"products":[],"cameras":[]},{"name":"Funktionen","number":8,"scenes":[],"products":[],"cameras":[]},{"name":"Balkon","number":9,"scenes":[{"button":22,"name":"Brunnen AN","hints":{"compact":true}},{"button":21,"name":"Planzen AN","hints":{"compact":true}},{"button":27,"name":"Leiser","hints":{"compact":true}},{"button":28,"name":"Lauter","hints":{"compact":true}}],"products":[],"cameras":[]},{"name":"Lichtgruppen","number":10,"scenes":[],"products":[],"cameras":[]},{"name":"Events für Steuerung","number":11,"scenes":[],"products":[],"cameras":[]},{"name":"Timer","number":12,"scenes":[],"products":[],"cameras":[]},{"name":"ZZ","number":13,"scenes":[{"button":9,"name":"zuHause","hints":{}},{"button":10,"name":"AusserHaus","hints":{}},{"button":15,"name":"Toggle","hints":{}}],"products":[],"cameras":[]},{"name":"Allgemein","number":14,"scenes":[],"products":[],"cameras":[]},{"name":"01-Panel","number":15,"scenes":[{"button":5,"name":"Controller 1","hints":{"compact":true}},{"button":6,"name":"Controller 2","hints":{"compact":true}},{"button":23,"name":"Rollos AB","hints":{"compact":true,"onShadeView":true}},{"button":24,"name":"Rollos AUF","hints":{"compact":true,"onShadeView":true}},{"button":25,"name":"Storen AB","hints":{"compact":true,"onShadeView":true}},{"button":26,"name":"Storen AUF","hints":{"compact":true,"onShadeView":true}},{"button":50,"name":"Stromausfall","hints":{}},{"button":101,"name":"Alles","hints":{}},{"button":102,"name":"Wohnbereich","hints":{}},{"button":103,"name":"Gästebereich","hints":{}},{"button":104,"name":"Schlafbereich","hints":{}},{"button":105,"name":"Balkon","hints":{}},{"button":106,"name":"Küche","hints":{}},{"button":111,"name":"Rollos Schlafzimmer","hints":{}},{"button":112,"name":"Storen Balkon","hints":{}}],"products":[],"cameras":[]},{"name":"00-Status","number":16,"scenes":[{"button":13,"name":"Haustür","hints":{"compact":true}},{"button":16,"name":"Bakontür Küche","hints":{"compact":true}},{"button":17,"name":"Bakontür Wohnen","hints":{"compact":true}},{"button":14,"name":"Balkontür Arbeit","hints":{"compact":true}},{"button":7,"name":"zu Hause","hints":{}},{"button":19,"name":"Verbraucher","hints":{"compact":true}},{"button":18,"name":"Beleuchtung","hints":{"compact":true}},{"button":1,"name":"Urlaubmodus","hints":{"compact":true}},{"button":29,"name":"Windalarm","hints":{"compact":true}},{"button":201,"name":"LM Offline","hints":{"compact":true}},{"button":202,"name":"HUE Offline","hints":{"compact":true}},{"button":20,"name":"HA Offline","hints":{}}],"products":[],"cameras":[]},{"name":"ZZ_Var","number":17,"scenes":[],"products":[],"cameras":[]},{"name":"Gästebad","number":18,"scenes":[],"products":[{"MLN":22,"sn":"26582609","name":"BeoSound 1","Beo4NavButton":true,"sources":[{"name":"Spotify","selectCmds":[{"format":"F20","unit":0,"cmd":150}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":false,"uiType":"0.0","sourceId":"spotify:[email protected]","sourceType":"SPOTIFY"},{"name":"TuneIn","selectCmds":[{"format":"F20","unit":0,"cmd":129}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":false,"uiType":"10.0","channels":[{"icon":"http:\/\/mlgw.bang-olufsen.dk\/BeoHome\/Images\/Logos\/TV%20Channels\/Sfr.bmp","name":"SRF3","selectSEQ":[1,53]},{"icon":"http:\/\/mlgw.bang-olufsen.dk\/BeoHome\/Images\/Logos\/Radio%20Stations\/Swr%203.bmp","name":"SWR3","selectSEQ":[2,53]},{"icon":"http:\/\/mlgw.bang-olufsen.dk\/BeoHome\/Images\/Logos\/Radio%20Stations\/Hitradio%20Z.bmp","name":"Hitradio","selectSEQ":[3,53]}],"sourceId":"radio:[email protected]","sourceType":"TUNEIN"},{"name":"QPlay","selectCmds":[{"format":"F20","unit":2,"cmd":150}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":false,"uiType":"0.0","sourceId":"qplay:[email protected]","sourceType":"QPLAY"},{"name":"Bluetooth","selectCmds":[{"format":"F20","unit":2,"cmd":131}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":false,"uiType":"0.0","sourceId":"bluetooth:[email protected]","sourceType":"BLUETOOTH"},{"name":"Music","selectCmds":[{"format":"F20","unit":0,"cmd":145}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":false,"uiType":"9.0","sourceId":"music:[email protected]","sourceType":"MUSIC"},{"name":"AirPlay","selectCmds":[{"format":"F20","unit":2,"cmd":148}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":false,"uiType":"0.0","sourceId":"airplay:[email protected]","sourceType":"AIRPLAY"},{"name":"Deezer","selectCmds":[{"format":"F20","unit":1,"cmd":150}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":false,"uiType":"9.0","sourceId":"deezer:[email protected]","sourceType":"DEEZER"},{"name":"Music stream","selectCmds":[{"format":"F20","unit":1,"cmd":132}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":false,"uiType":"0.2","sourceId":"dlna:[email protected]","sourceType":"DLNA_DMR"},{"name":"Chromecast built-in","selectCmds":[{"format":"F0","unit":0,"cmd":0}],"destination":0,"secondary":0,"statusID":0,"format":"F0","networkBit":false,"uiType":"0.0","sourceId":"googlecast:[email protected]","sourceType":"GC4A"},{"name":"LineIn BLC","selectID":145,"selectCmds":[{"format":"F0","unit":0,"cmd":145}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.2","sourceId":"","sourceType":""},{"name":"Join","selectID":151,"selectCmds":[{"format":"F0","unit":0,"cmd":151}],"destination":0,"secondary":0,"statusID":0,"format":"F0","link":0,"uiType":"0.2","sourceId":"","sourceType":""},{"name":"TV","selectCmds":[{"format":"F20","unit":0,"cmd":128}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":true,"uiType":"0.2","sourceId":"TV:[email protected]","sourceType":"TV"},{"name":"V.MEM","selectCmds":[{"format":"F20","unit":1,"cmd":133}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":true,"uiType":"0.2","sourceId":"VTR:[email protected]","sourceType":"RECORDINGS"},{"name":"DVD2","selectCmds":[{"format":"F20","unit":0,"cmd":168}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":true,"uiType":"0.2","sourceId":"VTR2:[email protected]","sourceType":"DVD2"},{"name":"DTV","selectCmds":[{"format":"F20","unit":0,"cmd":138}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":true,"uiType":"0.2","sourceId":"V_SAT:[email protected]","sourceType":"DTV"},{"name":"DVD","selectCmds":[{"format":"F20","unit":0,"cmd":134}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":true,"uiType":"0.2","sourceId":"CDV:[email protected]","sourceType":"DVD"},{"name":"DTV2","selectCmds":[{"format":"F20","unit":1,"cmd":130}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":true,"uiType":"0.2","sourceId":"AUX_V:[email protected]","sourceType":"DTV2"},{"name":"CAMERA","selectCmds":[{"format":"F20","unit":0,"cmd":135}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":true,"uiType":"0.2","sourceId":"CAMCORDER:[email protected]","sourceType":"CAMERA"},{"name":"V.AUX2","selectCmds":[{"format":"F20","unit":0,"cmd":141}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":true,"uiType":"0.2","sourceId":"DOORCAMERA:[email protected]","sourceType":"V.AUX2"},{"name":"PC","selectCmds":[{"format":"F20","unit":0,"cmd":139}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":true,"uiType":"0.2","sourceId":"PC:[email protected]","sourceType":"PC"},{"name":"LINE IN","selectCmds":[{"format":"F20","unit":0,"cmd":131}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":true,"uiType":"0.2","sourceId":"LineIn:[email protected]","sourceType":"LINE IN"},{"name":"TuneIn","selectCmds":[{"format":"F20","unit":0,"cmd":129}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":true,"uiType":"10.0","sourceId":"radio:[email protected]","sourceType":"TUNEIN"},{"name":"PatternPlay","selectCmds":[{"format":"F20","unit":1,"cmd":211}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":true,"uiType":"0.2","sourceId":"patternplay:[email protected]","sourceType":"PATTERNPLAY"},{"name":"QPlay","selectCmds":[{"format":"F20","unit":2,"cmd":150}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":true,"uiType":"0.0","sourceId":"qplay:[email protected]","sourceType":"QPLAY"},{"name":"Bluetooth","selectCmds":[{"format":"F20","unit":2,"cmd":131}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":true,"uiType":"0.0","sourceId":"bluetooth:[email protected]","sourceType":"BLUETOOTH"},{"name":"Music","selectCmds":[{"format":"F20","unit":0,"cmd":145}],"destination":0,"secondary":0,"statusID":0,"format":"F20","networkBit":true,"uiType":"9.0","sourceId":"music:[email protected]","sourceType":"MUSIC"}]}],"cameras":[]},{"name":"00","number":19,"scenes":[],"products":[],"cameras":[]}]}

Ok @lutzha I did make a bunch of changes that should support your use case. Please check out the latest code and let me know!

Good morning Giovanni

it works perfectly!!! Thank you very much for that great package.

Best regards
Lutz

1 Like

Hello does it work on hass.io?

Hi yes, it works. I am running hass.io.

Giovanni

Thanks :smiley: this is really cool :muscle:

1 Like

What am i doing wront ? A.MEM works like a charm, to turn on net radio
now i have made a script that press 2 x home on apple tv so you can close apps on a beo4 remote
The script is working and automation when i activate in hass.io but not on beo4
The automation look like this

alias: Apple TV Luk Apps
description: ‘’
trigger:

  • platform: event
    event_type: mlgw.ML_telegram
    event_data:
    payload_type: BEO4_KEY
    payload:
    source: TV
    command: Red
    condition: []
    action:
  • service: script.luk_apps
    data: {}
    mode: single

It’s hard to tell from the cut and paste. IT may be that the automation is not spelled out correctly. Have you tried to look at the events coming through to make sure your payload information is correct? Also are you sure the event gets fired?

Also source, command should be indented under payload. This works for me:

Hi :smiley:
My event looks like yours in hass.io except

Source is TV and command is Red :smiley:

How can i see if the beo4 event i fired :thinking:


Its funny than my A.MEM setup works and i Can turn on my my beovision 7 from hass dashboard.

By using the events listening tool in the developer section

Funny :slight_smile: When im on A.MEM and press TV this event happens:


But if i hit TV again this event happens:

and TV does not listen to digits or colors like A.MEM does

i just found out that it listen to the payload: “MLGW_REMOTE_BEO4” when i use the beolink app