Page 1 of 1

Xiaomi Mi Flora

Posted: Tuesday 31 March 2020 17:19
by florisi
I've installed two Xiaomi Mi Flora sensors via Python Plugin Manager.
Per Mi Flora I have now 4 devices.
The moisture device is in 'cb' with the correct value.
When I add the device to Dashticz it appears as 'AAN' with a bulb icon.

The conductivity device is presented right in Dashticz.

What can I do to present the right value.
Running Domoticz 2020.1 and Dashticz V3.3.3.1

Re: Xiaomi Mi Flora

Posted: Tuesday 31 March 2020 18:56
by Lokonli
Can you post the json response of the device data?

http://<domoticz ip>/json.htm?type=devices&rid=IDX

Replace IDX with the Domoticz device id of your sensor.

Re: Xiaomi Mi Flora

Posted: Tuesday 31 March 2020 19:47
by florisi
Here is the json output

Code: Select all

{
	"ActTime" : 1585676721,
	"AstrTwilightEnd" : "22:08",
	"AstrTwilightStart" : "05:12",
	"CivTwilightEnd" : "20:43",
	"CivTwilightStart" : "06:38",
	"DayLength" : "12:57",
	"NautTwilightEnd" : "21:24",
	"NautTwilightStart" : "05:56",
	"ServerTime" : "2020-03-31 19:45:21",
	"SunAtSouth" : "13:40",
	"Sunrise" : "07:12",
	"Sunset" : "20:09",
	"app_version" : "2020.1 (build 11839)",
	"result" : 
	[
		{
			"AddjMulti" : 1.0,
			"AddjMulti2" : 1.0,
			"AddjValue" : 0.0,
			"AddjValue2" : 0.0,
			"BatteryLevel" : 99,
			"CustomImage" : 0,
			"Data" : "44 cb",
			"Desc" : "irrigation advise",
			"Description" : "",
			"Favorite" : 1,
			"HardwareID" : 16,
			"HardwareName" : "MiFlowerMate",
			"HardwareType" : "Xiaomi Mi Flower Mate",
			"HardwareTypeVal" : 94,
			"HaveTimeout" : false,
			"ID" : "00100002",
			"LastUpdate" : "2020-03-31 18:00:17",
			"Name" : "MiFlowerMate - #0 Moisture",
			"Notifications" : "true",
			"PlanID" : "0",
			"PlanIDs" : 
			[
				0
			],
			"Protected" : false,
			"ShowNotifications" : true,
			"SignalLevel" : "-",
			"SubType" : "Soil Moisture",
			"SwitchTypeVal" : 0,
			"Timers" : "false",
			"Type" : "General",
			"TypeImg" : "moisture",
			"Unit" : 2,
			"Used" : 1,
			"XOffset" : "0",
			"YOffset" : "0",
			"idx" : "223"
		}
	],
	"status" : "OK",
	"title" : "Devices"
}

Re: Xiaomi Mi Flora

Posted: Wednesday 29 April 2020 9:10
by tonbor
sensorName = sensorBaseName + "Moisture"
Domoticz.Debug("Creating first sensor, #"+str(sensorNumber))
Domoticz.Debug("Creating first sensor, name: "+str(sensorName))
Domoticz.Device(Name=sensorName, Unit=sensorNumber, TypeName="Soil Moisture", Used=1).Create()
Domoticz.Log("Created device: "+Devices[sensorNumber].Name)

Soil Moisture should be "percentage" in the plugin code

Just change this part in the plugin code plugin.py
Domoticz.Device(Name=sensorName, Unit=sensorNumber, TypeName="Percentage", Used=1).Create()

then delete the plugin and update the plugin

Moisture will then be the right label %

Re: Xiaomi Mi Flora

Posted: Wednesday 29 April 2020 21:17
by florisi
Thanks, i will look at it tomorrow