homebridge-mqttthing icon indicating copy to clipboard operation
homebridge-mqttthing copied to clipboard

Swing Mode is reporting as 'undefined', MQTT Explorer is showing correct value on configured topic

Open piejanssens opened this issue 2 years ago • 4 comments

HomeBridge log:

[6/7/2022, 2:22:08 PM] [homebridge-mqttthing] This plugin generated a warning from the characteristic 'Swing Mode': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info.

MQTT Explorer: Schermafbeelding 2022-06-07 om 14 25 52

homebridge-mqttthing config:

        {
            "type": "heaterCooler",
            "name": "Hi Sense AC",
            "url": "mqtt://xxx:1883",
            "logMqtt": true,
            "topics": {
                "getCurrentHeaterCoolerState": "hisense_ac/ca2c4f5f18c3/t_work_mode/status",
                "setTargetHeaterCoolerState": "hisense_ac/ca2c4f5f18c3/t_work_mode/command",
                "getCurrentTemperature": {
                    "topic": "hisense_ac/ca2c4f5f18c3/f_temp_in/status",
                    "apply": "return parseFloat(message)"
                },
                "getTargetTemperature": "hisense_ac/ca2c4f5f18c3/t_temp/status",
                "setTargetTemperature": "hisense_ac/ca2c4f5f18c3/t_temp/command",
                "getRotationSpeed": {
                    "topic": "hisense_ac/ca2c4f5f18c3/t_fan_speed/status",
                    "apply": "return message === 'auto' ? 50 : 20 * ['lower','low','medium','high','higher'].indexOf(message);"
                },
                "setRotationSpeed": {
                    "topic": "hisense_ac/ca2c4f5f18c3/t_fan_speed/command",
                    "apply": "return ['lower','low','medium','high','higher'][parseInt(message/20 - 1)];"
                },
                "getSwingMode": "hisense_ac/ca2c4f5f18c3/t_fan_power/status",
                "setSwingMode": "hisense_ac/ca2c4f5f18c3/t_fan_power/command",
                "getTemperatureDisplayUnits": "hisense_ac/ca2c4f5f18c3/t_temptype/status",
                "setTemperatureDisplayUnits": "hisense_ac/ca2c4f5f18c3/t_temptype/command"
            },
            "currentHeaterCoolerValues": [
                "off",
                "off",
                "heat",
                "cool"
            ],
            "swingModeValues": [
                "off",
                "on"
            ],
            "temperatureDisplayUnitsValues": [
                "celsius",
                "fahrenheit"
            ],
            "minTemperature": 18,
            "maxTemperature": 24,
            "restrictHeaterCoolerState": [
                0
            ],
            "accessory": "mqttthing"
        }

piejanssens avatar Jun 07 '22 12:06 piejanssens

Hello,

I have the same problem. Did you find a solution?

Cheers,

Laurent

ldellus avatar Jul 23 '22 15:07 ldellus

What is being published to hisense_ac/ca2c4f5f18c3/t_fan_power/status? It looks like it should be just the text off or on from your config.

arachnetech avatar Jul 25 '22 12:07 arachnetech

@arachnetech Yes, indeed. Do I need to transform it to strings 'ENABLED' and 'DISABLED'?

piejanssens avatar Jul 26 '22 09:07 piejanssens

No, on or off should be fine as you've configured that in swingModeValues. Odd. I'll try to reproduce if I get time.

arachnetech avatar Jul 26 '22 10:07 arachnetech

Should be fixed in v1.1.44.

arachnetech avatar Feb 19 '23 21:02 arachnetech