Let's talk about Gladys V4

Expert Zwave indeed, I just have a lot of modules :smiley:

I agree with the points you mentioned. In terms of functionality, it’s also necessary to retrieve the « command class central » and use them in the scenes.

For the « Network tab improvement » part, are you thinking of displaying a more readable matrix and the number of messages waiting to be processed by the key?

What is that? ^^

Yes!

A direct association is limited to making two Z-Wave devices work together, for example: The Fibaro eye detects movement and tells my connected outlet to turn on.

The Central Scene command class is much more powerful as it notifies the Z-Wave stick of an event with a sceneId/Value pair! You can then retrieve this information and trigger Gladys scenes to control any type of equipment. For example,

  • I press the tactile button No. 1 on my Wallmote (it’s a 4-zone tactile Z-Wave remote control)
  • the stick is notified: nodeId = 4; sceneId = 1; value 1.
  • Gladys recognizes this information as a trigger for a scene: « I’m going to bed »
  • the scene performs the following actions: turn off all my lights thanks to my Fibaro dimmers and close all the roller shutters controlled by my Arduinos and turn on my alarm.

Do you see the logic and interest of this function?

Hello, I’m a bit more interested in the Gateway for future developments I’m planning and I must have missed something so I’m coming to ask for a bit of help.
Regarding the API available from the Gateway, is it a replica of the local Gladys API but available everywhere (with a few additional routes related to the gateway)? Let me explain, if we develop a service containing a controller, is it possible to access the route both from inside and outside the network (through the Gateway)? Imagine a service that can receive information from Tasker or another application from a user’s device. There will be those who will only need to communicate with Gladys when they are at home and those who will need to communicate with Gladys no matter where they are (with the Gateway). Will we have to develop the base Gladys service and a « service » on the Gateway side? or will the base service be enough?
For me, it was yes, I had in mind that it was a simple gateway that allowed access to all of Gladys from the outside as if we were on the raspberry’s network. I’m asking this question because the Owntrack code is on the Gateway side. Thanks for your help.

Thanks for the explanation! I see the interest :slight_smile:

There are two parts in the Gladys Gateway:

The Websockets API

The websocket API, end-to-end encrypted, is a pass-through between your web client (plus.gladysassistant.com), and your local instance.

Any route available in Gladys is available in the websocket API, because the Gateway only transmits requests from one to the other, and the Gateway has no awareness of the routes called or what is transiting, the messages are entirely encrypted from your browser to your client.

The Open API REST for Owntracks

In order for us to use Owntracks very simply, I developed an Owntracks route that transfers the JSON body sent to the user’s Gladys instance.

As we do not control the code of the Owntracks client applications, this route is not end-to-end encrypted, it is encrypted in transit of course via HTTPS, but only between the mobile and the gateway, then encrypted between the Gateway and the Gladys instance. It’s a shame, but we don’t control the Owntracks code.

I have had requests like yours to have the possibility to have more, even all the Gladys routes available in Open API on the Gateway: it’s a real reflection and a real debate.

Developing routes that would be as easy to call as a classic API, without end-to-end encryption, I find it a shame… This would mean that as a maintainer of the Gladys Gateway, I would have full access to my users’ instances… is that what we want? I don’t think so!

My personal opinion

We need to find a way to make end-to-end encryption work via Tasker! I saw that Tasker allows executing JS code, so we could very well invoke the same encryption code as in the Gladys Plus JS client, it’s not very complicated! :slight_smile:

Sorry for the long post, but an explanation of this hybrid operation was needed, and I wanted to be precise in my answer :slight_smile:

What do you think?

Thanks for these details, that’s exactly what I was trying to understand.

That’s exactly what I was going to say, everything that comes to this Open API is not encrypted.

That’s for sure, as soon as it’s possible, we need to encrypt, but it won’t be possible in all cases. You are probably right about Tasker, it’s worth studying, but I only took it as an example. There will be other applications/services where it won’t be possible, Totof mentioned PhoneTrack here: Utiliser Owntracks avec Gladys 4! - #24 par Totof, the data is transmitted in an HTTP request, we won’t be able to encrypt from the application. In your presentation of the Gateway, you talked about connecting with external services (Google Assistant, Alexa, IFTTT…) I don’t exactly know how they work but if they need a webhook to Gladys it will be the Gateway and once again we won’t be able to do anything about it. I totally understand the goal of end-to-end encryption, personally I am completely for it, and Gladys has among other things essential points the security and respect for privacy. Unfortunately in some cases we may need to trust (like for OwnTrack), provided that we properly warn the user in the documentation. We do our best for encryption and we are transparent for the rest.

As for the list of routes in the Open API, I don’t know if it’s worth putting all the routes of Gladys. I don’t have many scenarios in mind yet, but limiting the Open API to a few routes that really need it would push us to really limit this data exposure to the Gateway and force us to always look for the most secure solution.

As you say, the reflection remains completely open, I will continue to study this over the next few days.

Indeed, there are cases where end-to-end encryption is not possible and doesn’t make sense (Google Assistant, Alexa, IFTTT, etc.), and in this case, I am 100% in agreement that it is worth opening an Open API route from the Gateway to allow easy external connection :slight_smile: .

Did you have a specific need to ask for this? I think we need to consider each case individually!

As I mentioned in the first message, this was for informational purposes at the moment. I was trying to understand how the Gateway works to properly design the future services I will develop.

In the long run, I want to create a PhoneTrack service because I have been using the application for a few months with a Nextcloud instance and it suits me. To get started, it will probably be necessary to think about how to manage the API keys on the Gladys side. I have the impression that they exist on the Gateway but not on the Gladys instance. Personally, I would use it through the Gateway, but I want the service to be available directly on Gladys for several reasons (those who publicly host their Gladys instance, those who just want to save their positions at the end of the day when they get home…).

Ok, I understand! :slight_smile:

Indeed, I had coded the API keys in the Gateway since v3, however the Open API with long-term tokens has not yet been coded in Gladys 4. It’s a development that is listed on Github, no one has started on it yet!

Exactly, I think it’s best to make something generic that works with both :slight_smile:

Perfect, I hadn’t noticed, I’ll probably take it then.

@bertrandda Great! Before starting development, could you write the technical specs on the GitHub issue so we can agree on the implementation first? :slight_smile:

Yes, I will detail all that.

Presence detection and multi-user are not yet implemented.

If there’s a solution, I’m interested too :sweat_smile:

Indeed, that’s a good point. It would be necessary to have a feature that allows sending a message « max 1 time per hour » for example, or « max 1 time per day ». This would allow creating an alert system that doesn’t spam too much.

Something to think about, thanks for the feedback in any case!

Hello,

I had exactly the same need. I wanted to set an alert as soon as the temperature of a room exceeds a threshold, but I end up with messages every time the temperature changes and is above the threshold, not great :sweat_smile:

By the way, I was wondering, would it be possible to retrieve a variable from an action to pass it to the next action via message?

Finally, I noticed something on the dashboard side. If you enable editing and switch pages, when you return to the dashboard, editing is still active. I don’t know if this is intended behavior, I found it strange!

I created an issue →

https://github.com/GladysAssistant/Gladys/issues/794

Mmm indeed, that needs to be changed, well spotted!

I created the issue →

https://github.com/GladysAssistant/Gladys/issues/795

It’s planned :slight_smile:

https://github.com/GladysAssistant/Gladys/issues/789

It’s planned to be able to create as many dashboards as the user wants →

https://github.com/GladysAssistant/Gladys/issues/723

Have you seen this article??

Hello everyone,

While browsing Gladys’ GitHub, I noticed there are quite a few pending issues and features… so I feel like diving in.
I’m posting here because this topic is quite followed, but I can move it if necessary.

I’m a beginner in JavaScript. I do HTML/PHP/SQL, but I’m not a professional developer… (I write aeronautical documentation by trade ^^)

Here’s what I would need:

  • If you have good, well-structured JS courses, I’m interested!
    I already have some, but it doesn’t hurt to have more

  • Resources on PreactJS, which I don’t know

  • GitHub basics: how do you make a PR? What is codecov and the tests I see everywhere?

Once I’ve worked through all that, if a kind soul is motivated enough to guide me via Skype or other to set up a clean dev environment, that would be purely awesome.
(I think there was a link here to a tutorial, but I can’t find it…)

Thanks to everyone who will take the time to help the motivated newbie that I am!
You have to start somewhere…^^

Hi @Biscotte! It’s great that you want to lend a hand :slight_smile: I don’t have a specific course to recommend, from experience, the best way to learn is to practice :slight_smile: For Preact, you can do a React tutorial (it’s almost the same thing). I advise you to then start a small project to test all that (maybe something simpler than Gladys)

GitHub has a lot of tutorials on their site for this part.

Codecov is used to measure the code coverage of our automated tests. The goal is to verify that all the code we write is properly tested, this prevents regressions and makes the software more stable in the long term :slight_smile:

Hello @pierre-gilles,

Welcome back! I hope you had a great vacation :)! I’m in it…it will take me a few months to be operational, but I won’t let go of the deal!