Page 1 of 1

New time widget for smarthome ui

Posted: 12 Feb 2019 16:16
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.

Re: New time widget for smarthome ui

Posted: 14 Feb 2019 23:04
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

Re: New time widget for smarthome ui

Posted: 16 Feb 2019 12:57
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?

Re: New time widget for smarthome ui

Posted: 17 Feb 2019 20:11
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

Re: New time widget for smarthome ui

Posted: 17 Feb 2019 22:43
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.

Re: New time widget for smarthome ui

Posted: 18 Feb 2019 21:19
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