New time widget for smarthome ui

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

New time widget for smarthome ui

Post by piet66 » 12 Feb 2019 16:16

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
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
Raspbian GNU/Linux 8
Z-Way version v2.3.7 from 2018-03-23 09:28:53 +0300 (build b1902d4433d1337bd488834db3347fa7ef8f8a33)

User avatar
PoltoS
Posts: 4536
Joined: 26 Jan 2011 19:36

Re: New time widget for smarthome ui

Post by PoltoS » 14 Feb 2019 23:04

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: 59
Joined: 04 Feb 2017 17:00

Re: New time widget for smarthome ui

Post by piet66 » 16 Feb 2019 12:57

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
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
Raspbian GNU/Linux 8
Z-Way version v2.3.7 from 2018-03-23 09:28:53 +0300 (build b1902d4433d1337bd488834db3347fa7ef8f8a33)

User avatar
PoltoS
Posts: 4536
Joined: 26 Jan 2011 19:36

Re: New time widget for smarthome ui

Post by PoltoS » 17 Feb 2019 20:11

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: 59
Joined: 04 Feb 2017 17:00

Re: New time widget for smarthome ui

Post by piet66 » 17 Feb 2019 22:43

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
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
Raspbian GNU/Linux 8
Z-Way version v2.3.7 from 2018-03-23 09:28:53 +0300 (build b1902d4433d1337bd488834db3347fa7ef8f8a33)

User avatar
PoltoS
Posts: 4536
Joined: 26 Jan 2011 19:36

Re: New time widget for smarthome ui

Post by PoltoS » 18 Feb 2019 21:19

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