Filter by Manufacturer Name

Posted on
Mon Aug 15, 2022 2:54 pm
Bildhauer offline
Posts: 160
Joined: Sep 30, 2019
Location: 22113 Oststeinbek (near Hamburg), Germany

Filter by Manufacturer Name

Hello

this script fails:

Code: Select all
for dev in indigo.devices.iter("props.SupportsEnergyMeter") :
   if dev.enabled and dev.supportsStatusRequest and dev.zwManufactureName == "Greenwave":
      indigo.device.statusRequest(dev)



Main goal is to do an status update only to devices manufactured by "Greenwave".

Who can help? This are the device details:

Code: Select all
batteryLevel : None
buttonConfiguredCount : 0
buttonGroupCount : 0
configured : True
description :
deviceTypeId : zwRelayType
displayStateId : onOffState
displayStateImageSel : PowerOn
displayStateValRaw : True
displayStateValUi : on
enabled : True
energyAccumBaseTime : 2000-01-01 00:00:00
energyAccumTimeDelta : 0
energyAccumTotal : 0.0018
energyCurLevel : 0.2
errorState :
folderId : 85000692
globalProps : MetaProps : (dict)
     com.perceptiveautomation.indigoplugin.zwave : (dict)
          SupportsEnergyMeter : true (bool)
          SupportsEnergyMeterCurPower : true (bool)
          SupportsEnergyMeterReset : true (bool)
          SupportsGasMeterReset : true (bool)
          SupportsPowerMeter : true (bool)
          SupportsWaterMeterReset : true (bool)
          address : 38 (integer)
          indigoObjVersion : 10 (integer)
          userEnergyPollingEnabled : false (bool)
          version : 4.21 (string)
          zwClassCmdBase : 37 (integer)
          zwDevEndPoint : 2 (integer)
          zwDevSubIndex : 1 (integer)
          zwManufactureId : 153 (integer)
          zwManufactureName : GreenWave (string)
          zwMeterSubTypeFlags : 5 (integer)
          zwMeterSupportsReset : true (bool)
          zwMeterType : 1 (integer)
          zwModelId : 196612 (integer)
          zwModelName : Relay Power Switch (string)
          zwShowDumpDevToLog : false (bool)
          zwShowEnergyPollingUI : true (bool)
          zwShowMainUI : false (bool)
          zwShowManualModifyConfigParmUI : false (bool)
          zwShowPollingUI : false (bool)
          zwShowSubmitModelInfoUI : false (bool)
          zwShowWakeIntervalUI : false (bool)
id : 1156974714
lastChanged : 2022-08-15 23:30:00
lastSuccessfulComm : 2022-08-15 23:30:00
ledStates : []
model : Relay Power Switch
name : Zwischenstecker Büro Bluetooth-Receiver (Steckdosenleiste 1 Dose 2)
onState : True
ownerProps : com.perceptiveautomation.indigoplugin.zwave : (dict)
     SupportsEnergyMeter : true (bool)
     SupportsEnergyMeterCurPower : true (bool)
     SupportsEnergyMeterReset : true (bool)
     SupportsGasMeterReset : true (bool)
     SupportsPowerMeter : true (bool)
     SupportsWaterMeterReset : true (bool)
     address : 38 (integer)
     indigoObjVersion : 10 (integer)
     userEnergyPollingEnabled : false (bool)
     version : 4.21 (string)
     zwClassCmdBase : 37 (integer)
     zwDevEndPoint : 2 (integer)
     zwDevSubIndex : 1 (integer)
     zwManufactureId : 153 (integer)
     zwManufactureName : GreenWave (string)
     zwMeterSubTypeFlags : 5 (integer)
     zwMeterSupportsReset : true (bool)
     zwMeterType : 1 (integer)
     zwModelId : 196612 (integer)
     zwModelName : Relay Power Switch (string)
     zwShowDumpDevToLog : false (bool)
     zwShowEnergyPollingUI : true (bool)
     zwShowMainUI : false (bool)
     zwShowManualModifyConfigParmUI : false (bool)
     zwShowPollingUI : false (bool)
     zwShowSubmitModelInfoUI : false (bool)
     zwShowWakeIntervalUI : false (bool)
pluginId : com.perceptiveautomation.indigoplugin.zwave
pluginProps : emptyDict : (dict)
protocol : ZWave
remoteDisplay : True
sharedProps : com.indigodomo.indigoserver : (dict)
states : States : (dict)
     accumEnergyTimeDelta : 0 (integer)
     accumEnergyTimeDelta.ui : 0 seconds (string)
     accumEnergyTotal : 0.0018 (real)
     accumEnergyTotal.ui : 0.0018 kWh (string)
     curEnergyLevel : 0.2 (real)
     curEnergyLevel.ui : 0.2 W (string)
     onOffState : on (on/off bool)
subModel : ui=Relay Switch
subType :
supportsAllLightsOnOff : False
supportsAllOff : False
supportsStatusRequest : True
version : 4.21


Best regards

Stephan O.

Posted on
Mon Aug 15, 2022 6:55 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Filter by Manufacturer Name

I think this will do it.

Code: Select all
for dev in indigo.devices.iter("props.SupportsEnergyMeter"):
   if dev.enabled and dev.supportsStatusRequest and dev.ownerProps["zwManufactureName"] == "GreenWave":
      indigo.device.statusRequest(dev)

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Aug 16, 2022 3:14 pm
Bildhauer offline
Posts: 160
Joined: Sep 30, 2019
Location: 22113 Oststeinbek (near Hamburg), Germany

Re: Filter by Manufacturer Name

Thanks! I'll try!

Posted on
Wed Aug 17, 2022 5:21 am
Bildhauer offline
Posts: 160
Joined: Sep 30, 2019
Location: 22113 Oststeinbek (near Hamburg), Germany

Re: Filter by Manufacturer Name

Unfiortunately it doesn't to what I want it to do: at the end the devices should do an update in regards to the current power consumption. Any idea how to make it happen?

Best regards

Bildhauer

Posted on
Wed Aug 17, 2022 5:39 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Filter by Manufacturer Name

When I tested the script, I only changed the manufacturer name and it worked:

Code: Select all
for dev in indigo.devices.iter("props.SupportsEnergyMeter"):
   if dev.enabled and dev.supportsStatusRequest and dev.ownerProps["zwManufactureName"] == "Aeon Labs":
      indigo.device.statusRequest(dev)

Can you describe what's not happening in greater detail?

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Aug 17, 2022 6:16 am
Bildhauer offline
Posts: 160
Joined: Sep 30, 2019
Location: 22113 Oststeinbek (near Hamburg), Germany

Re: Filter by Manufacturer Name

Hello,

one an hour I am writing the power consumption into a file to monitor it. The "GreenWave" power strip does not update its energy parameters automatically. That's what I'm trying with this kind of script.

Best regards

Bildhauer

Posted on
Wed Aug 17, 2022 6:20 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Filter by Manufacturer Name

Are you certain that it supports status update requests?

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Aug 17, 2022 6:46 am
Bildhauer offline
Posts: 160
Joined: Sep 30, 2019
Location: 22113 Oststeinbek (near Hamburg), Germany

Re: Filter by Manufacturer Name

Pushing the "update" button its doing it …

Another idea is to update the Virtual Energy Meter devices linked to it. But there II'm facing issues like these:

Code: Select all
   Virtual Energy Meter Error      Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "plugin.py", line 328, in deviceUpdated
KeyError: key id 710455184 not found in database

   Virtual Energy Meter Error      Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "plugin.py", line 328, in deviceUpdated
KeyError: key id 710455184 not found in database

   Virtual Energy Meter Error      Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "plugin.py", line 328, in deviceUpdated
KeyError: key id 710455184 not found in database

   Virtual Energy Meter Error      Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "plugin.py", line 328, in deviceUpdated
KeyError: key id 710455184 not found in database

   Virtual Energy Meter Error      Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "plugin.py", line 328, in deviceUpdated
KeyError: key id 710455184 not found in database

   Virtual Energy Meter Error      Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "plugin.py", line 328, in deviceUpdated
KeyError: key id 710455184 not found in database

   Virtual Energy Meter Error      Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "plugin.py", line 328, in deviceUpdated
KeyError: key id 710455184 not found in database

   Virtual Energy Meter Error      Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "plugin.py", line 328, in deviceUpdated
KeyError: key id 710455184 not found in database

Posted on
Wed Aug 17, 2022 6:56 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Filter by Manufacturer Name

I have a Greenwave though haven’t used it for months.

Can’t you set polling to a specific time (ie hourly) rather than the default “when traffic detected”?


Sent from my iPhone using Tapatalk Pro

Posted on
Wed Aug 17, 2022 11:33 am
Bildhauer offline
Posts: 160
Joined: Sep 30, 2019
Location: 22113 Oststeinbek (near Hamburg), Germany

Re: Filter by Manufacturer Name

howartp wrote:
I have a Greenwave though haven’t used it for months.

Can’t you set polling to a specific time (ie hourly) rather than the default “when traffic detected”?


Sent from my iPhone using Tapatalk Pro


I’ll have a look at it!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests