Re: Error on batterylevel of added device
Posted: Saturday 20 March 2021 22:39
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?
Open source Home Automation System
https://forum.domoticz.com/
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.EddyG wrote: Saturday 20 March 2021 22:39 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?
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";
};
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.EddyG wrote: Monday 22 March 2021 10:01 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.
These value in the database are normal and as above. GUI is showing normal values too.
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.EddyG wrote: Monday 22 March 2021 11:44 I already did that and the result is the same as in the database.
That check is not doable for the amount of active devices I have.waaren wrote: Monday 22 March 2021 13:01 Do you see any other devices in the dzVents dump of the domoticzdata that are not Used ?
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"}