the binding will replace the command with the received response.
Though in the debug log you might see bit more detail (like error codes)
get_device_list[]
no answer
get_device_prop[]
no answer
get_device_prop_exp[]
gives {"result":[],"code":0,"id":503}
get_lumi_bind[]
gives {"result":{"bind_num":1,"total_page":1,"cur_page":0,"page":[{"id":1111}],"fac_scene_enable":0},"code":0,"message":"ok","id":509}
get_ip_info[]
no answer
enable_telnet_service[]
no answer, and port 23 not open. This is consistent with other posts suggesting that until the gateway is rooted telnet and ssh are not possible
get_device_prop ["lumi.0", "device_list"]
no answer
Also tried Volume channels (Alarm, Doorbell, Gateway). They work
Were these responses via the command or the rpc channel?
Would you mind trying the same via the âExecute RPCâ channel
I think the get_device_prop_exp[]
needs something in the brackets (something like the device and the property ⊠but donât know the exact format)âŠ
All previous tests were made with direct connection and command channel. Now I made some more tests:
- with direct connection no response from RPC channel
- with cloud connection no response from command channel
- with cloud connection and RPC channel the following commands had a response
get_device_prop_exp[]
gives {"code":0,"exe_time":5,"id":401,"otlocalts":1612891050804300,"result":[]}
get_lumi_bind[]
gives {"code":0,"exe_time":6,"id":434,"message":"ok","otlocalts":1612891407342783,"result":{"bind_num":1,"cur_page":0,"fac_scene_enable":0,"page":[{"id":1111}],"total_page":1}}
Note: after the tests of the previous post Iâve removed the thing (and its items), paired one child device with the gateway, and created the thing (and its items) again. Channels of this child device do not appear in OH. WIth this new thing the results of this morningâs had minor changes, so Iâve edit my previous post to reflect them
get_device_prop_exp[["lumi.158d00054222ef","temperature","humidity"]]
gives {"result":[[2050,5951]],"code":0,"id":706}
How did I discover that ? Your binding reports {"code":0,"message":"ok","result":{"list":[{"did":"275954150","token":"*******","longitude":"0.00000000","latitude":"0.00000000","name":"Mi Control Hub","pid":"0","localip":"192.168.131.16","mac":"50:EC:50:EE:52:75","ssid":"Aveiro-Guest","bssid":"E0:63:DA:71:21:E3","parent_id":"","parent_model":"","show_mode":1,"model":"lumi.gateway.mieu01","adminFlag":1,"shareFlag":0,"permitLevel":16,"isOnline":true,"desc":"Device online ","extra":{"isSetPincode":0,"fw_version":"3.5.8_147","needVerifyCode":0,"isPasswordEncrypt":0,"mcu_version":"0143"},"uid":6361316538,"pd_id":657,"password":"","p2p_id":"","rssi":0,"family_id":0,"reset_flag":0},{"did":"lumi.158d00049dc9f1","token":"","longitude":"0.00000000","latitude":"0.00000000","name":"Water Leak Sensor","pid":"3","localip":"","mac":"","ssid":"Aveiro-Guest","bssid":"E0:63:DA:71:21:E3","parent_id":"275954150","parent_model":"lumi.gateway.mieu01","show_mode":1,"model":"lumi.sensor_wleak.aq1","adminFlag":1,"shareFlag":0,"permitLevel":16,"isOnline":false,"desc":"Device offline ","extra":{"isSetPincode":0},"uid":6361316538,"pd_id":385,"password":"","p2p_id":"","rssi":0,"family_id":0,"reset_flag":0},{"did":"lumi.158d00054222ef","token":"","longitude":"0.00000000","latitude":"0.00000000","name":"Aqara Temperature and Humidity Sensor","pid":"3","localip":"","mac":"","ssid":"Aveiro-Guest","bssid":"E0:63:DA:71:21:E3","parent_id":"275954150","parent_model":"lumi.gateway.mieu01","show_mode":1,"model":"lumi.weather.v1","adminFlag":1,"shareFlag":0,"permitLevel":16,"isOnline":true,"desc":"23â |55% |100kPa ","extra":{"isSetPincode":0},"prop":{"humidity":"5470","pressure":"100110","temperature":"2285"},"uid":6361316538,"pd_id":354,"password":"","p2p_id":"","rssi":0,"family_id":0,"reset_flag":0}]}}
Am I right in thinking that itâs now possible to read the sensors, as well as manage the gateway, using these hieroglyphic commands ?
@marcel_verpaalen Maybe a bit off-topic, but as I donât like to have IoT devices with internet access, and your bindind seems to depend on xiaomi cloud, do you think that I can use miIO.ota to load another firmware ? Iâve noticed that a Openwrt hack is available.
Yes, that might be possible. The parameters are like this:
{"mode":"normal", "install":"1", "app_url":"http://#ipaddress-of-your-computer#/#yourfirmware#.pkg", "file_md5":"#md5#","proc":"dnld install"}
Hi!
First of all, @marcel_verpaalen congratulations from your great job.
I am a complete newbie, but I got a mi home kit with a lumi.gateway.mieu01, and also have the automatically files generated by the binding. I am willing to send whatever is required for helping, but I do not know how to use the âexecute commandâ yet, and I cannot see the âexecute RPC commandâ (I am not using the OpemHab 3.0 versiĂłn, I guess it is because of that).
Anyway, I prefer not to depend on third party servers, and therefore the idea of using miIO.ota sounds great. @moody_blue did you manage to flash the openlumi firmware over the air?
Thank you!
Not tried yet. My gateway is available for @marcel_verpaalen testing.
Iâve bought a Sonoff ZBBridge, tasmotized, paired Xiaomi devices that came with the kit, and so far I have no definitive plans about the gateway. Maybe Iâll use it as an auxiliary doorbell for my garden.
Ok, I managed to install openHab3 in my Synology, run some commands through the cloud and see the results
@marcel_verpaalen Let me know if I can help running any test. Now there are two gateways available in this thread!
The hub works beautifully as an auxiliary doorbell to my Hikvision video intercom (OH4 with miio binding). Would it be possible to load announcements (pre-recorded mp3âs) and play them ?
The Mi IO binding is producing these errors every 90secs
2024-04-20 14:54:26.123 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)
2024-04-20 14:54:26.126 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from OFFLINE (CONFIGURATION_ERROR) to ONLINE
2024-04-20 14:55:56.187 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)
2024-04-20 14:55:56.195 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from OFFLINE (CONFIGURATION_ERROR) to ONLINE
2024-04-20 14:58:56.345 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)
2024-04-20 14:58:56.348 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from OFFLINE (CONFIGURATION_ERROR) to ONLINE
2024-04-20 15:00:26.421 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)
2024-04-20 15:00:26.423 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from OFFLINE (CONFIGURATION_ERROR) to ONLINE
2024-04-20 15:01:56.487 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)
2024-04-20 15:01:56.489 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from OFFLINE (CONFIGURATION_ERROR) to ONLINE
2024-04-20 15:03:26.538 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)
2024-04-20 15:03:26.540 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from OFFLINE (CONFIGURATION_ERROR) to ONLINE
2024-04-20 15:04:56.637 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)
2024-04-20 15:04:56.638 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from OFFLINE (CONFIGURATION_ERROR) to ONLINE
2024-04-20 15:06:26.681 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)
2024-04-20 15:06:26.684 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from OFFLINE (CONFIGURATION_ERROR) to ONLINE
2024-04-20 15:07:56.761 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)
2024-04-20 15:07:56.763 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from OFFLINE (CONFIGURATION_ERROR) to ONLINE
2024-04-20 15:09:26.807 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)
2024-04-20 15:09:26.814 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from OFFLINE (CONFIGURATION_ERROR) to ONLINE
2024-04-20 15:10:56.872 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)
2024-04-20 15:10:56.878 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from OFFLINE (CONFIGURATION_ERROR) to ONLINE
2024-04-20 15:12:26.967 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)
2024-04-20 15:12:26.968 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from OFFLINE (CONFIGURATION_ERROR) to ONLINE
2024-04-20 15:13:57.029 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)
2024-04-20 15:13:57.038 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'miio:gateway:1072B9E6' changed from OFFLINE (CONFIGURATION_ERROR) to ONLINE
The thing was discovered by the binding, here is the definition
UID: miio:gateway:1072B9E6
label: Campainha Garagem
thingTypeUID: miio:gateway
configuration:
cloudServer: de
refreshInterval: 30
host: 192.168.129.40
model: lumi.gateway.mieu01
communication: direct
deviceId: "***********"
timeout: 15000
token: *************
channels:
- id: network#ssid
channelTypeUID: miio:ssid
label: SSID
configuration: {}
- id: network#bssid
channelTypeUID: miio:bssid
label: BSSID
configuration: {}
- id: network#rssi
channelTypeUID: miio:rssi
label: RSSI
configuration: {}
- id: network#life
channelTypeUID: miio:life
label: Life
configuration: {}
- id: actions#commands
channelTypeUID: miio:commands
label: Execute Command
configuration: {}
- id: actions#rpc
channelTypeUID: miio:rpc
label: Execute RPC (cloud) Command
configuration: {}
- id: guard
channelTypeUID: miio:LUMI_GATEWAY_MIEU01_guard
label: Guard
configuration: {}
- id: corridor
channelTypeUID: miio:LUMI_GATEWAY_MIEU01_corridor
label: Automatic Night Light
configuration: {}
- id: nightlight
channelTypeUID: miio:LUMI_GATEWAY_MIEU01_nightlight
label: Night Light
configuration: {}
- id: rgb
channelTypeUID: miio:LUMI_GATEWAY_MIEU01_rgb
label: Colored Light
configuration: {}
- id: doorbell_volume
channelTypeUID: miio:LUMI_GATEWAY_MIEU01_doorbell_volume
label: Doorbell Volume
configuration: {}
- id: alarming_volume
channelTypeUID: miio:LUMI_GATEWAY_MIEU01_alarming_volume
label: Alarming Volume
configuration: {}
- id: gateway_volume
channelTypeUID: miio:LUMI_GATEWAY_MIEU01_gateway_volume
label: Gateway Volume
configuration: {}
- id: arming_time
channelTypeUID: miio:LUMI_GATEWAY_MIEU01_arming_time
label: Arming Time
configuration: {}
- id: corridor_on_time
channelTypeUID: miio:LUMI_GATEWAY_MIEU01_corridor_on_time
label: Corridor on time
configuration: {}
- id: language
channelTypeUID: miio:LUMI_GATEWAY_MIEU01_language
label: Voice prompt Language
configuration: {}
- id: zigbee_channel
channelTypeUID: miio:LUMI_GATEWAY_MIEU01_zigbee_channel
label: Zigbee Channel
configuration: {}
- id: lumi_bind
channelTypeUID: miio:LUMI_GATEWAY_MIEU01_lumi_bind
label: Lumi_bind info
configuration: {}
- id: doorbell_push
channelTypeUID: miio:LUMI_GATEWAY_MIEU01_doorbell_push
label: Doorbell Push
configuration: {}
My firewall blocks internet access. If I enable internet access I have no such errors.
Is there a way to filter out these âfake errorâ messages ?
that is odd indeed, I would not expect this. I somewhat assume one (all?) of the commands times out when there is no internet access.
But, is it working without the internet access? (the binding does not communicate to the internet except for discovery and vacuuum mapâŠ) For the mi gateway it should not need any access.
Would suggest to run with debug loggin on, maybe then we can see which commands to the timeout.
As the mi devices donât give a âwrong encryptionâ sort of response, instead, just not respond if a wrong key is provided, the binding is assuming there is a configuration (key) error if there is no respnse.
Before enabling log debug Iâve made some more tests, here are my conclusions:
- when the MI Control Hub is powered on it tries to contact an external site. If it does not succeed it loops every 90secs, and when doing so it goes offline temporarily. If I enable internet access in the firewall and disable it past some minutes, it no longer goes offline
- If I restart OH (without powering on the Hub) there are no offline messages in the OH log
then I guess I canât really suppress this, as the device is truely offline.