Broadlink service

Hello everyone,
I have developed the new Broadlink service to interact in Infrared with your devices.

I won’t reveal everything right now, as I would like the community to test it « blindly » and give me feedback, to know if it’s intuitive enough, or if the messages are clear enough.

Pending the documentation, the supported devices are the Broadlink from the SP / MP / RM ranges.

You will find the docker image here: atrovato/gladys:broadlink (fresh from this morning, based on v.3.8.4)

There should be no risk with the DB, but I always recommend making a backup, or starting from a clean instance.

In order not to overload the service, only a few devices can be managed (lights and TV are well present). The others will come as requests and needs arise.

Looking forward to your feedback!!!

See you soon, thanks

I’ll get back to you as soon as possible :slight_smile:

Oh great, an integration that’s been missing since v3, I’ll test this out this week too :grin:

Thanks for the development!

It’s one of my goals to control the air conditioning. But I know it won’t be right away.

Super :+1:
Will this also handle the RF part in the future? That would allow us to do without the RFLink
Thanks for the work :wink:

:heart_eyes: :heart_eyes:

Great job! :clap:

I’ve had many requests regarding this service; it’s going to unlock things for people!!

Hello, first tests and first feedback:

Already, the remote control creation interface is great, the association between functionality and signal capture is really intuitive!

I confirm no issues, the best way to test is to stop your Gladys instance, make a copy of the database and restart with the new image.

I tested this on a television, no issues on the association side, but I only tested the classic, on/off button, volume +/- and mute. Lack of skin there seems to be a problem with the mute that does not allow saving once the signal is captured, the other two functionalities no issues :slight_smile:

On the other hand, on the dashboard, I think a remote control box will need to be created, displaying it as a device in a room does not allow fine control of the volume for example, I only managed to decrease by 1 or return to the old level with this slider:

Otherwise, incredible work on the design of the settings :slight_smile:

EDIT: following the association of the mute button, the save button does not generate any error on the Gladys logs or on the browser side, but the test button generates these two errors:

2022-04-06T20:39:54+0200 <error> index.js:15 (process.<anonymous>) unhandledRejection catched: Promise {
  <rejected> TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
      at new NodeError (internal/errors.js:322:7)
      at Function.from (buffer.js:334:9)
      at BroadlinkHandler.send (/src/server/services/broadlink/lib/learn/broadlink.send.js:24:31)
      at send (/src/server/services/broadlink/api/broadlink.controller.js:39:28)
      at Layer.handle [as handle_request] (/src/server/node_modules/express/lib/router/layer.js:95:5)
      at next (/src/server/node_modules/express/lib/router/route.js:137:13)
      at /src/server/api/middlewares/authMiddleware.js:28:7 {
    code: 'ERR_INVALID_ARG_TYPE'
  }
}
2022-04-06T20:39:54+0200 <error> index.js:16 (process.<anonymous>) TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
    at new NodeError (internal/errors.js:322:7)
    at Function.from (buffer.js:334:9)
    at BroadlinkHandler.send (/src/server/services/broadlink/lib/learn/broadlink.send.js:24:31)
    at send (/src/server/services/broadlink/api/broadlink.controller.js:39:28)
    at Layer.handle [as handle_request] (/src/server/node_modules/express/lib/router/layer.js:95:5)
    at next (/src/server/node_modules/express/lib/router/route.js:137:13)
    at /src/server/api/middlewares/authMiddleware.js:28:7 {
  code: 'ERR_INVALID_ARG_TYPE'
  }
}

Thanks for this first feedback, it’s been a very long time since I’ve been working on this subject, which has nothing to do with the first version I provided as a test image a few years ago.

I’m happy to see that the onboarding is easy, I’ve taken great care to implement the « learning » mode :wink:

For the dashboard part, we will do some work outside of the broadlink service, to avoid mixing everything (we will also need to add compatibility with Google Home :wink: ).

I think I have fixed the bug on the mute button.
For information, this concerns all buttons that have only one value (source, mute, left, right, play, pause…)

A new version of the docker image is being prepared, it will take 2 hours before it is available.

I’m following up for feedback on this service.
PING! :wink:

Try to take the time in the promised day

The image is pulled and launched on my Mac.
The service starts without any issues:

However, I cannot find my rm mini 3

So, I can’t test further ^^

EDIT:
Maybe the container is not on the same network?
Could you provide the exact command to run your image please :slight_smile:?

I don’t think it will work on Mac, Docker for Mac launches a Linux VM within your Mac that is isolated and does not have access to the Mac’s network, but to a separate network.

To be able to scan the network, you need to launch the container on a Linux machine with network=host! (the same docker run as on Gladys’s website)

It might be possible to do this in a Linux VM on Mac, but it will require the right network configuration at the VM level, I think it’s easier to just launch the container on a Linux :wink:

I have the same problem with WSL… the network is not the same… but under Linux (Raspberry) or Windows, I have not noticed the problem.

Oh well, I won’t be able to test ^^

RE PING !
I was just stopping by, any other feedback?
@Albenss aside from the bug you mentioned (which I should have fixed), were you able to continue using it?

Completely forgot, I’ll redo a test right away!

So I just retested (after pulling the image atrovato/gladys:broadlink), I still have a problem with the simple buttons (like Mute, Volume +, Volume -) in the browser console such as:

RemoteCreation.jsx:104 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'min')
    at RemoteCreation.jsx:104:31
    at Array.forEach (<anonymous>)
    at Object.saveDevice [as clickfalse] (RemoteCreation.jsx:78:33)
    at HTMLButtonElement.w (props.js:153:20)

Otherwise the other actions seem functional! (couldn’t test everything but apart from this issue I haven’t seen anything else).

By the way, shouldn’t the On/Off button be a simple button?

I was just monitoring the downloads on Docker, your image doesn’t seem to be the latest one I built because

You need to remove the image (rmi atrovato/gladys) so you can re-download it :smiley:

So the first test tonight was just pulling the existing image (so an update) which had the error code shown above.

The new one is after testing deletion and then uploading a new image and it’s still the same issue.

After capturing the signal for the « Mute » feature, I try to save and I get the same error message in the console:

RemoteCreation.jsx:104 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'min')
    at RemoteCreation.jsx:104:31
    at Array.forEach (\u003canonymous\u003e)
    at Object.saveDevice [as clickfalse] (RemoteCreation.jsx:78:33)
    at HTMLButtonElement.w (props.js:153:20)

You need to pull, destroy the container and recreate it. Is that what you did?