MySController-rs icon indicating copy to clipboard operation
MySController-rs copied to clipboard

Combine all children into one device

Open flatsiedatsie opened this issue 5 years ago • 16 comments

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?

flatsiedatsie avatar Nov 20 '18 10:11 flatsiedatsie

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'.

flatsiedatsie avatar Nov 20 '18 11:11 flatsiedatsie

If you won't mind I'll reply here to the questions in https://github.com/mozilla-iot/gateway/issues/1191#issuecomment-440251554

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

image

or https://github.com/mozilla-iot/gateway/issues/1129#issuecomment-400044433 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 https://github.com/mozilla-iot/schemas/issues/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)

freaktechnik avatar Nov 20 '18 12:11 freaktechnik

@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.

flatsiedatsie avatar Nov 20 '18 14:11 flatsiedatsie

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.

freaktechnik avatar Nov 20 '18 14:11 freaktechnik

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 avatar Nov 20 '18 14:11 flatsiedatsie

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

flatsiedatsie avatar Nov 20 '18 14:11 flatsiedatsie

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 avatar Nov 20 '18 14:11 tsathishkumar

@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?

tsathishkumar avatar Nov 22 '18 13:11 tsathishkumar

@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 avatar Nov 28 '18 12:11 flatsiedatsie

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

flatsiedatsie avatar Nov 29 '18 07:11 flatsiedatsie

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.

tsathishkumar avatar Nov 29 '18 16:11 tsathishkumar

Just curious: is there any progress on this?

flatsiedatsie avatar Feb 07 '19 13:02 flatsiedatsie

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

tsathishkumar avatar Feb 22 '19 08:02 tsathishkumar

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

flatsiedatsie avatar Apr 05 '19 11:04 flatsiedatsie

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

tsathishkumar avatar Apr 11 '19 09:04 tsathishkumar

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

flatsiedatsie avatar Apr 22 '19 13:04 flatsiedatsie