User management / User access to Rules Scenes Apps

Discussions about Z-Way software and Z-Wave technology in general
manueldiasmanuel
Posts: 14
Joined: 10 Aug 2023 18:08

User management / User access to Rules Scenes Apps

Post by manueldiasmanuel »

Hello,


Is there a way to give access to non-administrator users to Scenes , Rules and Some Apps in user UI ?




MD
User avatar
PoltoS
Posts: 7588
Joined: 26 Jan 2011 19:36

Re: User management / User access to Rules Scenes Apps

Post by PoltoS »

No, there is not such possibility. Mostly because this is admin-related.
manueldiasmanuel
Posts: 14
Joined: 10 Aug 2023 18:08

Re: User management / User access to Rules Scenes Apps

Post by manueldiasmanuel »

I don't have much experience with Zway.

Example . I have a Timer Switch in a user Dashboard, so it's not possible to the user change the timer value without asking the admin ? Is this correct. ?

This is uncommon, so I have to be sure how Zway behaves.

Thks

MS
lanbrown
Posts: 302
Joined: 01 Jun 2021 08:06

Re: User management / User access to Rules Scenes Apps

Post by lanbrown »

It is not uncommon. You are asking for a user to be able to make a change; changes are an administrative function.
manueldiasmanuel
Posts: 14
Joined: 10 Aug 2023 18:08

Re: User management / User access to Rules Scenes Apps

Post by manueldiasmanuel »

Sorry i wanted to say it´s uncommon but I said the opposite 😊.

On this type of apps and another similar systems , like , Home automation apps , Windows , Linux etc. there is the admin role to make the changes as an expert, and there is the user , that is going to use the app having access to basic adjustments parameters , variables.


By other side ,does not make sense to give admin access to an user , because they don´t the knowledge and could mess the installation/server.

A BIG MESS ONLY BECAUSE I NEED TO ADJUST A SMPLE TIMER VALUE THAT SWITCH OFF LIGHTS !??.


Thanks ,

MD
manueldiasmanuel
Posts: 14
Joined: 10 Aug 2023 18:08

Re: User management / User access to Rules Scenes Apps

Post by manueldiasmanuel »

PoltoS wrote:
11 Aug 2023 03:27
No, there is not such possibility. Mostly because this is admin-related.
Hello,

Sorry to insist on this , but I really need a Schedule or Weekly timer on the User dashboard , is there a config or parameter that I could play with , or any other procedure a trick to do this ?


Thank you very much.

MD
seattleneil
Posts: 173
Joined: 02 Mar 2020 22:41

Re: User management / User access to Rules Scenes Apps

Post by seattleneil »

is there a config or parameter that I could play with , or any other procedure a trick to do this ?
One idea... since every action done by a user on the Z-Way web UI is an http request, you could author a CGI script for a web page that's separate from Z-Way that allows an authorized user to do what you've described, where the web server backend makes an http request to Z-Way. This idea assumes you know how to author a CGI script and configure a web server. Note that installing Z-Way causes the mongoose web server to be installed which listens on port 8084 (i.e., http://[Z-WAY_IP_ADDRESS]:8084), so you could either configure a second mongoose web server or re-configure the existing web server to point to your CGI script. Here's a link to the mongoose man page: https://linux.die.net/man/1/mongoose. Another web server option that I like to use on a Pi is lighttpd (https://www.lighttpd.net/). You have several options for the CGI script language. My personal preference for authoring a CGI script is PHP, with Python being my second choice.

Another idea is to install Home Assistant with the Z-Way integration and configure the rules/schedules in Home Assistant.

Yet another idea - Z-Way can be configured to work with Amazon Alexa and Google Assistant where you can configure rules/schedules in those platforms.
manueldiasmanuel
Posts: 14
Joined: 10 Aug 2023 18:08

Re: User management / User access to Rules Scenes Apps

Post by manueldiasmanuel »

Thanks you for your great suggestions.

CGI script- I have not knowledge.

Home Assistant – Could be a future solution but for now it is not possible to change.

Google Home or similar could help, but as this project is for a client I don´t want to be exposed to updates or changes in the owner Mobile. I need to keep everything working independent to be sure that no updates make a crash at Z-Way and others.



So I am already trying to solve some issues using Node-Red , either using Z-way node or by Http request but has been hard time to find the right URLs .


API commands for developers.

I get correct results by GET http://xxx.xxx.x.xx:8083/ZAutomation/ap ... t?level=20

I aso get correct results for "max" but I would like to change ( POST ) the "max" (below) value , but no success , could you help pointing me to the right http request ?


{
"data": {
"creationTime": 1691790043,
"creatorId": 45,
"customIcons": {},
"deviceType": "switchMultilevel",
"firmware": "v4.1.1",
"h": -1745471033,
"hasHistory": false,
"id": "TimerSwitch_45",
"location": 0,
"locationName": "globalRoom",
"manufacturer": "Z-Wave.Me",
"metrics": {
"min": 0,
"max": 120,
"scaleTitle": "Seconds",
"title": "Tempo ventilação ligada",
"level": 0,,



Thanks

MD
seattleneil
Posts: 173
Joined: 02 Mar 2020 22:41

Re: User management / User access to Rules Scenes Apps

Post by seattleneil »

You are slightly off track. Hopefully, this response and playing with the expert UI will get you back on track.

From your question, it looks like you may be confusing the data Z-Way maintains for a device and how the data gets updated. Specifically, when you use an HTTP GET to fetch the device data, the data is returned as a JSON object. However, to update a device's data, you do not directly change the JSON object via an HTTP POST. Instead, you need to use the correct HTTP GET request. Happily, the expert UI will show you the correct request.

For example, to see the correct HTTP request for device ID 45 SwitchMultilevel command class, browse to:
http://[IP ADDRESS]:8083/expert/#/configuration/commands/45
Next, expand the SwitchMultilevel command class section and scroll down to the SwitchMultilevel / Set and then fill out the parameters.
If you press the HTTP button, the correct HTTP GET request will appear below the HTTP button. On my Z-Way system, this is what I see for device ID 10:
Screenshot 2023-08-17 221418.jpg
Screenshot 2023-08-17 221418.jpg (62.01 KiB) Viewed 2443 times
From the Pi shell prompt, you can use the curl command to send the HTTP request to Z-Way as follows:
curl -u admin:[ADMIN PASSWORD] --globoff '[HTTP REQUEST]'

Using Node-RED, you can issue the same HTTP request using the http request node (method = GET, use basic authentication with username=admin and password=[ADMIN PASSWORD]).
Post Reply