Open moodyblue opened 1 month ago
This issue has been mentioned on openHAB Community. There might be relevant details there:
It is bit worrysome that it does not show as online. If it is online, make a switch for the testmiot channel and switch it on once.
If things went right, it should make experimental support for your device. (and output some file that elps the intergation.) After it re-initalise itself, test if al lthe channels are working.
It goes online if I define Cloud connection. The testmiot gives
Info for zhimi.airp.rmb1
Database file created:/share/CACHEDEV3_DATA/.qpkg/OpenHab3/conf/misc/miio/zhimi.airp.rmb1-miot-experimental.json
{
"deviceMapping": {
"id": [
"zhimi.airp.rmb1"
],
"propertyMethod": "get_properties",
"maxProperties": 1,
"channels": [
{
"property": "",
"friendlyName": "Actions",
"channel": "actions",
"type": "String",
"stateDescription": {
"options": [
{
"value": "air-purifier-toggle",
"label": "Air Purifier Toggle"
},
{
"value": "filter-reset-filter-life",
"label": "Filter Reset Filter Life"
},
{
"value": "custom-service-toggle-mode",
"label": "Custom Service Toggle Mode"
}
]
},
"refresh": false,
"actions": [
{
"command": "action",
"parameterType": "EMPTY",
"siid": 2,
"aiid": 1,
"condition": {
"name": "matchValue",
"parameters": [
{
"matchValue": "air-purifier-toggle"
}
]
}
},
{
"command": "action",
"parameterType": "UNKNOWN",
"parameters": [
3.0
],
"siid": 4,
"aiid": 1,
"condition": {
"name": "matchValue",
"parameters": [
{
"matchValue": "filter-reset-filter-life"
}
]
}
},
{
"command": "action",
"parameterType": "EMPTY",
"siid": 9,
"aiid": 1,
"condition": {
"name": "matchValue",
"parameters": [
{
"matchValue": "custom-service-toggle-mode"
}
]
}
}
]
},
{
"property": "on",
"siid": 2,
"piid": 1,
"friendlyName": "Air Purifier - Switch Status",
"channel": "on",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
]
},
{
"property": "fault",
"siid": 2,
"piid": 2,
"friendlyName": "Air Purifier - Device Fault",
"channel": "fault",
"type": "Number",
"stateDescription": {
"readOnly": true,
"options": [
{
"value": "0",
"label": "No Faults"
},
{
"value": "2",
"label": "Motor Stop"
},
{
"value": "3",
"label": "Sensor Lost"
}
]
},
"refresh": true,
"actions": [],
"readmeComment": "Value mapping [\"0\"\u003d\"No Faults\",\"2\"\u003d\"Motor Stop\",\"3\"\u003d\"Sensor Lost\"]"
},
{
"property": "mode",
"siid": 2,
"piid": 4,
"friendlyName": "Air Purifier - Mode",
"channel": "mode",
"type": "Number",
"stateDescription": {
"options": [
{
"value": "0",
"label": "Auto"
},
{
"value": "1",
"label": "Sleep"
},
{
"value": "2",
"label": "Favorite"
}
]
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"readmeComment": "Value mapping [\"0\"\u003d\"Auto\",\"1\"\u003d\"Sleep\",\"2\"\u003d\"Favorite\"]"
},
{
"property": "relative-humidity",
"siid": 3,
"piid": 1,
"friendlyName": "Environment - Relative Humidity",
"channel": "relative_humidity",
"type": "Number:Dimensionless",
"unit": "percentage",
"stateDescription": {
"minimum": 0,
"maximum": 100,
"step": 1,
"pattern": "%.0f %unit%",
"readOnly": true
},
"refresh": true,
"actions": []
},
{
"property": "pm2.5-density",
"siid": 3,
"piid": 4,
"friendlyName": "Environment - PM2 5 Density",
"channel": "pm2_5_density",
"type": "Number",
"unit": "μg/m3",
"stateDescription": {
"minimum": 0,
"maximum": 600,
"step": 1,
"pattern": "%.0f",
"readOnly": true
},
"refresh": true,
"actions": []
},
{
"property": "temperature",
"siid": 3,
"piid": 7,
"friendlyName": "Environment - Temperature",
"channel": "temperature",
"type": "Number:Temperature",
"unit": "celsius",
"stateDescription": {
"minimum": -30,
"maximum": 100,
"pattern": "%.1f %unit%",
"readOnly": true
},
"refresh": true,
"actions": []
},
{
"property": "filter-life-level",
"siid": 4,
"piid": 1,
"friendlyName": "Filter - Filter Life Level",
"channel": "filter_life_level",
"type": "Number:Dimensionless",
"unit": "percentage",
"stateDescription": {
"minimum": 0,
"maximum": 100,
"step": 1,
"pattern": "%.0f %unit%",
"readOnly": true
},
"refresh": true,
"actions": []
},
{
"property": "filter-used-time",
"siid": 4,
"piid": 3,
"friendlyName": "Filter - Filter Used Time",
"channel": "filter_used_time",
"type": "Number:Time",
"unit": "days",
"stateDescription": {
"minimum": 0,
"maximum": 200,
"step": 1,
"pattern": "%.0f %unit%",
"readOnly": true
},
"refresh": true,
"actions": []
},
{
"property": "filter-left-time",
"siid": 4,
"piid": 4,
"friendlyName": "Filter - Filter Left Time",
"channel": "filter_left_time",
"type": "Number:Time",
"unit": "days",
"stateDescription": {
"minimum": 0,
"maximum": 1000,
"step": 1,
"pattern": "%.0f %unit%",
"readOnly": true
},
"refresh": true,
"actions": []
},
{
"property": "alarm",
"siid": 6,
"piid": 1,
"friendlyName": "Alarm - Alarm",
"channel": "alarm",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
]
},
{
"property": "physical-controls-locked",
"siid": 8,
"piid": 1,
"friendlyName": "Physical Control Locked - Physical Control Locked",
"channel": "physical_controls_locked",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
]
},
{
"property": "brightness",
"siid": 13,
"piid": 2,
"friendlyName": "Screen - Brightness",
"channel": "brightness",
"type": "Number:Dimensionless",
"unit": "percentage",
"stateDescription": {
"options": [
{
"value": "0",
"label": "Close"
},
{
"value": "1",
"label": "Bright"
},
{
"value": "2",
"label": "Brightest"
}
]
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"readmeComment": "Value mapping [\"0\"\u003d\"Close\",\"1\"\u003d\"Bright\",\"2\"\u003d\"Brightest\"]"
},
{
"property": "temperature-display-unit",
"siid": 14,
"piid": 1,
"friendlyName": "Device Display Unit - Temperature Display Unit",
"channel": "temperature_display_unit",
"type": "Number",
"stateDescription": {
"options": [
{
"value": "1",
"label": "Celsius"
},
{
"value": "2",
"label": "Fahrenheit"
}
]
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"readmeComment": "Value mapping [\"1\"\u003d\"Celsius\",\"2\"\u003d\"Fahrenheit\"]"
},
{
"property": "moto-speed-rpm",
"siid": 9,
"piid": 1,
"friendlyName": "Custom Service - Moto Speed Rpm",
"channel": "moto_speed_rpm",
"type": "Number",
"stateDescription": {
"minimum": 0,
"maximum": 2500,
"step": 1,
"pattern": "%.0f",
"readOnly": true
},
"refresh": true,
"actions": []
},
{
"property": "country-code",
"siid": 9,
"piid": 10,
"friendlyName": "Custom Service - Country Code",
"channel": "country_code",
"type": "Number",
"stateDescription": {
"options": [
{
"value": "2",
"label": "EU"
},
{
"value": "1",
"label": "US"
},
{
"value": "82",
"label": "KR"
},
{
"value": "886",
"label": "TW"
},
{
"value": "66",
"label": "TH"
},
{
"value": "44",
"label": "UK"
},
{
"value": "91",
"label": "IN"
}
]
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
],
"readmeComment": "Value mapping [\"2\"\u003d\"EU\",\"1\"\u003d\"US\",\"82\"\u003d\"KR\",\"886\"\u003d\"TW\",\"66\"\u003d\"TH\",\"44\"\u003d\"UK\",\"91\"\u003d\"IN\"]"
},
{
"property": "favorite-level",
"siid": 9,
"piid": 11,
"friendlyName": "Custom Service - Favorite Level",
"channel": "favorite_level",
"type": "Number",
"stateDescription": {
"minimum": 0,
"maximum": 14,
"step": 1,
"pattern": "%.0f"
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "NUMBER"
}
]
},
{
"property": "aqi-updata-heartbeat",
"siid": 11,
"piid": 4,
"friendlyName": "Aqi - Aqi Updata Heartbeat",
"channel": "aqi_updata_heartbeat",
"type": "Number",
"stateDescription": {
"minimum": 0,
"maximum": 65535,
"step": 1,
"pattern": "%.0f"
},
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "STRING"
}
]
}
],
"experimental": true
}
}
Testing Properties:
on -> get_properties[{"did":"on","siid":2,"piid":1}] -> 1141,
fault -> get_properties[{"did":"fault","siid":2,"piid":2}] -> 1142,
mode -> get_properties[{"did":"mode","siid":2,"piid":4}] -> 1143,
relative_humidity -> get_properties[{"did":"relative-humidity","siid":3,"piid":1}] -> 1144,
pm2_5_density -> get_properties[{"did":"pm2.5-density","siid":3,"piid":4}] -> 1145,
temperature -> get_properties[{"did":"temperature","siid":3,"piid":7}] -> 1146,
filter_life_level -> get_properties[{"did":"filter-life-level","siid":4,"piid":1}] -> 1147,
filter_used_time -> get_properties[{"did":"filter-used-time","siid":4,"piid":3}] -> 1148,
filter_left_time -> get_properties[{"did":"filter-left-time","siid":4,"piid":4}] -> 1149,
alarm -> get_properties[{"did":"alarm","siid":6,"piid":1}] -> 1150,
physical_controls_locked -> get_properties[{"did":"physical-controls-locked","siid":8,"piid":1}] -> 1151,
brightness -> get_properties[{"did":"brightness","siid":13,"piid":2}] -> 1152,
temperature_display_unit -> get_properties[{"did":"temperature-display-unit","siid":14,"piid":1}] -> 1153,
moto_speed_rpm -> get_properties[{"did":"moto-speed-rpm","siid":9,"piid":1}] -> 1154,
country_code -> get_properties[{"did":"country-code","siid":9,"piid":10}] -> 1155,
favorite_level -> get_properties[{"did":"favorite-level","siid":9,"piid":11}] -> 1156,
aqi_updata_heartbeat -> get_properties[{"did":"aqi-updata-heartbeat","siid":11,"piid":4}] -> 1157,
{"fw_ver":"2.2.7","hw_ver":"esp32","ipflag":1,"ipv6":true,"life":389,"mcu_fw_ver":"0058","miio_ver":"0.0.9","min_mmfree":61572,"mmfree":69176,"model":"zhimi.airp.rmb1","netif":{"gw":"192.168.129.1","localIp":"192.168.129.170","mask":"255.255.255.0"},"uid":6419304863,"wifi_fw_ver":"61d9af5fc"}
{"id":1140,"method":"miIO.info","params":[]} -> {"code":0,"exe_time":0,"id":1140,"message":"ok","net_cost":0,"ot_cost":0,"otlocalts":1729074101696932,"result":{"fw_ver":"2.2.7","hw_ver":"esp32","ipflag":1,"ipv6":true,"life":389,"mcu_fw_ver":"0058","miio_ver":"0.0.9","min_mmfree":61572,"mmfree":69176,"model":"zhimi.airp.rmb1","netif":{"gw":"192.168.129.1","localIp":"192.168.129.170","mask":"255.255.255.0"},"uid":6419304863,"wifi_fw_ver":"61d9af5fc"}}
{"id":1141,"method":"get_properties","params":[{"did":"on","siid":2,"piid":1}]} -> {"code":0,"exe_time":150,"id":1141,"message":"ok","net_cost":81,"ot_cost":2,"otlocalts":1729074101986908,"result":[{"code":0,"did":"on","piid":1,"siid":2,"value":false}]}
{"id":1142,"method":"get_properties","params":[{"did":"fault","siid":2,"piid":2}]} -> {"code":0,"exe_time":110,"id":1142,"message":"ok","net_cost":52,"ot_cost":1,"otlocalts":1729074102208705,"result":[{"code":0,"did":"fault","piid":2,"siid":2,"value":0}]}
{"id":1143,"method":"get_properties","params":[{"did":"mode","siid":2,"piid":4}]} -> {"code":0,"exe_time":130,"id":1143,"message":"ok","net_cost":49,"ot_cost":1,"otlocalts":1729074102442819,"result":[{"code":0,"did":"mode","piid":4,"siid":2,"value":1}]}
{"id":1144,"method":"get_properties","params":[{"did":"relative-humidity","siid":3,"piid":1}]} -> {"code":0,"exe_time":110,"id":1144,"message":"ok","net_cost":93,"ot_cost":0,"otlocalts":1729074102705043,"result":[{"code":0,"did":"relative-humidity","piid":1,"siid":3,"value":73}]}
{"id":1145,"method":"get_properties","params":[{"did":"pm2.5-density","siid":3,"piid":4}]} -> {"code":0,"exe_time":70,"id":1145,"message":"ok","net_cost":99,"ot_cost":1,"otlocalts":1729074102928869,"result":[{"code":0,"did":"pm2.5-density","piid":4,"siid":3,"value":5}]}
{"id":1146,"method":"get_properties","params":[{"did":"temperature","siid":3,"piid":7}]} -> {"code":0,"exe_time":70,"id":1146,"message":"ok","net_cost":69,"ot_cost":1,"otlocalts":1729074103128591,"result":[{"code":0,"did":"temperature","piid":7,"siid":3,"value":22}]}
{"id":1147,"method":"get_properties","params":[{"did":"filter-life-level","siid":4,"piid":1}]} -> {"code":0,"exe_time":110,"id":1147,"message":"ok","net_cost":62,"ot_cost":1,"otlocalts":1729074103356893,"result":[{"code":0,"did":"filter-life-level","piid":1,"siid":4,"value":100}]}
{"id":1148,"method":"get_properties","params":[{"did":"filter-used-time","siid":4,"piid":3}]} -> {"code":0,"exe_time":120,"id":1148,"message":"ok","net_cost":93,"ot_cost":1,"otlocalts":1729074103624921,"result":[{"code":0,"did":"filter-used-time","piid":3,"siid":4,"value":0}]}
{"id":1149,"method":"get_properties","params":[{"did":"filter-left-time","siid":4,"piid":4}]} -> {"code":0,"exe_time":80,"id":1149,"message":"ok","net_cost":66,"ot_cost":1,"otlocalts":1729074103830781,"result":[{"code":0,"did":"filter-left-time","piid":4,"siid":4,"value":291}]}
{"id":1150,"method":"get_properties","params":[{"did":"alarm","siid":6,"piid":1}]} -> {"code":0,"exe_time":50,"id":1150,"message":"ok","net_cost":102,"ot_cost":0,"otlocalts":1729074104036812,"result":[{"code":0,"did":"alarm","piid":1,"siid":6,"value":true}]}
{"id":1151,"method":"get_properties","params":[{"did":"physical-controls-locked","siid":8,"piid":1}]} -> {"code":0,"exe_time":120,"id":1151,"message":"ok","net_cost":73,"ot_cost":2,"otlocalts":1729074104287569,"result":[{"code":0,"did":"physical-controls-locked","piid":1,"siid":8,"value":false}]}
{"id":1152,"method":"get_properties","params":[{"did":"brightness","siid":13,"piid":2}]} -> {"code":0,"exe_time":110,"id":1152,"message":"ok","net_cost":96,"ot_cost":0,"otlocalts":1729074104547260,"result":[{"code":0,"did":"brightness","piid":2,"siid":13,"value":2}]}
{"id":1153,"method":"get_properties","params":[{"did":"temperature-display-unit","siid":14,"piid":1}]} -> {"code":0,"exe_time":80,"id":1153,"message":"ok","net_cost":72,"ot_cost":2,"otlocalts":1729074104752582,"result":[{"code":0,"did":"temperature-display-unit","piid":1,"siid":14,"value":1}]}
{"id":1154,"method":"get_properties","params":[{"did":"moto-speed-rpm","siid":9,"piid":1}]} -> {"code":0,"exe_time":100,"id":1154,"message":"ok","net_cost":51,"ot_cost":0,"otlocalts":1729074104967406,"result":[{"code":0,"did":"moto-speed-rpm","piid":1,"siid":9,"value":0}]}
{"id":1155,"method":"get_properties","params":[{"did":"country-code","siid":9,"piid":10}]} -> {"code":0,"exe_time":110,"id":1155,"message":"ok","net_cost":65,"ot_cost":1,"otlocalts":1729074105197334,"result":[{"code":0,"did":"country-code","piid":10,"siid":9,"value":2}]}
{"id":1156,"method":"get_properties","params":[{"did":"favorite-level","siid":9,"piid":11}]} -> {"code":0,"exe_time":100,"id":1156,"message":"ok","net_cost":127,"ot_cost":1,"otlocalts":1729074105481357,"result":[{"code":0,"did":"favorite-level","piid":11,"siid":9,"value":14}]}
{"id":1157,"method":"get_properties","params":[{"did":"aqi-updata-heartbeat","siid":11,"piid":4}]} -> {"code":0,"exe_time":40,"id":1157,"message":"ok","net_cost":110,"ot_cost":0,"otlocalts":1729074105692147,"result":[{"code":0,"did":"aqi-updata-heartbeat","piid":4,"siid":11,"value":0}]}
===================================
Responsive properties
===================================
Device Info: {"fw_ver":"2.2.7","hw_ver":"esp32","ipflag":1,"ipv6":true,"life":389,"mcu_fw_ver":"0058","miio_ver":"0.0.9","min_mmfree":61572,"mmfree":69176,"model":"zhimi.airp.rmb1","netif":{"gw":"192.168.129.1","localIp":"192.168.129.170","mask":"255.255.255.0"},"uid":6419304863,"wifi_fw_ver":"61d9af5fc"}
17 channels with responses.
Property: on Friendly Name: Air Purifier - Switch Status Response: [{"code":0,"did":"on","piid":1,"siid":2,"value":false}]
Property: fault Friendly Name: Air Purifier - Device Fault Response: [{"code":0,"did":"fault","piid":2,"siid":2,"value":0}]
Property: mode Friendly Name: Air Purifier - Mode Response: [{"code":0,"did":"mode","piid":4,"siid":2,"value":1}]
Property: relative-humidity Friendly Name: Environment - Relative Humidity Response: [{"code":0,"did":"relative-humidity","piid":1,"siid":3,"value":73}]
Property: pm2.5-density Friendly Name: Environment - PM2 5 Density Response: [{"code":0,"did":"pm2.5-density","piid":4,"siid":3,"value":5}]
Property: temperature Friendly Name: Environment - Temperature Response: [{"code":0,"did":"temperature","piid":7,"siid":3,"value":22}]
Property: filter-life-level Friendly Name: Filter - Filter Life Level Response: [{"code":0,"did":"filter-life-level","piid":1,"siid":4,"value":100}]
Property: filter-used-time Friendly Name: Filter - Filter Used Time Response: [{"code":0,"did":"filter-used-time","piid":3,"siid":4,"value":0}]
Property: filter-left-time Friendly Name: Filter - Filter Left Time Response: [{"code":0,"did":"filter-left-time","piid":4,"siid":4,"value":291}]
Property: alarm Friendly Name: Alarm - Alarm Response: [{"code":0,"did":"alarm","piid":1,"siid":6,"value":true}]
Property: physical-controls-locked Friendly Name: Physical Control Locked - Physical Control Locked Response: [{"code":0,"did":"physical-controls-locked","piid":1,"siid":8,"value":false}]
Property: brightness Friendly Name: Screen - Brightness Response: [{"code":0,"did":"brightness","piid":2,"siid":13,"value":2}]
Property: temperature-display-unit Friendly Name: Device Display Unit - Temperature Display Unit Response: [{"code":0,"did":"temperature-display-unit","piid":1,"siid":14,"value":1}]
Property: moto-speed-rpm Friendly Name: Custom Service - Moto Speed Rpm Response: [{"code":0,"did":"moto-speed-rpm","piid":1,"siid":9,"value":0}]
Property: country-code Friendly Name: Custom Service - Country Code Response: [{"code":0,"did":"country-code","piid":10,"siid":9,"value":2}]
Property: favorite-level Friendly Name: Custom Service - Favorite Level Response: [{"code":0,"did":"favorite-level","piid":11,"siid":9,"value":14}]
Property: aqi-updata-heartbeat Friendly Name: Aqi - Aqi Updata Heartbeat Response: [{"code":0,"did":"aqi-updata-heartbeat","piid":4,"siid":11,"value":0}]
Miot file already created. Manually remove non-functional channels.
Device testing file saved to:
Power on/off does not work
Hi, just to let you know that I will be away during the next two days (thu/fri).
Thanks, that is helpfull. Wrt to the power, from the log it looks like the updating works, right? (meaning if you change it directly on the device or in the mihome app, you will see the right status in openhab)
Maybe to try to edit the file in the conf/miio folder: and change the "parameterType"
Try instead of "ONOFFBOOL"
ONOFFBOOLSTRING
or ONOFF
see if the device accepts the different formatting as the right command.
it would be in this sectionof the file:
{
"property": "on",
"siid": 2,
"piid": 1,
"friendlyName": "Air Purifier - Switch Status",
"channel": "on",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "set_properties",
"parameterType": "ONOFFBOOL"
}
]
},
@marcelrv do you have a jar I can test ?
Your Environment
Initial steps
I made a scan and the binding created a thing
The thing is offline, here is the log