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

大佬,洗碗机等能不能新增启动的开关,目前看文档里面只有电源的开关,没有启动的开关 #442

Open
komes1 opened this issue Jan 6, 2025 · 7 comments
Labels
enhancement New feature or request

Comments

@komes1
Copy link

komes1 commented Jan 6, 2025

设备类型及型号 (SN)

P60洗碗机

新功能的具体描述

想实现在洗碗机旁边放个按钮或者语音,在今天有碗洗的情况下,点击按钮实现预约晚上10点以后(省电),开始洗碗,这对老年人比较友好.目前是每次还得在美的美居上面一步步去预约.

@komes1 komes1 added the enhancement New feature or request label Jan 6, 2025
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: Sir, is it possible to add a new start switch for dishwashers, etc. Currently, the document only has a power switch and no start switch.

Device type and model (SN)

P60 dishwasher

Detailed description of new features

I want to put a button or voice next to the dishwasher. If there are dishes to be washed today, click the button to make an appointment to start washing the dishes after 10 pm (power saving). This is more friendly to the elderly. Currently, every time You have to make an appointment step by step on Midea Mercure.

@wuwentao
Copy link
Owner

wuwentao commented Jan 6, 2025

一般的设备操作,需要先选择一个模式,再选择开始按键,都需要至少二步选择操作来实现,而HA里面只有一个开关,一次点击,完成所有,这就造成不能先选择模式,再选择开关这种连续二步的操作。
所以,这种只能针对某个工作模式做成一个单独的开关,全部使用预设参数来启动。
当然,也许有分多步操作的方法,不过也需要根据实际操作和实际情况具体确认HA中可用的流程。

那么最大的问题就是:哪个模式适合所有洗碗机设备?最常用,也最普遍。

这也就是为什么只有电源的原因之一吧

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


General equipment operation requires selecting a mode first, and then selecting the start button, which requires at least two steps of selection operations. However, there is only one switch in HA, which can be completed with one click. This makes it impossible to select the mode first and then select the switch. This is a two-step operation.
Therefore, this kind of switch can only be made as a separate switch for a certain working mode, and all can be started using preset parameters.

So the big question is: which model is suitable for all dishwasher appliances? The most commonly used and common.

This is one of the reasons why there is only a power supply

@komes1
Copy link
Author

komes1 commented Jan 6, 2025

感谢解惑!hassbian原帖里面也有不少人问这个问题,大佬可不可以给个思路,怎么去获取这些模式,开关等?我们可以根据自己有的设备去测试,然后贡献代码...再次感谢!

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Thanks for clearing up the confusion! Many people asked this question in the original post of hassbian. Can you give me some ideas on how to obtain these modes, switches, etc.? We can test it based on the equipment we have, and then contribute the code... Again grateful!

@wuwentao
Copy link
Owner

wuwentao commented Jan 6, 2025

这个可能看看是否需要增加一个简易的文档说明基本流程和方法,目前应该是都没有。
基本上大部分数据都是在当前midea-local这个python3的pip package中,源码里面应该都加了不少注释和说明。

  1. 使用midealocal根据设备下载lua协议
  2. 根据lua协议,以及其他设备现有例子,新增query message,生成对于的hex query报文,发送给设备,解析设备回复的response hex报文为python数据,供HA中sensor只读的数据使用。
  3. 根据lua协议,以及其他设备现有例子,新增set message报文,供Switch这种开关控制功能使用,同时set message也需要解析hex到json,打印debug log。
  4. 最后HA中使用Switch,sensor等api去调用这些设备对应的api实现读数据或者控制设备。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


We may want to see if we need to add a simple document to explain the basic process and methods. Currently, there should be none.
Basically, most of the data is in the current midea-local python3 pip package, and there should be a lot of comments and explanations added to the source code.

  1. Use midealocal to download the Lua protocol according to the device
  2. According to the Lua protocol and existing examples of other devices, add a new query message, generate the corresponding hex query message, send it to the device, and parse the response hex message returned by the device into python data for read-only data by the sensor in HA use.
  3. Based on the Lua protocol and existing examples of other devices, a new set message message is added for use by switch control functions such as Switch. At the same time, the set message also needs to parse hex to json and print the debug log.
  4. Finally, APIs such as Switch and sensor are used in HA to call the APIs corresponding to these devices to read data or control the devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants