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

Improvements for Homie (V3.1) #75

Closed
timpur opened this issue Apr 23, 2018 · 13 comments
Closed

Improvements for Homie (V3.1) #75

timpur opened this issue Apr 23, 2018 · 13 comments

Comments

@timpur
Copy link
Contributor

timpur commented Apr 23, 2018

Anyone have ideas for homie V3.1?
Some Outstanding Discussions:

@timpur
Copy link
Contributor Author

timpur commented Apr 23, 2018

@nicola-lunghi
Copy link

#76

@nicola-lunghi
Copy link

nicola-lunghi commented Apr 25, 2018

see the other issues that I've created

#77
#78
#79
#80
#81
#82
#83
#84

@timpur
Copy link
Contributor Author

timpur commented Apr 30, 2018

Arrays

homie/super-car/$nodes → "lights[]"

homie/super-car/lights/$name → "Lights"
homie/super-car/lights/$properties → "intensity"
homie/super-car/lights/$array → "0-1"

homie/super-car/lights/intensity/$name → "Intensity"
homie/super-car/lights/intensity/$settable → "true"
homie/super-car/lights/intensity/$unit → "%"
homie/super-car/lights/intensity/$datatype → "integer"
homie/super-car/lights/intensity/$format → "0:100"

homie/super-car/lights_0/$name → "Back lights"
homie/super-car/lights_0/intensity → "0"
homie/super-car/lights_1/$name → "Front lights"
homie/super-car/lights_1/intensity → "100"

I was looking at this example and thought to my self, that actually looks complex to subscribe to via mqtt. Wouldnt it be nicer to do this:

homie/super-car/lights/0/$name → "Back lights"
homie/super-car/lights/0/intensity → "0"
homie/super-car/lights/1/$name → "Front lights"
homie/super-car/lights/1/intensity → "100"

Thus you onlt have to sub to homie/super-car/lights/# to get all the node topics, since there all hirarical now.

Maybe also:

homie/super-car/lights/elements/0/$name → "Back lights"
homie/super-car/lights/elements/0/intensity → "0"
homie/super-car/lights/elements/1/$name → "Front lights"
homie/super-car/lights/elements/1/intensity → "100"

Just ideas, tell me your thoughts?

@marvinroger
Copy link
Member

homie/super-car/lights/0/$name looks like a $name attribute of the 0 property of the lights node.

@ThomDietrich
Copy link
Collaborator

ThomDietrich commented Apr 30, 2018

My thought exactly.

Remember that the underscore character is reserved for arrays in topic ids. You could benefit from that.

I'd suggest to discuss this in a specific issue.

@ThomDietrich
Copy link
Collaborator

Also could you create an issue to start discussion of the stats improvement?

@nerdfirefighter
Copy link
Contributor

why is lights an array? is it because now at the nodes layer its by node type?

My usage of a range/array is when i have a light strip where i refer to strip[] which is an array of led 0- length of strip. each led in the strip does not have a name they only have a value (which most of the time is a Red:Green:Blue string). i dont think having an name value for each array element is appropriate. if you need a name is should be its own node not a range.

@ThomDietrich
Copy link
Collaborator

@nerdfirefighter $name just as most other attributes is not mandatory.

@timpur
Copy link
Contributor Author

timpur commented Apr 30, 2018

sorry moved to #90

@ThomDietrich ThomDietrich added this to the v3.1.0 milestone May 3, 2018
@nicola-lunghi
Copy link

Can we create a "development" or testing branch and start putting the "approved" modification in it to see if this is coherent?
for example the "optional" arguments

@timpur
Copy link
Contributor Author

timpur commented May 8, 2018

Have you guys seen https://iot.mozilla.org/wot/, @ThomDietrich

@davidgraeff
Copy link
Member

Closing this umbrella issue. See #62.

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

No branches or pull requests

6 participants