-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Mi Smart Standing Fan 2 #37
Comments
Sorry, here is the same as txt-file with better form: |
DefineDevice[22] already exists in line 135, pls use 23. Which Definition File is used for? Yes, shure i will add it in the script, working on it, i think in an hour or so its updated. |
I'm sorry, i have not the newest version in my iobroker, in my script was 22 not used :-) i will change it. |
it was hard to get it working, not because of your script, but i have all IoT devices in an extra subnet which is sepereated by a firewall. All firewall-rules were correct, but the fan did not work. The error is: xiaomi/mi devices do not answer to requests of devices which are not in the same subnet. i changed my firewall to do a 1:1 nat between iobroker and the IoT-subnet and now i get responses. I used the settings of 'dmaker.fan.p15' and removed the indicator light, which is not supported. |
Ok, tnx, see V 0.2.23 |
Can we close here, any problems? |
sure, my fan is working. |
@j-r79 this seems broken for me (see issue 59). is it still working for you? |
I'm sorry, i switched to HAM-xiaomifan a while ago... |
Hi,
i changed your script and added the device-file:
dmaker.fan.p18.js.txt
In the devices list i added:
DefineDevice[22] = { // Tested and working info: {}, model: "dmaker.fan.p18",// https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:fan:0000A005:dmaker-p18:1 description: "Mi Smart Standing Fan 2", setter: { "fan.on": async function (obj, val) { await device[obj].setPower(val) }, "fan.mode": async function (obj, val) { await device[obj].setMode(val) }, "fan.fan-level": async function (obj, val) { await device[obj].setFanLevel(val) }, "fan.horizontal-swing": async function (obj, val) { await device[obj].setHorizontalSwing(val) }, "fan.horizontal-angle": async function (obj, val) { await device[obj].setHorizontalAngle(val) }, "alarm.alarm": async function (obj, val) { await device[obj].setAlarm(val) }, "motor-controller.motor-control": async function (obj, val) { await device[obj].setMotorController(val) }, "physical-controls-locked.physical-controls-locked": async function (obj, val) { await device[obj].setChildLock(val) }, "off-delay-time.off-delay-time": async function (obj, val) { await device[obj].setOffDelayTime(val) } }, common: [{ name: "fan.on", type: "boolean", role: "switch", read: true, write: true }, { name: "fan.mode", type: "number", role: "switch", read: true, write: true, min: 0, max: 1, states: { 0: "Straight Wind", 1: "Natural Wind" } }, { name: "fan.fan-level", type: "number", role: "switch", read: true, write: true, min: 1, max: 4, states: { 1: "Slow", 2: "Middle", 3: "High", 4: "Turbo" } }, { name: "fan.horizontal-swing", type: "boolean", role: "switch", read: true, write: true }, { name: "fan.horizontal-angle", type: "number", role: "switch", read: true, write: true, min: 30, max: 140, unit: "°", states: { 30: "30°", 60: "60°", 90: "90°", 120: "120°", 140: "140°" } }, { name: "fan.status", type: "number", role: "indicator", read: true, write: false, min: 1, max: 100 }, { name: "alarm.alarm", type: "boolean", role: "switch", read: true, write: true }, { name: "motor-controller.motor-control", type: "number", role: "switch", read: false, write: true, min: 0, max: 2, states: { 0: "None", 1: "Left", 2: "Right" } }, { name: "physical-controls-locked.physical-controls-locked", type: "boolean", role: "switch", read: true, write: true, min: false, max: true }, { name: "off-delay-time.off-delay-time", type: "number", role: "switch", read: true, write: true, min: 0, max: 480, unit: "m" } ] };
Maybe you can add the support in your official script.
The text was updated successfully, but these errors were encountered: