[APP][Pro] Tuya Local

Hi Andi,

while you’re mastering the challenge with the thermostats, I’ve integrated another device into your app.

A fan with the following DPs:

DP 1 = true / false → on / off

DP 2 = 1 / 2 / 3 → propeller speed

DP 3 = normal / sleep → noise reduction

DP 8 = true / false → swing on / off

DP 11 = 0 / 1 / 2 / 3 / 4 → hours of countdown

DP 12 = 0 / 60 / 120 / 180 / 240 → minutes of count down ( automaticaly set with DP 11)

The device created so far does not yet fully reflect all of its capabilities.

Maybe you’ll find some time to work on this one as well.

Hi Jeppe,

Glad it works — thanks for confirming both directions.

The HomeKitty thing has a simple cause: Apple Home only knows off, heat, cool and auto. Your unit has five modes, including dry and fan, so this app uses its own mode setting rather than Homey’s standard one. A bridge can only pass on what it recognises, which is why your temperature works and the mode doesn’t.

I’m going to leave it as it is. Making the mode bridgeable would mean dropping dry and fan for everyone, and that’s a worse trade than the one you’ve already solved yourself — your Advanced Virtual Device does the job and lets you pick which modes Apple Home sees.

Kind regards,
Andi

Hi Dietrich,

Good news: most of your fan was already supported — the settings just weren’t obvious. Here’s the full mapping:

Your DP Setting Value
1 On/Off DP 1
2 Fan Speed DP 2
3 Mode DP 3
8 Oscillate DP 8
11 Countdown Timer DP 11
12 Countdown Left DP 12
Two things you need to change by hand.

Speed DP → 0. It defaults to 3, which is where many fans put a percentage speed and where yours puts the mode. With both pointing at DP 3 the slider wins and your mode is lost entirely — that’s almost certainly why the device felt incomplete.

Fan speed values → low=1,medium=2,high=3. Your speeds are bare numbers, so until now the picker would have shown 1, 2 and 3. That form is new in 1.0.248 — the left side is what Homey shows and what flows use, the right side is what goes to the fan. Your modes already have names, so Mode values → normal,sleep as they are.

The countdown pair works as you’d expect: DP 11 is the one you set, DP 12 is what the fan reports back on its own.

Kind regards,
Andi

Andi

I’ve had another unscheduled feed on my Petlibro Pet Feeder.

The feed occurred at 02:11, just after I re-booted my SHS althouh I had another one earlier in the day.

Dump id: 7c088347-6b1b-4029-8584-59e941cfb602

Just to remind you, I have two flows set up against the feeder; one is time-based and does a single portion feed at 06:00 every day, the second is set up to respond to a Google voice command and runs three or four times a day, again with just one portion.

Thanks

Stephen

Hi Andi,

So sorry to keep bugging you, but I just ran into another bug, while setting modes in flows.

v1.0.248: Mode/fan value mapping: flow card dropdown sends name=value instead of name
With Mode values auto=0,cool=1,dehumidify=2,fan=3,heat=4, the “Set AC mode” and “Set AC fan speed” dropdowns only offer Cool=1, Heat=4 etc. and fail with: Invalid enum capability (ac_mode) value: cool=1. Expected: auto,cool,dehumidify,fan,heat. The device UI and the capability themselves work fine.

Hi Jeppe,

Not a bother at all — that’s a precise report and the error message names the cause exactly.

The flow card dropdowns were building their list by hand: they cut the setting at the commas and used each piece as both the label and the value. Fine while a list held only plain values, wrong the moment it held a mapping — which is a feature I added two versions ago without touching these. So the card handed cool=1 to a capability that knows cool.

Your tile and the capability were right all along, which is why everything except flows worked.

Fixed in the next version, and in all ten drivers that have such a dropdown rather than only the two that accept mappings today — so the next one to get them won’t need this found again.

You’ve now found three real bugs in three versions. Please keep going.

Hi Stephen,

Found a real bug in your log: 1.5 seconds after the app connected it announced “Feeding completed”. The trigger compares the motor state against its previous value — and Homey keeps that across a restart. So if the app last stopped while it read feeding, the first honest standby afterwards looked like a completed feed. Every restart.

Please update — you’re on 1.0.237, and this is fixed in 1.0.249: Tuya Local | Homey

But I can’t tell from the log whether your feeder actually dispensed anything, and that’s the part that matters. How did you know about the feed — did Homey tell you, or was there food in the bowl?

If it was Homey’s timeline, the update settles it. If there was food, I’ve fixed a bug standing next to yours rather than yours, and I’ll keep digging — your feeder’s own log recorded two entries ten seconds apart just after the app reconnected, and neither of your flows was involved.

Kind regards,
Andi

HellonAndy,

I got the fan speed working with low/medium/high but I can’t get rid of the %-slider.

Maybe I missed something.

And there is also. a problem with the timer.

It is set to two hours but the DP is 0

Hi Dietrich,

Both of those are bugs, and you did nothing wrong.

The slider. Setting Speed DP to 0 was exactly right — the slider just couldn’t go away, because it was a fixed part of the driver rather than something tied to that setting. Fixed now: with Speed DP at 0 it disappears.

The timer. The tile offers cancel, 1h … 24h; your fan wants a plain 0 to 4, where the number is hours. So selecting two hours sent “2h” to a device expecting “2”, and nothing happened — which is exactly what your screenshot shows, DP 11 sitting at “0”.

There’s a new setting for it: Timer uses plain numbers. Switch it on and 2h sends 2, while 3 coming back from the fan reads as 3h.

Both in the next version: Tuya Local | Homey

Thanks — that’s two more found by looking rather than guessing.

Kind regards,
Andi

Thank you, that’s working now.

Only the DP 12 is not correct. The debug shows 59 what is the remaining time from the timer in minutes and the device shows 24 hours what is definetly wrong.

Hi Andi

Perfect thanks so much again. I think there’s another bug that has crept into vX.X.250 :slight_smile:

Hi Jeppe,

That’s mine, and from the last version — thank you for the screenshot, the error message names it exactly.

Fixed in the next version. Sorry for the churn — you’ve found four now, and each one has been real.

Kind regards,
Andi

Hi Andi

I’ll install the update and let you know if I have any further problems,

I actually heard the feeder dispensing.

Stephen

Hi Andy,

In general it’s working now. But I think it would be better to show the remaining time in minutes insted of hours like the DP 12 does.

Your work is realy quick and much apreciated.

Hi Dietrich,

You’re right, and my first fix was only half of it. I converted minutes into hours — 59 became 1.0 h — which is correct and throws away exactly the information you want. On a timer that stops at four hours, “59 min” tells you something; “1.0 h” tells you almost nothing.

So there’s no conversion any more. The tile simply takes its unit from the same setting and shows what the fan reports: your 59 stays 59 min, and four hours reads as 240 min. Nothing to change on your side — the setting you already have is what picks the unit.

Thanks for pushing back on that rather than living with it.

Kind regards,
Andi

It’s working perfect now. Thank you. :+1:

Now I have a new one :thinking:

I added a device as a Präsenzsensor what is actually a movement sensor.

Präsenzsensor (presence_sensor)
Last update: 28.9.2026, 15:17:45

DP Value Type
20 false boolean
21 “white” string
51 “auto” string
52 “none” string
53 “2000lux” string
54 “low” string
55 5 number
56 true boolean
57 0 number

The DPs I could determine are:

DP 20 = true / false → on/off

DP 53 = 5l ux / 10 lux / 50 lux / 300 lux / 2000 lux → Ambient light sensor dark / evening / day

DP 54 = low / middle / high → motion distance

DP 55 = 5 / 6 / 7…/ 3600 → full light duration

DP 56 = true / false → sensor / manuell

The other DP’s might be for a sensor with integrated.light.

DEVICE Präsenzsensor
driver presence_sensor
model STARLUX 05DW sensor (product hpjrxo4jplpgfjpq)
device id bfa611…
available yes
protocol configured 3.3, connected 3.3 ip 192.168.11.1
status Connected · last seen 28.09.26, 15:17:42 · poll 0s
history 43 connections since app start · up 15h 7m total · avg 21m 6s · longest 1h 40m
packets 171 received · 0.00/s while connected · data ever received: yes
DP mapping
dp_alarm 0
dp_detection_delay 0
dp_distance 0
dp_fading_time 0
dp_far_detection 0
dp_luminance 0
dp_near_detection 0
dp_presence 0
dp_sensitivity 0
other settings
command_gap_ms 100
fire_and_forget false
lock_protocol false
offline_grace_seconds 60
reconnect_interval 0
live DPs (updated 2026-09-28T13:17:45.340Z)
DP 20 false boolean
DP 21 “white” string
DP 51 “auto” string
DP 52 “none” string
DP 53 “2000lux” string
DP 54 “low” string
DP 55 5 number
DP 56 true boolean
DP 57 0 number
cloud spec code / dp / type / value / range
switch_led 20 Boolean null
work_mode 21 Enum null white,colour
control_data 28 String null
device_mode 51 Enum null auto,manual
pir_state 52 enum null pir,none
cds 53 Enum null 2000lux,300lux,50lux,10lux,5lux,now
pir_sensitivity 54 Enum null low,middle,high
pir_delay 55 Integer null 5-3600 s
switch_pir 56 Boolean null
pir_resume_countdown 57 value null

Hi Andi,

I noticed another issue today, this time with the Wallbox consumption shown in Homey Energy.

The live values from the charger look correct and match the original Tuya app almost exactly.

At around 18:05 the Tuya app showed:

  • Charging active
  • 223 V
  • 15.2 A
  • 3.4 kW
  • Session energy: 2.2 kWh
  • Session duration: 00:39:07

Homey showed at the same time:

  • evcharger_charging: true
  • plugged_in_charging
  • approx. 225 V
  • 15.2 A
  • 3.4 kW
  • charge_session_energy: 2.2 kWh

So the live data and session energy look perfect.

However, Homey’s Energy dashboard shows the Wallbox as having consumed 7.2 kWh today, even though the current charging session has only delivered 2.2 kWh.

The cumulative meter_power.charged value was around 156.108 kWh at the time of the screenshot and shortly afterwards was already 156.292 kWh.

Could Homey Energy be deriving the daily consumption from meter_power.charged, and could something about how that counter is updated be causing the 7.2 kWh daily figure?

The interesting comparison is:

  • Tuya session energy: 2.2 kWh
  • Homey charge_session_energy: 2.2 kWh
  • Homey Energy dashboard Wallbox consumption today: 7.2 kWh

I have screenshots showing all three values taken at essentially the same time.

Kind regards,
Sebastian

Hi Dietrich,

The bug is real and fixed: DP 52 is your motion state, reporting pir / none, and the driver only recognised the word presence. It compared false every time — the tile would have sat on “no motion” while the data point changed underneath it, with nothing in the log, because nothing was failing.

Set Presence DP to 52 and motion works. One correction to your own list: DP 54 is sensitivity (low / middle / high), not distance.

What the driver can’t do yet, honestly. It was built around an mmWave sensor and only reads four things: motion, fault, distance, illuminance. Your dusk threshold (53), sensitivity (54), delay (55) and PIR enable (56) are all settable on the device, but there is nothing in this driver to set them from — and the sensitivity and delay settings you see in the device settings expect numbers, where yours are words. So they won’t help you.

If you’d find those four useful as real controls in Homey, say so and I’ll look at adding them. It’s a proper piece of work rather than a one-line fix, so I’d rather know it’s wanted.

Kind regards,
Andi

Hi Sebastian,

I’ve been through this one and I don’t think it’s a bug — but here’s the reasoning rather than just the conclusion, so you can check it.

Three things can feed meter_power.charged, and they’re mutually exclusive by configuration: power integration (when the energy source is Power or Estimate), session-counter increments (Session), and completed charge records (Session, and only when the live counter isn’t also in use). Exactly one runs.

Your own numbers argue against double-counting. The counter went 156.108 → 156.292, a rise of 0.184 kWh. At the 3.4 kW you were drawing, that’s about three minutes of charging. If something were counting twice, it would climb at 6.8 kW and cover the same ground in half the time.

7.2 − 2.2 = 5.0 kWh. So the question is simply: did you charge earlier today? Homey Energy builds its daily figure from the difference in that counter since midnight, so it includes every session of the day, not just the one running. Your charger’s own history screen — the one showing 110 sessions — will list today’s entries; if they add up to about 5 kWh before this one, everything agrees and there’s nothing to fix.

If they don’t add up, tell me and I’ll take it apart properly. I’d also want to know your Total energy source setting, since that decides which of the three paths is running.

Kind regards,
Andi