Error: XiaomiGateway: unable to write command - No device

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

Post Reply
domogijs
Posts: 99
Joined: Monday 17 August 2015 23:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Error: XiaomiGateway: unable to write command - No device

Post by domogijs »

I added a gateway to Domoticz. The gateway and devices appear in the devices tab. Also the motion sensor write motion to the log. So receiving seems to be ok. But if a want to sent something like doorbell I get Error: XiaomiGateway: unable to write command - No device.

**Update

Sending and retrieving with the mi app is no problem.

So the issue is only sending from Domoticz to gateway.

I tried
Disable gateway from Domoticz /enable
Remove all gateway from Domoticz/add
removing gateway from Domoticz and reinstall
Removing gateway from mi app and reinstall
Restart router
Disable pihole


But issue stays :cry:

I hope somebody can help me

Greets Gijs
Raspberry Pi3, RFlink, PiZigate, Yeelight, klikaanklikuit, Kodi, harmony hub, Zwave, ThermoSmart, XiaomiGateway (Aqara), Google home hub, roomba,
ak97
Posts: 39
Joined: Saturday 03 February 2018 18:42
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: Error: XiaomiGateway: unable to write command - No device

Post by ak97 »

check your firewall rulez
domogijs
Posts: 99
Joined: Monday 17 August 2015 23:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Error: XiaomiGateway: unable to write command - No device

Post by domogijs »

Added another one (I ordered 2:)) that one works, sending and retrieving. I think no firewall isue
Raspberry Pi3, RFlink, PiZigate, Yeelight, klikaanklikuit, Kodi, harmony hub, Zwave, ThermoSmart, XiaomiGateway (Aqara), Google home hub, roomba,
garrywma
Posts: 11
Joined: Thursday 03 March 2016 0:24
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Error: XiaomiGateway: unable to write command - No device

Post by garrywma »

Double check the key you entered for the first gateway. I've found you can read but not write if you get that wrong.
vwtune
Posts: 19
Joined: Wednesday 24 January 2018 9:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Nederland
Contact:

Re: Error: XiaomiGateway: unable to write command - No device

Post by vwtune »

Already have a solution for your problem?

I encounters something like your problem and i don't know how to fix it:

In domoticz i have 2 Xiaomi gateways running, the first gateway (first floor) have all kind of xiaomi child devices, like xiaomi cube, door switches, zigbee plug... in domoticz these devices works like a charm (with blockly) and i can switch the zigbee plug off and on.
On the second floor i also have a gateway with child devices like: door, water and temperature sensors, these devices are visible in domoticz and i can see the status (temperature) of these devices, so far so good, but then: I add a new zigbee wall plug as child device on my second gateway, via the mi app, i can see and controll the plug (on/off). In domoticz i can see and add the new device, i even see the status of it, but i can't controll the device! i got the error: Error: XiaomiGateway: unable to write command - No device (in the log)
I de-installed the plug via the mi app, and via domoticz and installed it again, but same problem. Then i ordered a new zigbee plug and installed it via the mi app, then add the device in domoticz.... same problem.... i can't controll a device on the second gateway, i only see the status of the devices. really strange and i don't know how to fix this issue. I hope someone can help me out here.
javierc1975
Posts: 1
Joined: Saturday 25 November 2017 14:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Error: XiaomiGateway: unable to write command - No device

Post by javierc1975 »

I got the same problem,
I have two xiaomi gateway. First, i pair zigbee wall switch with the second gateway and i have this issue "unable to write command"

i solve this issue with this step:
i delete switch from domoticz
i unpair switch from second gateway and pair with the main gateway. Don't worry about this, zigbee is a mesh network, that means thas despite of you are pairing with the main gateway, the second gateway act as repeater
now, you can see again in domoticz device list and it is working correctly.

i hope it works for you and you cand understand my explanation.
darkeye
Posts: 5
Joined: Wednesday 08 May 2019 22:06
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Error: XiaomiGateway: unable to write command - No device

Post by darkeye »

garrywma wrote: Thursday 22 February 2018 2:40 Double check the key you entered for the first gateway. I've found you can read but not write if you get that wrong.
Agreed make sure you add the password. Without it you can read the sensors but cannot write to the hub (hardware screen)
Caminada
Posts: 5
Joined: Wednesday 09 October 2019 13:02
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.01
Location: The Hague
Contact:

Re: Error: XiaomiGateway: unable to write command - No device

Post by Caminada »

Hi,

I have the same issue.
The 2nd gateway seems to be very 'unstable' and I also get this message:
XiaomiGateway: unable to write command - Invalid key

The solution of adding a device to the first gateway works, but the max number of devices is reached.
I can add more devices than 30 and these will be accepted on the first gateway, but the response from these additional devices after the 30 is not always working.

I've added a 2nd gateway to be able to add more than 30 devices to Domoticz.

Anybody a solution to prevent the issue with the 2nd gateway?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest