openhab / openhab1-addons

Add-ons for openHAB 1.x

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[comfoair1] Fan Level fan_out_efficiency returns invalid number

bechte opened this issue · comments

Expected Behavior

Given the following items:

Number Comfoair_Steuerung "Lüftungssteuerung[]" <fan> (ComfoAir) {comfoair="activate"}
Number Comfoair_Stufe "Lüftungsstufe [%s]" <fan> (ComfoAir) {comfoair="fan_level"}
Number Comfoair_Power "Lüftungsleistung [%d %%]" <fan> (ComfoAir)
Number Comfoair_FanIn_Aktuell "Zuluft Kapazität [%d %%]" <fan> (ComfoAir) {comfoair="fan_in_efficiency"}
Number Comfoair_FanIn_Level0 "Zuluft Kapazität Stufe: Abwesend [%d %%]" <fan> (ComfoAir) {comfoair="fan_in_0"}
Number Comfoair_FanOut_Aktuell "Abluft Kapazität [%d %%]" <fan> (ComfoAir) {comfoair="fan_out_efficiency"}
Number Comfoair_FanOut_Level0 "Abluft Kapazität Stufe: Abwesend [%d %%]" <fan> (ComfoAir) {comfoair="fan_out_0"}

When I set the fan levels for fan_in_0 and fan_out_0 to integer values from a rule like this:

rule "Lüftungsleistung einstellen"
when
    Item Comfoair_Power received command
then
    val power = (receivedCommand as DecimalType).intValue
    if (power < 0 || power > 100) {
        logError("ComfoAir", "Invalid power parameter! Value must be in range [0,100] but was: " + power)
        return;
    }
    
    var stufe = 1
    if (power < 5) {
        stufe = 1
        Comfoair_FanIn_Level0.sendCommand(0)
        Comfoair_FanOut_Level0.sendCommand(0)
    } else if (power < 25) {
        // Stufe: Abwesend
        stufe = 1
        Comfoair_FanIn_Level0.sendCommand(power)
        Comfoair_FanOut_Level0.sendCommand(power - 2)
    }

    if (Comfoair_Stufe.state != stufe) {
        createTimer(now.plusMillis(500), [|
            Comfoair_Stufe.sendCommand(stufe)
        ])
    }
end

I expect the fan levels to be set correctly, and the effective fan levels reflect this change. But unfortunately, while the fan_out_0 gets set to a value, the fan_out_efficiency has an offset of exactly -5 to what I have set it fan_out_0 to. Example:

image
image

You can see, that based on the rule, the values are set correctly to:

  • fan_in_0 = 22
  • fan_out_0 = 20

But the values for fan_out_efficiency has an offset of -5! This offset only happens after I have changed the values a couple of times. If I restart the process, e.g. by setting the values to zero, this offset shift does not happen.

Steps to Reproduce (for bugs)

  • Use the items from above
  • Use the rules from above
  • Use the following sitemap
sitemap comfoair label="ComfoAir" {
	Frame label="Übersicht" {
		Switch item=Comfoair_Steuerung mappings=[1="Openhab",0="CC Ease"]
	}
	Frame label="Steuerung" {
		Slider item=Comfoair_Power minValue=0 maxValue=100 step=1
		Setpoint item=Comfoair_Stufe minValue=1 maxValue=4 step=1
		Text item=Comfoair_FanIn_Aktuell
		Text item=Comfoair_FanOut_Aktuell
	}
}
  • Slide the Power value to several arbitrary numbers between 6 and 24 (including)

Your Environment

  • Version used: openhab version 2.5.2.1 Release Build (plugins: comfoair1)
  • Environment name and version: Chrome Browser 80.0.3987.149
  • Operating System and version: iMac, MacOS 10.13.6

The state of outgoing_fan is also effected, i.e. it also shows the "wrong" value with an offset of -5. So the statement outgoing_fan==fan_out_efficiency holds true at any time. Where does this offset come from?

Here is a log extract on level TRACE for the situation of using the slider:

2020-04-08 23:53:35.736 [ome.event.ItemCommandEvent] - Item 'Comfoair_Power' received command 23

2020-04-08 23:53:35.764 [vent.ItemStateChangedEvent] - Comfoair_Power changed from 35 to 23

==> /var/log/openhab2/openhab.log <==

2020-04-08 23:53:35.776 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

==> /var/log/openhab2/events.log <==

2020-04-08 23:53:35.779 [ome.event.ItemCommandEvent] - Item 'Comfoair_FanIn_Level0' received command 23

==> /var/log/openhab2/openhab.log <==

2020-04-08 23:53:35.780 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

==> /var/log/openhab2/events.log <==

2020-04-08 23:53:35.786 [ome.event.ItemCommandEvent] - Item 'Comfoair_FanOut_Level0' received command 21

==> /var/log/openhab2/openhab.log <==

2020-04-08 23:53:35.987 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive RAW DATA:  07 f3 07 f0 00 ce 0e 16 20 41 18 23 45 1b 23 02 01 5f 64 00 00 84 07 0f

2020-04-08 23:53:35.992 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive CMD: ce  DATA:  16 20 41 18 23 45 1b 23 02 01 5f 64 00 00

2020-04-08 23:53:35.996 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f3

2020-04-08 23:53:36.000 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cf 09 16 20 41 17 23 45 5f 64 00 3e 07 0f

2020-04-08 23:53:36.004 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cf 09 16 20 41 17 23 45 5f 64 00 3e 07 0f

2020-04-08 23:53:36.210 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

2020-04-08 23:53:36.214 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

==> /var/log/openhab2/events.log <==

2020-04-08 23:53:36.293 [ome.event.ItemCommandEvent] - Item 'Comfoair_Stufe' received command 1

2020-04-08 23:53:36.325 [ome.event.ItemCommandEvent] - Item 'Comfoair_FanIn_Level1' received command 48

2020-04-08 23:53:36.333 [ome.event.ItemCommandEvent] - Item 'Comfoair_FanOut_Level1' received command 45

2020-04-08 23:53:36.338 [ome.event.ItemCommandEvent] - Item 'Comfoair_FanIn_Level2' received command 69

2020-04-08 23:53:36.343 [ome.event.ItemCommandEvent] - Item 'Comfoair_FanOut_Level2' received command 65

2020-04-08 23:53:36.347 [ome.event.ItemCommandEvent] - Item 'Comfoair_FanIn_Level3' received command 100

2020-04-08 23:53:36.351 [ome.event.ItemCommandEvent] - Item 'Comfoair_FanOut_Level3' received command 95

==> /var/log/openhab2/openhab.log <==

2020-04-08 23:53:36.420 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive RAW DATA:  07 f3 07 f0 00 ce 0e 16 20 41 17 23 45 1b 23 02 01 5f 64 00 00 83 07 0f

2020-04-08 23:53:36.423 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive CMD: ce  DATA:  16 20 41 17 23 45 1b 23 02 01 5f 64 00 00

2020-04-08 23:53:36.426 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f3

2020-04-08 23:53:36.429 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cf 09 15 20 41 17 23 45 5f 64 00 3d 07 0f

2020-04-08 23:53:36.431 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cf 09 15 20 41 17 23 45 5f 64 00 3d 07 0f

==> /var/log/openhab2/events.log <==

2020-04-08 23:53:36.637 [vent.ItemStateChangedEvent] - Comfoair_FanIn_Level0 changed from 24 to 23

==> /var/log/openhab2/openhab.log <==

2020-04-08 23:53:36.639 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 99 01 01 48 07 0f

2020-04-08 23:53:36.642 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 99 01 01 48 07 0f

2020-04-08 23:53:36.853 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

2020-04-08 23:53:36.855 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

2020-04-08 23:53:37.063 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive RAW DATA:  07 f3 07 f0 00 ce 0e 15 20 41 17 23 45 1b 23 01 01 5f 64 00 00 81 07 0f

2020-04-08 23:53:37.065 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive CMD: ce  DATA:  15 20 41 17 23 45 1b 23 01 01 5f 64 00 00

2020-04-08 23:53:37.067 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f3

2020-04-08 23:53:37.070 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cf 09 15 20 41 17 30 45 5f 64 00 4a 07 0f

2020-04-08 23:53:37.072 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cf 09 15 20 41 17 30 45 5f 64 00 4a 07 0f

2020-04-08 23:53:37.275 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

2020-04-08 23:53:37.278 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

2020-04-08 23:53:37.483 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive RAW DATA:  07 f3 07 f0 00 ce 0e 15 20 41 17 30 45 10 17 01 01 5f 64 00 00 77 07 0f

2020-04-08 23:53:37.485 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive CMD: ce  DATA:  15 20 41 17 30 45 10 17 01 01 5f 64 00 00

2020-04-08 23:53:37.487 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f3

2020-04-08 23:53:37.489 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cf 09 15 2d 41 17 30 45 5f 64 00 57 07 0f

2020-04-08 23:53:37.492 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cf 09 15 2d 41 17 30 45 5f 64 00 57 07 0f

2020-04-08 23:53:37.695 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

2020-04-08 23:53:37.698 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

2020-04-08 23:53:37.903 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive RAW DATA:  07 f3 07 f0 00 ce 0e 15 2d 41 17 30 45 10 17 01 01 5f 64 00 00 84 07 0f

2020-04-08 23:53:37.906 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive CMD: ce  DATA:  15 2d 41 17 30 45 10 17 01 01 5f 64 00 00

2020-04-08 23:53:37.908 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f3

2020-04-08 23:53:37.911 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cf 09 15 2d 41 17 30 45 5f 64 00 57 07 0f

2020-04-08 23:53:37.914 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cf 09 15 2d 41 17 30 45 5f 64 00 57 07 0f

2020-04-08 23:53:38.119 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

2020-04-08 23:53:38.121 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

2020-04-08 23:53:38.326 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive RAW DATA:  07 f3 07 f0 00 ce 0e 15 2d 41 17 30 45 10 17 01 01 5f 64 00 00 84 07 0f

2020-04-08 23:53:38.329 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive CMD: ce  DATA:  15 2d 41 17 30 45 10 17 01 01 5f 64 00 00

2020-04-08 23:53:38.331 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f3

2020-04-08 23:53:38.334 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cf 09 15 2d 41 17 30 45 5f 64 00 57 07 0f

2020-04-08 23:53:38.337 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cf 09 15 2d 41 17 30 45 5f 64 00 57 07 0f

2020-04-08 23:53:38.541 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

2020-04-08 23:53:38.544 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

2020-04-08 23:53:38.748 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive RAW DATA:  07 f3 07 f0 00 ce 0e 15 2d 41 17 30 45 10 17 01 01 5f 64 00 00 84 07 0f

2020-04-08 23:53:38.751 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive CMD: ce  DATA:  15 2d 41 17 30 45 10 17 01 01 5f 64 00 00

2020-04-08 23:53:38.754 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f3

2020-04-08 23:53:38.756 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cf 09 15 2d 41 17 30 45 5f 64 00 57 07 0f

2020-04-08 23:53:38.759 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cf 09 15 2d 41 17 30 45 5f 64 00 57 07 0f

2020-04-08 23:53:38.963 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

2020-04-08 23:53:38.966 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

2020-04-08 23:53:39.170 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive RAW DATA:  07 f3 07 f0 00 ce 0e 15 2d 41 17 30 45 10 17 01 01 5f 64 00 00 84 07 0f

2020-04-08 23:53:39.173 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive CMD: ce  DATA:  15 2d 41 17 30 45 10 17 01 01 5f 64 00 00

2020-04-08 23:53:39.176 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f3

2020-04-08 23:53:39.179 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cf 09 15 2d 41 17 30 45 5f 64 00 57 07 0f

2020-04-08 23:53:39.181 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cf 09 15 2d 41 17 30 45 5f 64 00 57 07 0f

2020-04-08 23:53:39.385 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 0b 00 b8 07 0f

2020-04-08 23:53:39.387 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 0b 00 b8 07 0f

==> /var/log/openhab2/events.log <==

2020-04-08 23:53:39.390 [vent.ItemStateChangedEvent] - Comfoair_FanOut_Level0 changed from 22 to 21

2020-04-08 23:53:39.393 [vent.ItemStateChangedEvent] - Comfoair_Stufe changed from 2 to 1

2020-04-08 23:53:39.395 [vent.ItemStateChangedEvent] - Comfoair_FanIn_Level1 changed from 35 to 48

2020-04-08 23:53:39.397 [vent.ItemStateChangedEvent] - Comfoair_FanOut_Level1 changed from 32 to 45

==> /var/log/openhab2/openhab.log <==

2020-04-08 23:53:39.590 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive RAW DATA:  07 f3 07 f0 00 0c 06 17 10 06 f6 09 0e f9 07 0f

2020-04-08 23:53:39.593 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive CMD: 0c  DATA:  17 10 06 f6 09 0e

2020-04-08 23:53:39.595 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f3

2020-04-08 23:53:39.602 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

2020-04-08 23:53:39.628 [TRACE] [.comfoair.handling.ComfoAirConnector] - send DATA:  07 f0 00 cd 00 7a 07 0f

==> /var/log/openhab2/events.log <==

2020-04-08 23:53:39.641 [vent.ItemStateChangedEvent] - Comfoair_FanIn_Aktuell changed from 35 to 23

2020-04-08 23:53:39.643 [vent.ItemStateChangedEvent] - Comfoair_FanOut_Aktuell changed from 27 to 16

2020-04-08 23:53:39.645 [vent.ItemStateChangedEvent] - Comfoair_FanIn_RPM changed from 1176 to 1052

2020-04-08 23:53:39.648 [vent.ItemStateChangedEvent] - Comfoair_FanOut_RPM changed from 932 to 808

The log shows some more events and commands, as I also reset the uneffected fan levels to their defaults. Meaning:

  • if the Slider is set between 0-24 I switch to "Away Mode / Level 0"
  • if the Slider is set between 25-49 I switch to "Level 1"
  • if the Slider is set between 50-74 I switch to "Level 2"
  • if the Slider is set between 75-100 I switch to "Level 3"
    The fan values of the according level are set, like in my example above "Away Mode / Level 0", while the other are reset to their defaults, such that I can switch to them using the Mode switch that is a Setpoint (see sitemap above).

Current state of my analysis:

In the received data:

2020-04-08 23:53:39.590 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive RAW DATA:  07 f3 07 f0 00 0c 06 17 10 06 f6 09 0e f9 07 0f

2020-04-08 23:53:39.593 [TRACE] [.comfoair.handling.ComfoAirConnector] - receive CMD: 0c  DATA:  17 10 06 f6 09 0e

The values of the field fan_out_efficiency is really set to the offset value, therefore, I wonder if the CA350 has the bug?

I just wonder why it returns different values from those that are set via the fan_out_0 parameter.

This repository is closed to new code.