https://www.aliexpress.com/item/32816832608/32816832608.html
-
Aqara (Xiaomi) plugin (Released)
-
M gateway somehow stopped receiving my temp/hum sensors. So I investigated. When I click on one of my buttons (v1), the pimatic log shows, the message is received:
11:05:00.661 [pimatic-aqara] debug: Subdevice { 11:05:00.661 [pimatic-aqara] debug:> domain: null, 11:05:00.661 [pimatic-aqara] debug:> _events: { report: [Function] }, 11:05:00.661 [pimatic-aqara] debug:> _eventsCount: 1, 11:05:00.661 [pimatic-aqara] debug:> _maxListeners: undefined, 11:05:00.661 [pimatic-aqara] debug:> _sid: '158d00020f4950', 11:05:00.661 [pimatic-aqara] debug:> _type: 'button', 11:05:00.661 [pimatic-aqara] debug:> _voltage: 3052, 11:05:00.661 [pimatic-aqara] debug:> _state: 'click', 11:05:00.661 [pimatic-aqara] debug:> _action: true }
But in the frontend, the button device logs “Unknown”. And after a short while pimatic will log this error ( I also got this before v0.3):
Unhandled rejection Error: unknown state=""!
When I manually trigger the temp/hum sensor (with the button on it), I also get received result in pimatic log:
11:07:39.492 [pimatic-aqara] debug: Subdevice { 11:07:39.492 [pimatic-aqara] debug:> domain: null, 11:07:39.492 [pimatic-aqara] debug:> _events: { report: [Function] }, 11:07:39.492 [pimatic-aqara] debug:> _eventsCount: 1, 11:07:39.492 [pimatic-aqara] debug:> _maxListeners: undefined, 11:07:39.492 [pimatic-aqara] debug:> _sid: '158d0001dcc362', 11:07:39.492 [pimatic-aqara] debug:> _type: 'temperature', 11:07:39.492 [pimatic-aqara] debug:> _voltage: 2975, 11:07:39.492 [pimatic-aqara] debug:> _state: null, 11:07:39.492 [pimatic-aqara] debug:> _action: false, 11:07:39.492 [pimatic-aqara] debug:> _temperature: null, 11:07:39.492 [pimatic-aqara] debug:> _pressure: null, 11:07:39.492 [pimatic-aqara] debug:> _humidity: null } 11:07:39.499 [pimatic-aqara] debug: Subdevice { 11:07:39.499 [pimatic-aqara] debug:> domain: null, 11:07:39.499 [pimatic-aqara] debug:> _events: { report: [Function] }, 11:07:39.499 [pimatic-aqara] debug:> _eventsCount: 1, 11:07:39.499 [pimatic-aqara] debug:> _maxListeners: undefined, 11:07:39.499 [pimatic-aqara] debug:> _sid: '158d0001dcc362', 11:07:39.499 [pimatic-aqara] debug:> _type: 'temperature', 11:07:39.499 [pimatic-aqara] debug:> _voltage: 2975, 11:07:39.499 [pimatic-aqara] debug:> _state: null, 11:07:39.499 [pimatic-aqara] debug:> _action: false, 11:07:39.499 [pimatic-aqara] debug:> _temperature: null, 11:07:39.499 [pimatic-aqara] debug:> _pressure: null, 11:07:39.499 [pimatic-aqara] debug:> _humidity: null }
As you can see, all values are “null”.
When I restart the gateway (plug out/in) it’s the same. When I restart pimatic, it’s the same.
When I pull the plugin manually and revert to v.2.0.13 it’s working again. So I checked the commits and I think this one isn’t working for me: https://github.com/sweebee/pimatic-aqara/commit/7be6614d8d28c96809cba12cf4d903d962a538ce
Maybe this is only working for sensors v2 ?
-
@georg90 I released a new version for the button device. should now work. Don’t know about the temperature sensor. Haven’t received mine, when I have it I will test it.
-
Ok, I will wait then… You got the v1 temp/hum sensors?
-
@georg90 No v2
-
damn
I’ll be beta testing the v1 then
-
@georg90 I released a new version, should fix the temp sensor
I also ordered the double switch, I think I will implement that the same way as a button:
left_click, right_click, both_click
Also ordered the magic cube, don’t know yet how to implement that.
-
Are you guys running the GW with full internet access. When I deny to call home. I have problems with my temp sensors. 4-5 times a day the temp change to 100°C and 0% RH.
Has someone the same problem? -
@georg90 yes i Will implement that. Very easy to do
Edit: released 0.3.4 with validation on temperature and humidity.
-
Thanks for the update. Button works again
Temperature sensors are not received with the latest version.
I fixed this and created a pull request: https://github.com/sweebee/pimatic-aqara/pull/2 -
Is there a technical difference between V1 and V2 of the temp sensor?
@sweebee said in Aqara (Xiaomi) plugin (Released):
released 0.3.4 with validation on temperature and humidity.
Okay, this is the key feature to move from my current implementation to your plugin.
A further small feature would be to be able to configure globally a battery limit. If this limit is reached a flashing battery symbol would appear beside the battery level. What you thing?
-
@ortin Yes thats possible, its now static between 2800 mV (0%) and 3200 mV (100%). I can make that optional within the plugin config. When I’ve received my temperature sensor and tested everything I will release it with this option.
-
released new version:
Temperature sensor should work fine now and added option to set low and high voltage for battery. (in plugin config)
Edit: another new release, the pressure was wrong. also round at 1 decimal instead of 2, because the device is only accurate to 0.3 degrees.
-
Hey sweebee, want to play around with your plugin so I installed it on my Ubuntu Laptop.
After installation and activation I got this error:21:15:41.379 [pimatic-aqara] debug: Searching for gateway... 21:15:41.463 [pimatic] error: An uncaught exception occurred: Error: bind EADDRINUSE 0.0.0.0:9898 21:15:41.463 [pimatic] error:> at Object.exports._errnoException (util.js:907:11) 21:15:41.463 [pimatic] error:> at exports._exceptionWithHostPort (util.js:930:20) 21:15:41.463 [pimatic] error:> at dgram.js:214:18 21:15:41.463 [pimatic] error:> at nextTickCallbackWith3Args (node.js:522:9) 21:15:41.463 [pimatic] error:> at process._tickCallback (node.js:428:17) 21:15:41.463 [pimatic] error:> This is most probably a bug in pimatic or in a module, please report it! 21:15:41.464 [pimatic] info: exiting...
The port is open (before Pimatic was started the port was not listed)
udp 0 0 0.0.0.0:9898 0.0.0.0:* 0 28394 2779/io.mihome.0
Any idea?
-
You should stop your script for the mqtt - xiaomi gateway, the port 9898 needs to be free
I had the same, port looks free but the script somehow blocks it… maybe that’s a solution?
-
Hmm, that was the first I did. I will check tomorrow.Okay, stopping my mqtt xiaomi script was not enough. After I switched off my productive Raspberry no more error occurred.
-
New version with support for the Magic Cube (very nice device by the way )
-
@sweebee said in Aqara (Xiaomi) plugin (Released):
Magic Cube
Yeah you guys need to stop with all these new things, my monthly Ebay quota is reached in the first week of the month
Follow my domotica project on http://maredana.nl
-
New release:
changed some config options for hiding stuff, If you enabled this you might get some config errors, hiding lux is renamed from
lux
toshowLux
andpressure
toshowPressure
. You can now also hide the humidity. and the door sensor is not inverted anymore.