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

Add device support xiaomi.derh.13l.js #613

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Willian-Zhang
Copy link
Contributor

No description provided.

@Willian-Zhang
Copy link
Contributor Author

Willian-Zhang commented Jul 22, 2024

This device support actually has zero line change from auto generated file. however without putting this file into the module, home bridge does not properly pull value from the device albeit correctly popup sub-devices in home.app while add device into HomeKit.
I'm assuming you have done some work to make configuration work without a device class to present. However something in-between is stopping it from working. Perhaps it'd be requiresMiCloud: true.

If that's the case, Would it make sense to put this field into the config file overriding the value in class?

@Willian-Zhang
Copy link
Contributor Author

Willian-Zhang commented Jul 22, 2024

I'm actually a bit confused of what requiresMiCloud: true does. Does it mean all communication between homebridge and the device is going through the micloud? If so does anything else such as Xiaomi SmartHome Hub Gateway overrides this requirement as they are advertised for "local automation"?

@merdok
Copy link
Owner

merdok commented Jul 22, 2024

Yes, requiresMiCloud: true on the device class tells the plugin that this particular devices works only using the cloud. This affects mostly older devices which use the cloud as proxy for the miot protocol hence they have to communicate using the micloud.
You can actually force any device to use the micloud communication. For that you need to add a micloud section to your device config and set the flag forceMiCloud: true

@Willian-Zhang
Copy link
Contributor Author

Willian-Zhang commented Jul 23, 2024

Thank you for your detailed explanation.

This affects mostly older devices

It's kind of weird that most recent devices I tried (and PRed) are actually only working with forceMiCloud: true, however they are not old by model at all.

I wonder if I'm doing anything wrong now, here is a gist of my process:

  1. login MiCloud Account thru the miot UI from home bridge
  2. get tokens and informations including IP addresses for the device
  3. confirm device is pingable from the homebridge server although they are not living on the same VLAN. (routing involved)
  4. use the information to compose a new device config
  5. restart home bridge, try adding the device to homekit
  6. all of them: recognizing the device correctly, however no correct sensory data is provided, nor controllable.

@merdok
Copy link
Owner

merdok commented Jul 23, 2024

This is a a very good indicator that indeed the device does not support the miot protocol. When you can connect to the device but it does not respond to commands then it natively does not support the miot protocol. One of the reason is that the device might be old, but i guess there are also other reason like some manufacturers have their own protocol and just use the micloud to translate those to the miot protocol.

@Willian-Zhang
Copy link
Contributor Author

I tried forceMiCloud: true, it seems to work perfectly with this device.
I still wonder if there is a way of debugging through to check if there is a way to communicate with the device without micloud and if they are following miso communication protocol natively.

@merdok
Copy link
Owner

merdok commented Nov 3, 2024

I mean there would be ways to check that, but i am not sure if they would give a 100% certainty. It would need to be investigated...

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

Successfully merging this pull request may close these issues.

2 participants