nick7zmail / MajorDoMo-dev_broadlink

MajorDoMo broadlink devices support
0 stars 3 forks source link

Failures on sequential properties sets #19

Closed mosave closed 3 years ago

mosave commented 3 years ago

Sequential update of properties linked to Broadlink device properties failed if these properties are updated with single method. This could be demonstrated with properties updated via call to HYSEN.set_advanced(...).

How to reproduce:

  1. MD is installed on Windows, Broadlink module is configured as PHP module.

  2. Scan and register Hysen thermostat.

  3. Bind new device properties 'svh' and 'svl' to any MD device properties. Let's assume svh is bound to therm1.svh and svl is bound to therm1.svl

  4. Create any method updating properties with php code:

    
    setGlobal('therm1.svh', 10);
    setGlobal('therm1.svl', 30);
This code will not store svh value due to second call to set_advanced() will use unchanged 'svh' property value.

Issue may be workarounded with 0.1s delay between calls (if your system is fast enough ;) :

setGlobal('therm1.svh', 10); usleep(500000); setGlobal('therm1.svl', 30);


but this workaround is not applicable to (e.g.) Simple Device properties configurator where one of these properties will be saved only.
Thanks!