merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
390 stars 61 forks source link

Add new device #197

Closed ForestOfDreams closed 2 years ago

ForestOfDreams commented 2 years ago

Device model hfjh.fishbowl.v1

Device name Xiaomi Smart Fish Tank

Does the device require a MiCloud connection? Do not know

Anything special about the device? I tried to add this device manually using General device settings(action buttons, property control and property monitor), but the device did not respond

Mkomosko commented 2 years ago

Hi! Could you please also add fresh air system zhimi.airfresh.va4. Thank you!

merdok commented 2 years ago

Did you try to set the forceMiCloud to true? I suppose the device did not respond because it is micloud only device.

Mkomosko commented 2 years ago

Did you try to set the forceMiCloud to true? I suppose the device did not respond because it is micloud only device.

Thank you! It start to work. But i have a new problem - there is no fan regulation for this device, only led regulation and start/stop.

Turning on specific air system functions in plugin parameters didnt work. Could you please help me with with situiation?

And sorry about my propmlems, i have another issue with isa.camera.hlc6. Its only have on/off function in apple home. Its didnt recognise as a camera (dont see a picture).

Thank you!

merdok commented 2 years ago

@Mkomosko please create a separate issue for your device, this issue is about the device from @ForestOfDreams Please do not mix stuff up!

The camera will have no picture at the moment since I do not own such camera and cannot do the necessary development for that! About your air fresh system please open a new issue! Thanks!

ForestOfDreams commented 2 years ago

I set forceMiCloud to true, now I can turn the device on and off, but I can't control any other properties like brightness, modes, temperature control and so on. I added such switches, but the device does not respond

ForestOfDreams commented 2 years ago

I can assume that the problem is with the color settings, because after I control something with home kit, everything stops working in Mihome until I set a new color value

merdok commented 2 years ago

Can you post a debug log so I can see what is happening? Did you create the switches by yourself using the propertyControl or did they got automatically generated?

ForestOfDreams commented 2 years ago

How can I see debug log? I created these switches using property control, not automatically

merdok commented 2 years ago

Please see the bottom of the README on how to run homebridge in debug mode.

ForestOfDreams commented 2 years ago
  1. Start point: Device mode: day, brightness: 100%
  2. Set new brightness value(91) via HomeKit
  3. Device light go out
  4. Some log in debug mode: [04/02/2022, 01:15:50] [miot] [Smart fish tank] (MiCloud) Encrypted request https://api.io.mi.com/app/miotspec/prop/set - {"params":[{"did":"242176655","siid":3,"piid":1,"value":91}]} [04/02/2022, 01:15:51] [miot] [Smart fish tank] Successfully set property light:brightness to value 91! Response: [{"did":"242176655","siid":3,"piid":1,"code":0,"exe_time":0}] [04/02/2022, 01:16:01] [miot] [Smart fish tank] Splitting properties into chunks. Number of chunks: 1. Chunk size: 14 [04/02/2022, 01:16:01] [miot] [Smart fish tank] Chunks: [ [ "fish-tank:on", "fish-tank:water-pump", "fish-tank:automatic-feeding", "fish-tank:target-feeding-measure", "fish-tank:pump-flux", "fish-tank:heating", "fish-tank:temperature", "fish-tank:target-temperature", "light:brightness", "light:color", "light:mode", "tds-sensor:tds-in" ] ] [04/02/2022, 01:16:01] [miot] [Smart fish tank] (MiCloud) Encrypted request https://api.io.mi.com/app/miotspec/prop/get - {"params":[{"did":"242176655","siid":2,"piid":1},{"did":"242176655","siid":2,"piid":2},{"did":"242176655","siid":2,"piid":3},{"did":"242176655","siid":2,"piid":4},{"did":"242176655","siid":2,"piid":5},{"did":"242176655","siid":2,"piid":6},{"did":"242176655","siid":2,"piid":7},{"did":"242176655","siid":2,"piid":8},{"did":"242176655","siid":3,"piid":1},{"did":"242176655","siid":3,"piid":2},{"did":"242176655","siid":3,"piid":3},{"did":"242176655","siid":4,"piid":1}]} [04/02/2022, 01:16:03] [miot] [Smart fish tank] Error while parsing response from device for property fish-tank:target-feeding-measure. Response: {"did":"242176655","siid":2,"piid":4,"code":-704220043,"exe_time":0} [04/02/2022, 01:16:03] [miot] [Smart fish tank] Error while parsing response from device for property fish-tank:target-temperature. Response: {"did":"242176655","siid":2,"piid":8,"code":-4,"exe_time":0} [04/02/2022, 01:16:03] [miot] [Smart fish tank] Error while parsing response from device for property light:mode. Response: {"did":"242176655","siid":3,"piid":3,"code":-704220043,"exe_time":0} [04/02/2022, 01:16:03] [miot] [Smart fish tank] Device properties updated: [ "fish-tank:on: true", "fish-tank:water-pump: true", "fish-tank:automatic-feeding: false", "fish-tank:target-feeding-measure: 0", "fish-tank:pump-flux: 91", "fish-tank:heating: false", "fish-tank:temperature: 0", "fish-tank:target-temperature: 0", "light:brightness: 70", "light:color: 161", "light:mode: 1", "tds-sensor:tds-in: 16" ]
merdok commented 2 years ago

The log looks actually ok. After you set the brightness nothing happens?

ForestOfDreams commented 2 years ago

After I try to change any of light parameters (brightness, color, mode) the light on the device goes out if it was on before.

merdok commented 2 years ago

The command is sent correctly to the device and the device responds with success, so it seems that this is an issue with the device.

ForestOfDreams commented 2 years ago

Is it possible to see which color value actually set via mi home app? Because in log I always see only these values: "light:brightness: 70", "light:color: 161" despite the fact that the device works in different modes

merdok commented 2 years ago

This are the values which are reported by the micloud so i think this should be the values which are set.