openshwprojects / OpenBK7231T_App

Open source firmware (Tasmota/Esphome replacement) for BK7231T, BK7231N, BL2028N, T34, XR809, W800/W801, W600/W601 and BL602
https://openbekeniot.github.io/webapp/devicesList.html
1.39k stars 241 forks source link

Tasmota FANSPEED command not found #925

Open n8man opened 11 months ago

n8man commented 11 months ago

Describe the bug Tasmota supports a FANSPEED command which doesn't appear to exist in OpenBeken... But maybe I'm doing this wrong.

Firmware:

// fan switch dpId 60 bool (type 1) setChannelLabel 1 FanSwitch setChannelType 1 toggle linkTuyaMCUOutputToChannel 60 1 1

// light switch dpId 20 bool (type 1) setChannelLabel 2 Light setChannelType 2 toggle linkTuyaMCUOutputToChannel 20 1 2

// fan speed dpId 62 enum (type 4) setChannelLabel 3 FanSpeed setChannelType 3 OffLowMidHigh linkTuyaMCUOutputToChannel 62 4 3

// light dimmer dpId 22 value (type 2) setChannelLabel 4 Dimmer setChannelType 4 dimmer linkTuyaMCUOutputToChannel 22 2 4



**To Reproduce**
Steps to reproduce the behavior:
1. Go to /cmd_tool
2. Run command `FANSPEED 1`
3. See error `CMD:cmd FANSPEED NOT found (args 2)`
openshwprojects commented 11 months ago

Hello, I think that with our new flexible dpID mapping system, you can just use: setChannel 3 2 etc etc, to set channel 3 which you have mapped to fan speed...

This is a very flexible approach because channels are like variables and are fully scriptable

n8man commented 11 months ago

@openshwprojects that's true. The issue was that I was trying to use a tasmota "driver" within Hubitat which appeared to rely on the FANSPEED command. I can hack up the driver to use setChannel, but then hub/driver would need to know the implementation detail of what channel is being used to specify the fan speed. I was hoping that openbeken supported FANSPEED and that I just needed to do some kind of mapping on the device to keep that implementation detail (channel) hidden from the hub.

Not a big deal at all though.

Is the DIMMER command implemented?

openshwprojects commented 11 months ago

Ah, I see, you need it for Hubitat... No problem there, I can implement those commands if they are needed by a third party device.

Let me know what you need and what kind of arguments should it take and I can add it to the codebase for you.