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

Object discovery #322

Open
hendrix04 opened this issue Mar 26, 2024 · 6 comments
Open

Object discovery #322

hendrix04 opened this issue Mar 26, 2024 · 6 comments

Comments

@hendrix04
Copy link

Is your feature request related to a problem? Please describe.
I shouldn't have to enumerate every new device that sends messages to my MQTT broker.

Describe the solution you'd like
Some sort of admin page that can enumerate a list of devices that a user can select to determine what they want created into objects.

@Apollon77
Copy link
Member

Can you please be more detailed? MQTT is a completely unstructured protocol by definition, so each device can use whwever it lokes, so how we should be able to "identify devices" that exist in the MQTT data?

@hendrix04
Copy link
Author

hendrix04 commented Mar 26, 2024 via email

@hendrix04
Copy link
Author

Follow up...

My biggest issue at the moment is that when I am subscribing to a sensor zigbee2MQTT), it creates a state object with a string value of {"battery":100,"battery_low":false,"linkquality":164,"occupancy":false,"tamper":false,"voltage":3100} There seems to be no way to break this up to create a device object with multiple states.

@mcm1957
Copy link
Member

mcm1957 commented Mar 26, 2024

This is definitly not a question to discuss at the MQTT CLIENT. The mqtt topics and messages are sent by zigbee2MQTT. If seperated mqtt topics are desired, the originator of the mqtt messages must create / send them. This adapter will not and cannot interpret the contens of mqtt messages.

Evaluate to use the zigbee adapter which should create seperated states.

@hendrix04
Copy link
Author

I am not sure why the client can't have configuration that would allow it to interpret the contents of mqtt messages as the whole point of the adapter is to help translate mqtt messages for iobroker.

If I wanted to integrate zigbee directly into iobroker, I would have done that instead of setting up my own MQTT broker and zigbee client. The whole point is to be able to keep things flexible and not have to have things tied to a specific backend like iobroker/HA/whatever.

I suppose if this is something that you wouldn't ever consider as part of this project, a new adapter would need to be created. I am surprised that this hasn't ever come up before.

@Apollon77
Copy link
Member

@hendrix04

I am not sure why the client can't have configuration that

... because noone else so far requested that ... It's so simple.

And yes in some regard the adapter is the pure mqtt communication protocol adapter and because of this and the protocol definition there is no defined structure. In fact if you just need parts then just subscribe to parts of the messages. it shouöd be that easy.

Adding a "device layer" here (and yes Home Assistant created a discovery definition how to detect devices that are on MQTT and some libs implemented that so far, but thats an "inofficial thing" tho add convenience for some places) is an effort that wants to be well planned because it can have several layers. So in fact the feature request itself is valid in general ... But formally an extension of MQTT, so would need to be discussed what and how to do it,

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

No branches or pull requests

3 participants