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 smb share feature for Chuangmi Camera #1482

Merged
merged 7 commits into from
Oct 10, 2022

Conversation

0x5e
Copy link
Contributor

@0x5e 0x5e commented Aug 6, 2022

The Xiaomi App have limitation in setting NAS location, it has to be in the local network. It discover the NAS then list them then let me choose. I have a NAS across the VPN and actually it's accessible, but not able to be discovered and set.
This function can help people config NAS outside the local network.

Example:

miiocli chuangmicamera --ip 192.168.60.11 --token xxxxxxxxxx set_nas_config on "smb://user:pass@192.168.40.2/camera" realtime quarter

If the share param left empty, It will keep the last config.

Tested on chuangmi.camera.ipc013

@one-leaf
Copy link

one-leaf commented Oct 9, 2022

Tested on chuangmi.camera.ip029a, working fine.

miio/chuangmi_camera.py Outdated Show resolved Hide resolved
miio/chuangmi_camera.py Outdated Show resolved Hide resolved
miio/chuangmi_camera.py Show resolved Hide resolved
@0x5e 0x5e force-pushed the feat/chuangmi-camera-smb-config branch from 773e035 to c2dd1c8 Compare October 9, 2022 15:44
Copy link
Owner

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, can be merged after the linting checks pass. Thanks @0x5e! 👍

@rytilahti rytilahti changed the title add Xiaomi Chuangmi Camera feature of smb share Add smb share feature for Chuangmi Camera Oct 9, 2022
@0x5e
Copy link
Contributor Author

0x5e commented Oct 10, 2022

Hi @rytilahti , I updated the code for black and isort checks, still failed in mypy. I'm not familiar with pyhon3 syntax, could you help me solve this error? Thanks.

miio/chuangmi_camera.py:394: error: Incompatible types in assignment (expression has type "Dict[str, Any]", target has type "IntEnum")

@0x5e
Copy link
Contributor Author

0x5e commented Oct 10, 2022

Now linting checks has passed.

miio/chuangmi_camera.py Outdated Show resolved Hide resolved
Co-authored-by: Teemu R. <tpr@iki.fi>
@0x5e 0x5e requested a review from rytilahti October 10, 2022 11:30
@rytilahti rytilahti merged commit dc55eba into rytilahti:master Oct 10, 2022
@cnlnlhb
Copy link

cnlnlhb commented Jun 25, 2023

I executed this command on the 029a02 camera, it returned ['OK'] but did not actually write. How can I adapt 029a02?
https://home.miot-spec.com/s/chuangmi.camera.029a02

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

Successfully merging this pull request may close these issues.

4 participants