Author Topic: Xiaomi temp/humidity sensor  (Read 1222 times)

Offline ElCid

  • Sr. Newbie
  • *
  • Posts: 20
  • Karma: +1/-5
Xiaomi temp/humidity sensor
« on: March 03, 2017, 08:07:31 am »
Hi
Ive search forum and only found one thread on this.
Ive added the Xiaomi sensor to my veraplus controller as a generic zigbee device.
The problem is the device is added as a smoke alarm.
Ive tried changing the d_smokeSensor.xml to D_temperatuesensor.xml and the devicedisappears from devices when i change json file.

i'm new to vera and no alittle coding in html and PHP but JSON im not so good with any one got advice for me

Offline rafale77

  • Hero Member
  • *****
  • Posts: 713
  • Karma: +35/-20
Re: Xiaomi temp/humidity sensor
« Reply #1 on: March 03, 2017, 11:11:13 am »
Did you change the device category, sub category, and device file as well? If not, the vera will treat your device as invalid and hide it from the UI so you can't correct it... Another "smart feature" of the UI
127 zwave nodes, 8 zigbee nodes, 256 devices, 17 apps, 128 scenes on a Vera Plus linked with Echo and HomeKit through bridges

Offline ElCid

  • Sr. Newbie
  • *
  • Posts: 20
  • Karma: +1/-5
Re: Xiaomi temp/humidity sensor
« Reply #2 on: March 03, 2017, 12:15:26 pm »
In the advanced setting i've changed the device_file from D_SmokeSensor1.xml to D_TemperatueSensor1.xml.
And device_json to D_TemperatueSensor1.json.

I am very new to vera and am still finding my way around the device. Hope to figure out how to write my own json but for now trying to get the xiaomi sensor to report a temperature

p.s. is there a way to turn off verification when posting to this forum

Offline ElCid

  • Sr. Newbie
  • *
  • Posts: 20
  • Karma: +1/-5
Re: Xiaomi temp/humidity sensor
« Reply #3 on: March 03, 2017, 03:18:05 pm »
Did you change the device category, sub category, and device file as well? If not, the vera will treat your device as invalid and hide it from the UI so you can't correct it... Another "smart feature" of the UI
lucky i never closed advanced settings tab so was able to return to original xml and json.

i did change number_category and sub but still it disappears. So how do i link to different xml and  json

Offline ElCid

  • Sr. Newbie
  • *
  • Posts: 20
  • Karma: +1/-5
Re: Xiaomi temp/humidity sensor
« Reply #4 on: March 04, 2017, 12:34:56 pm »
so has anyone got any ideas how i link to different xml and json?

Offline rafale77

  • Hero Member
  • *****
  • Posts: 713
  • Karma: +35/-20
Re: Xiaomi temp/humidity sensor
« Reply #5 on: March 04, 2017, 04:46:13 pm »
Go in the device, under advanced,
you will have a device_file field. Change it to: D_TemperatureSensor1.xml
in the device_json field paste: D_TemperatureSensor1.json
Category_num: 17
Sub Category_num_: 0

This will be for your temperature sensor.
You have a typo in what you posted so if you posted them as is, the files don't exist so the device will disappear. If the vera finds the file, as long as it exists, even if it is the wrong one, the device should not disappear.
« Last Edit: March 04, 2017, 04:48:50 pm by rafale77 »
127 zwave nodes, 8 zigbee nodes, 256 devices, 17 apps, 128 scenes on a Vera Plus linked with Echo and HomeKit through bridges

Offline ElCid

  • Sr. Newbie
  • *
  • Posts: 20
  • Karma: +1/-5
Re: Xiaomi temp/humidity sensor
« Reply #6 on: March 05, 2017, 03:39:12 am »
i have done that and i copy and pasted file names, as soon as i change json file the the device vanishes and returns if i link back to json

Offline ElCid

  • Sr. Newbie
  • *
  • Posts: 20
  • Karma: +1/-5
Re: Xiaomi temp/humidity sensor
« Reply #7 on: March 05, 2017, 05:50:28 am »
ok i think the json file is not right for this device. i searched internet and found this https://community.smartthings.com/t/xiaomi-zigbee-door-window-sensor-motion-sensor-smart-button-device-type-beta/31948/762  reply 140. now im looking for a copy of the generic temperature handler so i can port it across to vera.


Offline ElCid

  • Sr. Newbie
  • *
  • Posts: 20
  • Karma: +1/-5
Re: Xiaomi temp/humidity sensor
« Reply #8 on: March 08, 2017, 04:02:17 pm »
ok ive search web for info on these devices.
zigbee 1.2 sep
humidity
temperature
set point  temp alarm
with arming

I paired the device and its able to configure but no readings.
it will arm and the armed variable updates  from 0 to 1

im reading the mios documents and slowly the syntax of the json file is comming to me.

is there any code i can put in json to grab the raw data and display it?

I will attach the advanced and variables tab so you guys can see whats missing and give me some clues as how to work roumd it.

From what ive read these are fairly (accurate devices, so would love to have them by my windows to test if window is open with some pleg logic they may also work as leak detector. Smartthings community have developed handlers already.
« Last Edit: March 08, 2017, 04:45:36 pm by ElCid »

Offline Danxy0

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Xiaomi temp/humidity sensor
« Reply #9 on: March 21, 2017, 08:59:52 am »
I am also very new in Vera, I've just got it.  I have Vera advanced and have the same problem.

ElCid did you manage to get data?
 
« Last Edit: March 21, 2017, 09:47:32 am by Danxy0 »