RTL_433

Moderator: leecollings

Post Reply
qqlapraline
Posts: 19
Joined: Saturday 11 January 2014 16:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

RTL_433

Post by qqlapraline »

Hello everyone,

I have tried using RTL_433 with a popular (and cheap :)) OEM weather station: Sainlogic FT0300.
RTL_433 is retrieving all the necessary sensors data (Temp, Humidity, Wind speed and direction, rain, UV and Light) with the latest version of the tool.
Unfortunately, Domoticz is not able to retrieve the UV value.
It seems that the code is not consistent.

Here is how RTL_433 is sending back information in

Code: Select all

cotech_36_7959.c

Code: Select all

    data = data_make(
            "model",            "",                 DATA_STRING, "Cotech-367959",
            //"subtype",          "Type code",        DATA_INT, subtype,
            "id",               "ID",               DATA_INT,    id,
            "battery_ok",       "Battery",          DATA_INT,    !batt_low,
            "temperature_F",    "Temperature",      DATA_FORMAT, "%.1f F", DATA_DOUBLE, temp_c,
            "humidity",         "Humidity",         DATA_FORMAT, "%u %%", DATA_INT, humidity,
            "rain_mm",          "Rain",             DATA_FORMAT, "%.1f mm", DATA_DOUBLE, rain * 0.1f,
            "wind_dir_deg",     "Wind direction",   DATA_INT,    wind_dir,
            "wind_avg_m_s",     "Wind",             DATA_FORMAT, "%.1f m/s", DATA_DOUBLE, wind * 0.1f,
            "wind_max_m_s",     "Gust",             DATA_FORMAT, "%.1f m/s", DATA_DOUBLE, gust * 0.1f,
            "light_lux",        "Light Intensity",  DATA_COND, light_is_valid, DATA_FORMAT, "%u lux", DATA_INT, light_lux,
            "uvi",              "UV Index",         DATA_COND, light_is_valid, DATA_FORMAT, "%.1f", DATA_DOUBLE, uvi * 0.1f,
            "mic",              "Integrity",        DATA_STRING, "CRC",
            NULL);
And here is how Domoticz is parsing it in

Code: Select all

Rtl433.cpp

Code: Select all

	if (FindField(data, "uv"))
	{
		uvi = (float)atof(data["uv"].c_str());
		haveUV = true;
	}
Obviously, when it refers to UV Index, these two guys are not talking the same language :)
On my side, I have fixed it by adjusting the rtl_433 source on my device (I know, it's bad :)). But the best way is probably to adjust it on Domoticz side.

Have a good day,

QQ.
3 Raspberry PI (Raspbian + Rfxcom, teleinfo or mysensors gateway)
Bunch of OS THGR810n (5)
Some THN122
1 WGR800 and PCR800
Some BMP085
Bunch of TS34C (4)
Bunch of DIO plugs (3)
Teleinfo
Many Mysensors devices (Temp, Hygro, ...)
User avatar
waltervl
Posts: 6676
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: RTL_433

Post by waltervl »

The best way is that you create a Pull Request on the Domoticz source code repository so everyone can enjoy the UV index value... :D
https://github.com/domoticz/domoticz?ta ... ixing-bugs
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
FlyingDomotic
Posts: 463
Joined: Saturday 27 February 2016 0:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Re: RTL_433

Post by FlyingDomotic »

I'm using UV index for a while, but sending only integer value from 0 to 9 (or 10, I don't remind highest value)
IanDury
Posts: 50
Joined: Wednesday 08 April 2015 15:22
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: RTL_433

Post by IanDury »

Reported as issue https://github.com/domoticz/domoticz/issues/6534 and has been fixed.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest