999LV / SmartVirtualThermostat

Smart Virtual Thermostat python plugin for Domoticz home automation system
MIT License
41 stars 31 forks source link

Xiaomi Temperature sensor not detected #1

Closed Lagontinas closed 6 years ago

Lagontinas commented 6 years ago

Hi,

I tried to use this script on my RPi 3 with Domoticz 3.8153, but I'm encountering an issue with temperature sensor reading. My setup is the following : in my living room I have two temperature sensors : a DS18B20, close to the heater (driven by the RPi) and a Xiaomi Aqara temperature sensor, on the other side of the room, linked to a Xiaomi Gateway. I am able to display temperature of both devices (aqara sensor and DS18B20), but when i'm trying to use the SVT with my Xiaomi sensor, Log throws the following error :

2017-11-07 19:31:30.400 Error: (Thermostat Salon) No Inside Temperature found... Switching Thermostat Off

But works fine with DS18B20 sensor's data...It doesn't suit me well (too close to heater, tied to the RPi)

I am far away from being a python expert, but what kind of information do you need about my setup to investigate about the issue ?

Thanks, Lagontinas

999LV commented 6 years ago

This error message simply shows that domoticz does not return to the plugin any temperature data for sensor(s) with the idx you provided in the domoticz hardware config page for the plugin. I assume your Xiaomi sensor is showing up in the domoticz temperatures tab ? Please check the idx value(s) of your sensors(s). If issue persits, please send me by pm (user logread) on the domoticz forum the output of this domoticz jason API call: type=devices&filter=temp&used=true&order=Name (If you are not familiar with the API, please see https://www.domoticz.com/wiki/Domoticz_API/JSON_URL's)

Lagontinas commented 6 years ago

Hi,

I never took the time to make a structured answer, I'd like to correct that if someone encounters the same issue. I actually selected the "wrong" idx for the temperature reading. Xiaomi temperature sensors are seen by domotics as a bunch of different sensors. You get one ID for the temperature, one for the humudity, etc... and one for all data combined. In order to make the thermostat work you MUST use the ID corresponding to the device that shows all data combined, otherwise it will return the error message I got. Hope that'll help !

Cheers, Lagontinas