Tuya-mqtt help

the main topic looks like it is no longer being updated.

and these later ones are locked.

Can someone help me with this.
I have a fan which everything else is working except for speed
But when i set DPS 3 to anything it defaults back with 6.
So setting DPS 3 to 1 sends back a state of 6.

Only on this ceiling fan, i have an arlec tower fan too. and DPS 3 works perfectly fine on that.

this is my debug dump

tuya-mqtt:command Received MQTT message ->  {"topic":"tuya/ceilingfan/dps/3/command","message":"3"} +0ms
  tuya-mqtt:command Received command for DPS3:  3 +0ms
  tuya-mqtt:tuyapi Set device bf5efd82c5fc58276b0eus -> {"dps":"3","set":3} +8s
  TuyAPI SET Payload: +3s
  TuyAPI {
  TuyAPI   devId: 'bf5efd82c5fc58276b0eus',
  TuyAPI   gwId: 'bf5efd82c5fc58276b0eus',
  TuyAPI   uid: '',
  TuyAPI   t: 1637230669,
  TuyAPI   dps: { '3': 3 }
  TuyAPI } +0ms
  TuyAPI Received data: 000055aa00000004000000070000000c00000000b82a1a070000aa55 +119ms
  TuyAPI Parsed: +1ms
  TuyAPI { payload: false, leftover: false, commandByte: 7, sequenceN: 4 } +0ms
  TuyAPI Got SET ack. +1ms
  TuyAPI Received data: 000055aa00000000000000080000004b00000000332e330000000000000f1c000000010592a7062c690d7406f13e7b8a5a551e5fc429e5c44237168011960117e8f6e704b37b5f8469ff419ba25ceabb7eb4118e21b5b50000aa55 +308ms
  TuyAPI Parsed: +1ms
  TuyAPI {
  TuyAPI   payload: { dps: { '3': '6' }, t: 1637230668 },
  TuyAPI   leftover: false,
  TuyAPI   commandByte: 8,
  TuyAPI   sequenceN: 0
  TuyAPI } +1ms
  tuya-mqtt:tuyapi Received JSON data from device bf5efd82c5fc58276b0eus -> {"3":"6"} +434ms
  tuya-mqtt:state MQTT DPS JSON: tuya/ceilingfan/dps/state ->  {"3":"6"} +9s
  mqttjs:client publish :: message `{"3":"6"}` to topic `tuya/ceilingfan/dps/state` +439ms
  mqttjs:client publish :: qos 1 +0ms
  mqttjs:client MqttClient:publish: packet cmd: publish +0ms
  mqttjs:client _sendPacket :: (mqttjs_390ec969) ::  start +0ms
  mqttjs:client storeAndSend :: store packet with cmd publish to outgoingStore +1ms
  mqttjs:client nop :: undefined +0ms
  mqttjs:client sendPacket :: packet: {
  mqttjs:client   cmd: 'publish',
  mqttjs:client   topic: 'tuya/ceilingfan/dps/state',
  mqttjs:client   payload: '{"3":"6"}',
  mqttjs:client   qos: 1,
  mqttjs:client   retain: false,
  mqttjs:client   messageId: 42234,
  mqttjs:client   dup: false
  mqttjs:client } +0ms
  mqttjs:client sendPacket :: emitting `packetsend` +1ms
  mqttjs:client sendPacket :: writing to stream +0ms
  mqtt-packet:writeToStream generate called +9s
  mqtt-packet:writeToStream generate: packet.cmd: publish +0ms
  mqtt-packet:writeToStream publish: packet: { cmd: 'publish', topic: 'tuya/ceilingfan/dps/state', payload: '{"3":"6"}', qos: 1, retain: false, messageId: 42234, dup: false } +1ms
  mqtt-packet:writeToStream writeVarByteInt: writing to stream: <Buffer 26> +0ms
  mqtt-packet:writeToStream writeNumberCached: number: 25 +1ms
  mqtt-packet:writeToStream writeNumberCached: <Buffer 00 19> +0ms
  mqtt-packet:writeToStream writeNumberCached: number: 42234 +1ms
  mqtt-packet:writeToStream writeNumberCached: <Buffer a4 fa> +0ms
  mqtt-packet:writeToStream publish: payload: '{"3":"6"}' +0ms
  mqttjs:client sendPacket :: writeToStream result true +3ms
  mqttjs:client _sendPacket :: (mqttjs_390ec969) ::  end +1ms
  tuya-mqtt:state MQTT DPS3: tuya/ceilingfan/dps/3/state ->  6 +7ms
  mqttjs:client publish :: message `6` to topic `tuya/ceilingfan/dps/3/state` +0ms
  mqttjs:client publish :: qos 1 +0ms
  mqttjs:client MqttClient:publish: packet cmd: publish +0ms
  mqttjs:client _sendPacket :: (mqttjs_390ec969) ::  start +1ms
  mqttjs:client storeAndSend :: store packet with cmd publish to outgoingStore +0ms
  mqttjs:client nop :: undefined +0ms
  mqttjs:client sendPacket :: packet: {
  mqttjs:client   cmd: 'publish',
  mqttjs:client   topic: 'tuya/ceilingfan/dps/3/state',
  mqttjs:client   payload: '6',
  mqttjs:client   qos: 1,
  mqttjs:client   retain: false,
  mqttjs:client   messageId: 42235,
  mqttjs:client   dup: false
  mqttjs:client } +0ms
  mqttjs:client sendPacket :: emitting `packetsend` +1ms
  mqttjs:client sendPacket :: writing to stream +0ms
  mqtt-packet:writeToStream generate called +3ms
  mqtt-packet:writeToStream generate: packet.cmd: publish +1ms
  mqtt-packet:writeToStream publish: packet: { cmd: 'publish', topic: 'tuya/ceilingfan/dps/3/state', payload: '6', qos: 1, retain: false, messageId: 42235, dup: false } +0ms
  mqtt-packet:writeToStream writeVarByteInt: writing to stream: <Buffer 20> +1ms
  mqtt-packet:writeToStream writeNumberCached: number: 27 +0ms
  mqtt-packet:writeToStream writeNumberCached: <Buffer 00 1b> +0ms
  mqtt-packet:writeToStream writeNumberCached: number: 42235 +1ms
  mqtt-packet:writeToStream writeNumberCached: <Buffer a4 fb> +0ms
  mqtt-packet:writeToStream publish: payload: '6' +0ms
  mqttjs:client sendPacket :: writeToStream result true +4ms
  mqttjs:client _sendPacket :: (mqttjs_390ec969) ::  end +0ms
  mqttjs:client writable stream :: parsing buffer +2ms

Hi Christopher,
are you sure the DPS 3 is correct? I have one Windclam Fan, and the DPS for the speed is DPS 62. Seems depending on the product you have. If you have an ikohs, check out the following page

DPS for Create IKOHS Fans

Yes. DPS 62 for me does nothing
DPS 3 changes speed but the payload must be the incorrect format or something for my device. When I use the smart life app to change speed dps 3 state is what is updated.

I think it’s something in the tuya-mqtt code itself

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.