Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine all children into one device #24

Open
flatsiedatsie opened this issue Nov 20, 2018 · 16 comments
Open

Combine all children into one device #24

flatsiedatsie opened this issue Nov 20, 2018 · 16 comments
Labels
enhancement New feature or request

Comments

@flatsiedatsie
Copy link
Contributor

Let's say I have a weather station that outputs

  • temperature
  • humidity
  • barometer (air pressure).

Currently, the children of these devices are all presented as separate things in the Mozilla Gateway interface.

In theory the mozilla interface supports complex combined devices:
http://linuxgizmos.com/files/mozilla_things_light.jpg

Is it possible / is it a goal to also allow for this combination?

@tsathishkumar tsathishkumar added the enhancement New feature or request label Nov 20, 2018
@flatsiedatsie
Copy link
Contributor Author

flatsiedatsie commented Nov 20, 2018

A hacky way around this is to place things together on the floorplan view. But then the issue is that all items just say "thing" inside the circle, instead of the value they represent. I suspect this is a bigger 'issue'.

@freaktechnik
Copy link

If you won't mind I'll reply here to the questions in WebThingsIO/gateway#1191 (comment)

Do you perhaps have a picture of what this multi-property output looks like?

image

or WebThingsIO/gateway#1129 (comment) for an extreme example.

I don't have any device where there are multiple properties of exactly the same type, but I do know that there are some smartplugs with that characteristic, since they may have multiple outlets and all outlets have the same controls. This directly leads into:

Dust sensor with 3 children, each indicating the total weight of dust particles detected of three different sizes. Optionally this could also send 3 "raw" particle counts.

This would probably be best solved with the object property nesting that the gateway doesn't support.

Weather station, as mentioned, with 4 children: temp, hum, baro and weather prediction (text).

image

A smart lock with 9 children.

You may be interested in WebThingsIO/schemas#11

Lastly, also note that you can provide a URL to a custom webpage for the state and control of a thing. (https://mozilla-iot.github.io/wot/#links-member rel: alternate)

@flatsiedatsie
Copy link
Contributor Author

@freaktechnik Thanks!

However, don't these examples require a user to click on the thing to expand it into the octopus state? The question was about showing all the data without having to click on it. At a glance.

@freaktechnik
Copy link

Ah, that is not possible. It could in theory be possible with a matching capability, but that's not something the UI currently tries to do. The value shown in the overview is intended to give you a rough idea of the state of your things, and not detail exactly what state they're in. One example of showing multiple values is colored lights, those will reflect both their current color/brightness/hue and their on/off state in the preview.

@flatsiedatsie
Copy link
Contributor Author

flatsiedatsie commented Nov 20, 2018

If that's not possible, well, that's something for Mozilla to explore I think. All other controllers allow this in some form.

I've tried them all. I quite like the HomeGenie vibe.

@flatsiedatsie
Copy link
Contributor Author

Let's shelve this issue until Mozilla fixes this somehow?

@tsathishkumar
Copy link
Owner

Yes, that makes sense. I'll also need to check the webthing-rust crate if this is something they are planning to work on.

@tsathishkumar
Copy link
Owner

@flatsiedatsie I think there also need a change in MySController to create child-sensors as properties instead of things. I'm thinking of making node as the thing and all the child sensors as properties of the thing. Does that make sense?

@flatsiedatsie
Copy link
Contributor Author

flatsiedatsie commented Nov 28, 2018

@tsathishkumar Yes that makes a lot of sense. I think that's how they expect you to do it actually, and this thread is about that.

But currently this implementation does also have a downside.

Currently, the Mozilla Gateway interface does not have a way of showing all child data from devices directly to the user without first requiring a mouse click on the Thing to expand its properties. This means you can't look at the interface and see, for example, both the temperature and humidity of a Thing at a glance simultanously. It is possible to show one 'main' data on the thing display. But this is currently a (severe) limitation of the Mozilla Gateway when compared to other smart home controllers. You will always have to click on the Thing to see all the child data.

@flatsiedatsie
Copy link
Contributor Author

Still, I think I would also prefer doing it the official way at this point.. This is what my thing overview looks like currently:

all_things

@tsathishkumar
Copy link
Owner

May be as a starter, we can try making the child sensors as properties and see how that looks like. From there we can take it forward. I'll create a branch for the change and let you know once it is in working condition.

@flatsiedatsie
Copy link
Contributor Author

Just curious: is there any progress on this?

@tsathishkumar
Copy link
Owner

Sorry, I didn't work on it for sometime now. I'll try to make sometime in next week and look into it.

@flatsiedatsie
Copy link
Contributor Author

Did you get a chance to explore? Is there anyway I can help?

@tsathishkumar
Copy link
Owner

No progress yet. I got busy in my daily job. I will make sometime next week and work on this.

@flatsiedatsie
Copy link
Contributor Author

I'm working on an alternative solution, so don't worry if you don't have the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants