# Broadlink service

**URL:** <https://community.gladysassistant.com/t/broadlink-service/7157>\
**Category:** Développement\
**Tags:** feature-integration\
**Created:** [April 6, 2022, 8:42am UTC](https://community.gladysassistant.com/t/broadlink-service/7157 "2022-04-06T08:42:35Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![AlexTrovato](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/alextrovato/32/10705_2.png) [@AlexTrovato](https://community.gladysassistant.com/u/AlexTrovato)\
**Post date:** [May 8, 2022, 8:11pm UTC](https://community.gladysassistant.com/t/broadlink-service/7157/41 "2022-05-08T20:11:25Z")

</div>

For the first part, the errors on the device, I opened an issue on the library’s GitHub

> <https://github.com/ThomasTavernier/node-broadlink/issues/4>
>
> Hello,
> when I call \`device.auth()\` on RM4 PRO, I get a 65535 error.
> 
> Source: …https://community.gladysassistant.com/t/broadlink-service/7157/40?u=alextrovato
> 
> Do you know what it means? How can I fix it?
> Google doesn't help me a lot.

As for the editing issue, I’ll take care of it 😉

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [May 8, 2022, 9:15pm UTC](https://community.gladysassistant.com/t/broadlink-service/7157/42 "2022-05-08T21:15:18Z")

</div>

Thanks.

As for the learning mode when adding a remote, no surprise, we also have an error, and the RM4 doesn’t work with it:

```auto
2022-05-08T23:08:57+0200 \u003cerror\u003e broadlink.learn.js:33 (BroadlinkHandler.learn) Broadlink fails to enter in learning mode on 83da3dae0bec device Error: 65529
    at Socket.\u003canonymous\u003e (/src/server/services/broadlink/node_modules/node-broadlink/dist/device.js:118:28)
    at Object.onceWrapper (events.js:520:26)
    at Socket.emit (events.js:400:28)
    at UDP.onMessage [as onmessage] (dgram.js:931:8)

```

We’ll wait for their feedback to know more and for the next tests ^^

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [May 8, 2022, 9:42pm UTC](https://community.gladysassistant.com/t/broadlink-service/7157/43 "2022-05-08T21:42:04Z")

</div>

Correction @AlexTrovato, il fallait modifier l’option «&nbsp;Lock device&nbsp;» dans les paramètres de l’application Broadlink.

Donc plus d’erreur sur le polling

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/a/aa82c13c663638042e6b2f77bce50d12a2dc5101.png)

Toutefois la température me parait étrange 🙂 ^^

Et l’édition de l’appareil RM4 Pro fonctionne maintenant bien :

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/8/8e5eb03f33132295508bd5bc1b3bb12f989f0ad2.png)

Concernant la création de la télécommande … sur mobile le bandeau haut fait un peu pâté (Samsung S21) :

 ![Screenshot_20220508-234745_Chrome](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/1/1a46d2d5cd6ea7c8359bee6776972abaa42ea33e.jpeg)

Sinon ça à l’air de bien marcher. Le mode apprentissage fonctionne bien et se valide bien !!

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/a/a2985b5d7ab57a6832644823049417ea872bf969.png)

Je poursuis demain ^^ Hâte ^^

**Edit :** Further feedback  
On the remote, if you switch to learning mode, press the wrong button and then want immediately after the end of the full learning to reprogram it, the «&nbsp;Capture signal&nbsp;» button does not appear and becomes «&nbsp;Next button in 3s&nbsp;» without counting down.

When saving the remote, is the «&nbsp;Done&nbsp;» button really necessary? The term doesn’t seem appropriate — maybe show this for 2/3 seconds before refreshing the page and automatically returning to the devices?

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/6/6bd8c5ca6ddbd5b3675228919f3fda503933d532.png)

On the Dashboard side, I echo Albenss’s message:

> [@Albenss](#):
>
> By the way, shouldn’t the On/Off button be a simple button?

Since the creation of features happens once you save, I suppose, if the «&nbsp;Turn off&nbsp;» and «&nbsp;Turn on&nbsp;» signals are the same, shouldn’t it indeed be a Push button? And if the buttons are different… how can you know if the TV is already on or off for the switch?? ^^

Maybe this is normal for now, but when adding «&nbsp;Room devices&nbsp;», I only have Power, Channels (number) and Volume (down and up).  
I don’t really understand why it’s a slider ^^ — you’re forced to click in the center then again on the left to decrease the volume by 0.5. Shouldn’t there be two Down and Up buttons like for a roller shutter, for example.

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/c/c3e3d463f4554360d26b0dba33ac648c0f05522f.png)

Will it be possible to add custom buttons?

Also, lots of good things, notably:

- The complete learning mode which works super well and is very handy; I checked in the inspector, everything was correctly recorded,
- The ability to rename the button (even if I don’t see the point at the moment because the display in the devices view remains the feature type and on the dashboard it’s the Device name that is shown ^^ A custom name + icon mode would be awesome even though I don’t see how you could do it simply (to save the icon)^^

End of tests for now:  
I tried to create a 2nd remote… and then it’s a disaster ^^ new page freeze requiring a forced refresh and a front-end error:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/b/ba81ce568eb1a7b06ad691c4bac1218c69d1997b.png)

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [May 9, 2022, 4:41am UTC](https://community.gladysassistant.com/t/broadlink-service/7157/44 "2022-05-09T04:41:50Z")

</div>

I tried deleting the 1st remote then the RM4 and recreating it, but it’s still the same, can’t recreate a new remote anymore?? What happened in between… no idea ^^

**Edit:** Ah apparently you’ll soon find out, GitHub crashed ^^ It must be related to your last change  
![image|690x

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [May 9, 2022, 7:12am UTC](https://community.gladysassistant.com/t/broadlink-service/7157/45 "2022-05-09T07:12:18Z")

</div>

@VonOx or @AlexTrovato,

Maybe a silly question? I opened ports 1443 and 1444 for TCP and UDP inbound and outbound on WSL. I change in the front the `localhost:1443` to my PC’s IP address `10.1.0.62:1443` and pinging the gateways via WSL works fine. Question: (I suppose it goes further than that) Why doesn’t it see the gateways? Are there other ports to open, or is it impossible or dangerous?

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [May 9, 2022, 7:40am UTC](https://community.gladysassistant.com/t/broadlink-service/7157/46 "2022-05-09T07:40:05Z")

</div>

Because the WSL network runs inside a VM, basically the VM itself is not visible on your local network

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [May 9, 2022, 7:45am UTC](https://community.gladysassistant.com/t/broadlink-service/7157/47 "2022-05-09T07:45:30Z")

</div>

This is what I understood from the literature I see online, but I can’t find anything about how to solve it. Is it a hardware limitation? Software? Deliberate and impossible to do otherwise? Because this issue is really limiting for development. How do business developers work around this? So no business development under WSL then? ^^ Sorry for my borderline off-topic questions here!!

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [May 9, 2022, 8:00am UTC](https://community.gladysassistant.com/t/broadlink-service/7157/48 "2022-05-09T08:00:25Z")

</div>

You need to configure WSL in bridge mode (not NAT)

In the Hyper-V Manager you need to edit the WSL switch to External network

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/4/4ff31ae11b766022115ace57c24bb55d9af55016.png)

Then on the WSL VM get an IP on your network.

```auto
sudo ip addr add 192.168.0.116/24 dev eth0
sudo ip addr flush dev eth0
sudo dhclient eth0

```

Edit: Here’s what it looks like on my WSL (looks OK)

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/2/2461ad60dcbb9a8610597c7387b257ec4f53efac.png)

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [May 9, 2022, 8:34am UTC](https://community.gladysassistant.com/t/broadlink-service/7157/49 "2022-05-09T08:34:54Z")

</div>

Awesome, it works like a charm!! In the end, once again, searching is an art!! I’m almost ashamed because I assume it’s easy to find with a search engine and yet I searched for hours before daring to ask.

Many thanks @VonOx. The gateway comes up fine 😍 😍

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [May 9, 2022, 8:38am UTC](https://community.gladysassistant.com/t/broadlink-service/7157/50 "2022-05-09T08:38:44Z")

</div>

Yeah, though it’s not persistent, and be careful with DNS resolution

I’ll try to script this to make the developers’ job easier under WSL.

Infos here =\> [https://stackoverflow.com/a/64217350](https://stackoverflow.com/a/64217350)  
Static IP =\> [WSL2 Set static ip? · Issue #4210 · microsoft/WSL · GitHub](https://github.com/microsoft/WSL/issues/4210#issuecomment-903234426)

---

<div class="post-metadata">

**Author:** ![damalgos](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/d/e274bd/32.png) [@damalgos](https://community.gladysassistant.com/u/damalgos)\
**Post date:** [May 9, 2022, 9:47am UTC](https://community.gladysassistant.com/t/broadlink-service/7157/51 "2022-05-09T09:47:03Z")

</div>

Hey,

Quick question, I’d actually like to buy a Broad

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [May 9, 2022, 9:50am UTC](https://community.gladysassistant.com/t/broadlink-service/7157/52 "2022-05-09T09:50:14Z")

</div>

I got the RM4 Pro because it also does RF433. I was able to test it with my gate remote, it works perfectly (not yet in Gladys, though, on the Broadlink App for now). And the range too, which is very important to me!!

**Edit** : I should say just «&nbsp;RF&nbsp;» because it handles several frequencies!!

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/8/8e9bddea3ce2b12315d552cf5624a5ae0f91a242.png)

---

<div class="post-metadata">

**Author:** ![AlexTrovato](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/alextrovato/32/10705_2.png) [@AlexTrovato](https://community.gladysassistant.com/u/AlexTrovato)\
**Post date:** [May 9, 2022, 7:03pm UTC](https://community.gladysassistant.com/t/broadlink-service/7157/53 "2022-05-09T19:03:37Z")

</div>

I note:

- add a help message when a locked device is detected
- remove the sensors on the RM (doesn’t work for me either — 126°C, I suspect that’s a lie)
- review the mobile display (however, it seems difficult to make the entire learning part compatible with mobile mode)
- bug on the «&nbsp;capture&nbsp;» button after learning mode
- remove the «&nbsp;success&nbsp;» page (indeed, not necessarily useful)

* * *

Regarding

> [@Albenss](#):
>
> By the way, shouldn’t the On/Off button be a simple button?

I think he wasn’t talking about the dashboard, but about editing the remote control.  
I was explicitly asked to be able to capture the ON signal separately from the OFF button, because there are some models where these buttons are distinct.

* * *

For the dashboard, I don’t want to mix the Broadlink-specific part with the common Gladys part.

- On/Off button: indeed, the state isn’t necessarily correct
  - We should consider a «&nbsp;remote control&nbsp;» box with push buttons

- Volume: in reality, if you open your favorite audio or video player on your computer, you’ll get a slider
- Others: not all buttons are available on the dashboard
  - We should consider a «&nbsp;remote control&nbsp;» box with push buttons

If you have design ideas for a box on the dashboard, feel free to share them.

* * *

On the positives:

- thanks for the learning mode, I found it indispensable given the multitude of buttons on a remote control
- setting a name on a button, to consider voice control with Google Home on Gladys Plus 😉

* * *

> [@Terdious](#):
>
> Ah, it looks like you’ll find out quickly — the github crashed ^^ It must be related to your last change

Ah darn, if you use my branch directly you’ll get out of sync, because I rewrote the Git history on my branch. You’ll need to do (assuming `upstream` is the URL of my repo, otherwise replace with `origin`)

```bash
git fetch upstream # to update the history
git reset --hard upstream/broadlink # to overwrite your local version with the remote version

```

I often rewrite Git history because I usually work alone on a branch, and rewriting allows me to limit the number of commits, stay up to date with the latest Gladys version, and fix some typos in my Git comments…

* * *

In any case, thanks for all these remarks, I’ve noted the actions on [https://github.com/atrovato/Gladys/projects/7](https://github.com/atrovato/Gladys/projects/7) (I don’t know if it’s public).

I’ll address the points one by one, at my own pace, and I’ll get back to you once a new image is available.

Don’t hesitate to give more feedback while the iron is hot 😉

---

<div class="post-metadata">

**Author:** ![spenceur](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/spenceur/32/1961_2.png) [@spenceur](https://community.gladysassistant.com/u/spenceur)\
**Post date:** [May 9, 2022, 8:27pm UTC](https://community.gladysassistant.com/t/broadlink-service/7157/54 "2022-05-09T20:27:48Z")

</div>

In v3 we had done something like this :  
[https://community.gladysassistant.com/t/integration-api-television-dans-gladys/3358/40?u=spenceur](https://community.gladysassistant.com/t/integration-api-television-dans-gladys/3358/40?u=spenceur)

Maybe you can take inspiration from it and certainly improve it 😉

---

<div class="post-metadata">

**Author:** ![b3n.0](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/b3n.0/32/3458_2.png) [@b3n.0](https://community.gladysassistant.com/u/b3n.0)\
**Post date:** [May 12, 2022, 5:14pm UTC](https://community.gladysassistant.com/t/broadlink-service/7157/55 "2022-05-12T17:14:43Z")

</div>

Hello,

I’m up for testing. I have

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [May 12, 2022, 9:03pm UTC](https://community.gladysassistant.com/t/broadlink-service/7157/56 "2022-05-12T21:03:34Z")

</div>

Hello,

The docker pull command downloads the Gladys image with the broadling service currently under development by @atrovato

Then you need to create a Gladys container in Docker using that image

---

<div class="post-metadata">

**Author:** ![b3n.0](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/b3n.0/32/3458_2.png) [@b3n.0](https://community.gladysassistant.com/u/b3n.0)\
**Post date:** [May 14, 2022, 3:40pm UTC](https://community.gladysassistant.com/t/broadlink-service/7157/57 "2022-05-14T15:40:11Z")

</div>

Hello,

So in PuTTY, I typed

```auto
docker pull atrovato/gladys:broadlink
broadlink: Pulling from atrovato/gladys

```

then

```auto
docker run atrovato/gladys:broadlink

```

and should it appear directly in the web interface?  
I don’t see anything else… does it show up in Integrations?

---

<div class="post-metadata">

**Author:** ![b3n.0](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/b3n.0/32/3458_2.png) [@b3n.0](https://community.gladysassistant.com/u/b3n.0)\
**Post date:** [May 14, 2022, 4:50pm UTC](https://community.gladysassistant.com/t/broadlink-service/7157/58 "2022-05-14T16:50:20Z")

</div>

I used @Terdious’s post to restart the install :

> [@Terdious](#):
>
> Commands run :

So a chain of ‹&nbsp;stop&nbsp;› ‹&nbsp;rm&nbsp;› ‹&nbsp;rmi&nbsp;› ‹&nbsp;pull&nbsp;› and ‹&nbsp;run&nbsp;›

Docker ps tells me it’s running…

however nothing more in the integration menu…

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [May 14, 2022, 5:54pm UTC](https://community.gladysassistant.com/t/broadlink-service/7157/59 "2022-05-14T17:54:50Z")

</div>

This is another instance of Gladys; if you used @Terdious’s command, this instance is on port 84

---

<div class="post-metadata">

**Author:** ![AlexTrovato](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/alextrovato/32/10705_2.png) [@AlexTrovato](https://community.gladysassistant.com/u/AlexTrovato)\
**Post date:** [May 14, 2022, 6:09pm UTC](https://community.gladysassistant.com/t/broadlink-service/7157/61 "2022-05-14T18:09:58Z")

</div>

Hi,  
you should rely on the documentation to run a test image.

> **[Installation avec Docker | Gladys Assistant](https://gladysassistant.com/fr/docs/installation/docker/)**
>
> Ce tutoriel vous explique comment installer Gladys manuellement avec Docker, quelle que soit la machine sur laquelle vous faites fonctionner Gladys.

By replacing the official image name `gladysassistant/gladys:v4` with the one you want to test, here mine `atrovato/gladys:broadlink`.

* * *

For your problem

> [@b3n.0](#):
>
> however nothing else in the integrations menu…

Look in the browser developer console (press F12 on the keyboard); there should be an error.

* * *

For the record, I think I’ve addressed all the points mentioned by @Terdious (at least the ones I said I would).  
The new image is available (under the same name).

[Previous page](https://community.gladysassistant.com/t/broadlink-service/7157.md?page=2)

[Next page](https://community.gladysassistant.com/t/broadlink-service/7157.md?page=4)
