Error on batterylevel of added device [SOLVED]
Moderator: leecollings
Re: Error on batterylevel of added device
Just an Idea. I use quite long namens that sometimes are lookalikes. All my dzVents scripts are based on names. Is IT possible that namens are beging mixedup?
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Error on batterylevel of added device
Only when you use wildcards. Long names are not cut in dzVents or in the eventSystem. You can check that in the earlier mentioned dump of domoticzdata.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: Error on batterylevel of added device
Yesterday I did an other 'debug' run, trying to find out more. Did not find the answer.
In the "domoticzData.lua" file the device was present now.
There are a few strange things I noticed.
1. It is an INactive device, so it should not be in there at all.
2. lastUpdate is quite recent. I did not update the device, because it is inactive.
3. signalLevel is a strange value.
4. There is no deviceID, that should be 69
5. rawData is strange to, should be {};
6. hardwareID is wrong should be 2
7. batteryLevel is wrong should be 255
These value in the database are normal and as above. GUI is showing normal values too.
I looked if hex value might give an indication -> nothing.
I cannot relate any abnormal value to an other device in the database. Checked database again -> no error.
In the "domoticzData.lua" file the device was present now.
Code: Select all
[15] = {
["changed"] = false;
["lastUpdate"] = "2021-03-18 09:54:34";
["subType"] = "ARC";
["switchTypeValue"] = 0;
["signalLevel"] = 2665764;
["protected"] = false;
["deviceID"] = "";
["image"] = "";
["rawData"] = {
[1] = "255";
};
["baseType"] = "device";
["switchType"] = "On/Off";
["data"] = {
["Image"] = "Light";
["icon"] = "lightbulb";
["customImage"] = 0;
["usedByCamera"] = false;
["_nValue"] = 1;
["protected"] = false;
["_state"] = "On";
["hardwareTypeValue"] = 1;
["hardwareType"] = "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver";
["maxDimLevel"] = 0;
["levelVal"] = 255;
["hardwareName"] = "RFXCOM";
["unit"] = 7;
["hardwareID"] = 7909328;
};
["timedOut"] = true;
["batteryLevel"] = -1350579280;
["description"] = "";
["iconNumber"] = 96;
["id"] = 48;
["lastLevel"] = 0;
["name"] = "Keukenkast spotjes slave OLD";
["deviceType"] = "Lighting 1";
};
1. It is an INactive device, so it should not be in there at all.
2. lastUpdate is quite recent. I did not update the device, because it is inactive.
3. signalLevel is a strange value.
4. There is no deviceID, that should be 69
5. rawData is strange to, should be {};
6. hardwareID is wrong should be 2
7. batteryLevel is wrong should be 255
These value in the database are normal and as above. GUI is showing normal values too.
I looked if hex value might give an indication -> nothing.
I cannot relate any abnormal value to an other device in the database. Checked database again -> no error.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Error on batterylevel of added device
The event system should indeed only pass devices if the hardware module they are connected to is active and if the used field in the database for this device as the value 1.
What do you see when you give
http://<domotcz ip: domoticz port>/json.htm?type=devices&rid=<device idx>
in your browser?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: Error on batterylevel of added device
I already did that and the result is the same as in the database.
- Spoiler: show
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Error on batterylevel of added device
Following the logic in the code it should be impossible that this data ends up in the table passed to dzVents. Only devices with 1 in field Used of the devicestatus table are added to that table.
Do you see any other devices in the dzVents dump of the domoticzdata that are not Used ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: Error on batterylevel of added device
That check is not doable for the amount of active devices I have.
I searched for "deviceID = "" ", and there were none. I checked for signallevel > 12, there were none.
I just found out that this is the only KlikAanKlikUit device with 255 as sValue in the database.
I made the device active switched it a few times, and the value is now "" Put it back to inactive and ran the script again.
Result -> No error. Might be that problem is solved.
Still a little bit creapy, I found this in the domoticz.log
Code: Select all
2021-03-22 13:39:11.716 Error: dzVents: Error: (3.1.6) Discarding device. No last update info found: {["protected"]=false, ["image"]="", ["batteryLevel"]=-1350580304, ["signalLevel"]=2665764, ["subType"]="ARC", ["deviceID"]="", ["deviceType"]="Lighting 1", ["id"]=48, ["data"]={["protected"]=false, ["customImage"]=0, ["Image"]="Light", ["usedByCamera"]=false, ["hardwareTypeValue"]=1, ["_state"]="Off", ["_nValue"]=0, ["hardwareType"]="RFXCOM - RFXtrx433 USB 433.92MHz Transceiver", ["unit"]=7, ["icon"]="lightbulb", ["hardwareID"]=7909328, ["hardwareName"]="RFXCOM", ["levelVal"]=0, ["maxDimLevel"]=0}, ["lastLevel"]=255, ["lastUpdate"]="", ["switchTypeValue"]=0, ["baseType"]="device", ["changed"]=true, ["description"]="", ["rawData"]={}, ["iconNumber"]=240, ["timedOut"]=false, ["name"]="Keukenkast spotjes slave OLD", ["switchType"]="On/Off"}
Who is online
Users browsing this forum: No registered users and 1 guest