New time widget for smarthome ui

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
piet66
Posts: 266
Joined: 04 Feb 2017 17:00

New time widget for smarthome ui

Post by piet66 »

I would like to have a new widget where user can enter a date and a time.
Purpose:
For example user will come back from journey at certain date/time. He wants to have it warm and therefore heating shall start some hours before this time. So he must be able to enter this date/time in the UI.

I've looked around in the documentation to see if such a widget is already existing, but found none. There is a Common widget library, but the link points onto itself.

I'm willing to write a widget by myself if necessary. Therefore I found this description https://github.com/Z-Wave-Me/home-autom ... e-a-widget, but although it's part of the official wiki, it seems not to be valid any more.

Can anybody tell me, whether such a widget exits or how to write one?

BTW: The link http://razberry.z-wave.me/docs/zwayDev.pdf on http://developer.z-wave.me/?uri=help is also not working.
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster, 32bit)
RaZberry by Z-Wave.Me ZW0700 7.20.00 07.38/1766938484 1025/257
Z-Way version v3.2.3 from 2022-04-06 04:56:23 +0300
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: New time widget for smarthome ui

Post by PoltoS »

To implement a new widget you need to add it to the backend and to the frontend. A widget us just a JSON structure of a defined format that is know by both backend and frontend
piet66
Posts: 266
Joined: 04 Feb 2017 17:00

Re: New time widget for smarthome ui

Post by piet66 »

Yes, I know.
And I would try to do it by myself if I had a correct description.

I started with 'How to create a virtual device' from the wiki, but it's not working.
Because I think
- entry of VirtualDevice has changed
- command this.controller.registerDevice isn't existing any more.

What's the correct method to create an own device?
Can you provide a working example?
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster, 32bit)
RaZberry by Z-Wave.Me ZW0700 7.20.00 07.38/1766938484 1025/257
Z-Way version v3.2.3 from 2022-04-06 04:56:23 +0300
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: New time widget for smarthome ui

Post by PoltoS »

You can open any module creating devices and look on it.

Like this: https://github.com/Z-Wave-Me/home-autom ... e/index.js
piet66
Posts: 266
Joined: 04 Feb 2017 17:00

Re: New time widget for smarthome ui

Post by piet66 »

That's not what I want to do.
In these modules devices are created of already known types.

I want to create a device of a new, not yet existing type with a new, not yet existing widget.
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster, 32bit)
RaZberry by Z-Wave.Me ZW0700 7.20.00 07.38/1766938484 1025/257
Z-Way version v3.2.3 from 2022-04-06 04:56:23 +0300
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: New time widget for smarthome ui

Post by PoltoS »

There are no types for the engine. It is just a convention. You can create your type I. The same way.

Then add in the UI a parser for that type
Post Reply