[V4] Dev service RFlink

For information, on Gladys 3, the RFLink module did not have this type of processing (having this option may still be a good idea!), but in my use, it never caused any issues since the ON command on each reception still triggered the scenarios.
In V4, on the other hand, I still don’t know how it works.

Absolutely yes! :slight_smile:

I’m working on other topics right now (Listed in the milestone → GitHub · Where software is built), I have no dates at all!

However, if you want to work on it, don’t hesitate :slight_smile: It’s not very complicated ^^ You can create a specific topic if you want to discuss it before implementation.

@pierre-gilles, I have a problem in my service that I’m having trouble understanding.

When my service detects a new device, I send this to the front end:

this.gladys.event.emit(EVENTS.WEBSOCKET.SEND_ALL, {
      type: WEBSOCKET_MESSAGE_TYPES.RFLINK.NEW_DEVICE,
    });

This allows the user to see their devices directly when they press the button on their remote without refreshing the page.

It works fine when I refresh Gladys directly on the page like this:

Works

However, sometimes I get messages in the console and the events are not received by the front end, as if the front end can no longer receive websockets until I refresh the page:

Doesn't Work

This happens quite frequently and forces a page refresh each time, whereas the goal is to never need to do this.

I don’t know if the testers of my service have had this problem, but I hope it’s just from my installation.

The access_token used by Gladys has an expiration date, I think it’s 1 hour. Then, Gladys uses the refresh token to automatically get a new access_token.

All of this is transparent normally and should not cause any issues.

However, there can always be bugs. Right now, it’s hard to debug without more information…

Hello,
I installed Gladys v4 a week ago.
In Zwave, my Fibaro roller shutter contacts and Qubino heating contacts are detected, but not fully operational as they are only On/Off (no intermediate position or comfort/reduced setpoint).
However, my RFXCOM and Oregon 433 Mhz temperature sensors are not detected.

I had created a Domoticz installation with a camera that sent captures to my Dropbox, then created a timelapse every day. It managed my heating hour by hour and my roller shutters.
I am a bit frustrated not to be able to do the same with Gladys… I will have to wait for the developments.
Thanks in advance for your answers.

How can I enter the test program?
I have never used Dockers.

Z-Wave is currently in development, it is about consolidating compatible equipment and features, so for now it is « in progress ».

For Docker, everything is in the documentation => A privacy-first, open-source home assistant | Gladys Assistant

Hello,
I left from the branch of @joeypic to merge the latest changes on G4 here, then fix the milight and the debug option in the configuration. The tests grandeurs natures on CHACON and MiLight work well.
@joeypic: I made a PR for you, let me know what you need

@All: I tried to add some tests in the code, unfortunately I don’t have the required level. If someone wants to take care of it, I’m lost :slight_smile:

Hi,
It’s true that I hadn’t pushed the code for the milight to the repo :roll_eyes:, thanks for your help :grin: I took your PR, the only task left to code is the tests, I tried to learn and it really bored me so I gave up (it’s silly I only had that left to do to release the service)

I’m going to try to continue the tests because I think it’s not easy to test someone else’s functions but if someone knows how to write tests it would be faster

I don’t know Mocha well enough, nor JavaScript for that matter… but I do like testing.
What I hate is when the test returns an error while the light in the living room comes on :slight_smile:

Hello!

Still interested in this service, I wonder if the PR could be updated with the aim of integrating Gladys soon.

Thank you :slight_smile:

Hello,

I’m still interested too :smiley:
I added a few tests on my branch, but it’s far from complete:

I’ll work on it a bit more tomorrow and push to @joeypic (he’s the one who holds the PR)

Hello @ProtZ,

I’m not sure if @joeypic is very active right now, maybe you can « take over the PR » by creating a new PR to the main repo and submit it for review?

Thanks for the work done on this integration :smiley:

Hello @peb

Sorry I took so long to reply (on a personal note, I’ve been a dad again for 2 weeks, so I’m a bit busy)

I don’t know if this is the right way to proceed, I made a new PR:
https://github.com/GladysAssistant/Gladys/pull/1204

On test coverage, it’s perfectible, but I’ve made a lot of progress since the last time.

I’ll continue to try to get closer to 100%.

Hi @ProtZ! Great job on all this. Just a small note, be careful, your PR says it adds 12,000 lines of code. That seems huge for an integration (in comparison, the MQTT integration PR was 1,700 lines of code). In my opinion, you must have integrated files not necessary for your PR. Think about doing a small clean-up so that there is really only the strict minimum in the PR :slight_smile:

Congratulations @ProtZ!

Hey!

First of all: thank you @Tlse-vins!
I’m dropping by here to share some updates.

Tests & corrections
I’m really proud to have completed the service tests while respecting the quality ratio:


The few remaining points are beyond my capacity, but I would be happy if someone could explain them to me.

I have added corrections, especially for the milight, whose color management remains unfortunately very imperfect to this day (roughly: I tried to convert the color picker values into 8-bit colors by approximation because that’s what the milights require).

PR
The status of the PR seems okay to me, let me know if something is missing
https://github.com/GladysAssistant/Gladys/pull/1204

I generated a test docker image for those who want to test. It has been running successfully at my place for a few days.

I’m waiting for your feedback, especially from those who have rflink gateway + device hardware (@peb?).

Documentation
WIP: I am writing the documentation and plan a small presentation video.

It’s really coming along!!! I just need this integration to migrate to Gladys!

Thanks to the dev/testers!

Hi. Great work :muscle: . I don’t have RFLink hardware but I’ll take a look at your PR

Great job @ProtZ!! :slight_smile:

Top! Don’t hesitate to post the video on Github and then share a link here so we can check it out.

I don’t have an RFlink, so I won’t be able to test it, but I can provide feedback on the UI and functionality.

For those who don’t know how to launch a test image, I wrote a small post describing how to test a test image with Docker, and I took the example of RFLink for the demo :slight_smile:

To read here: