Forcing a "Send Status Request"

Posted on
Sat Jul 30, 2016 11:03 am
boisy offline
User avatar
Posts: 273
Joined: Jun 25, 2013

Forcing a "Send Status Request"

I have several I/O Linc devices (3 to be exact) that I'm controlling: two garage doors and a gate.

In all three cases, I have magnetic switches that sense whether the device is open or closed. Most of the times these update ok, but sometimes, the state of the Garage Door is closed in Indigo when the garage door is really open. This plays havoc with my scripts if the binary input doesn't match the true state.

What I would like to do in my Python script is BEFORE determining the binary input state is to force a refresh of the state. I can do this in the UI easily by clicking "Send Status Request" but cannot figure out how to do this in Python. Any ideas?

Posted on
Sun Jul 31, 2016 10:17 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Forcing a "Send Status Request"

Hi Boisy,

You can use the following:

Code: Select all
indigo.device.statusRequest(dev)

You will then want to have the script sleep for a few seconds to give the reply time to come in. You can also pass in suppressLogging=True if you don't want Indigo to log the status request being sent.

Image

Posted on
Thu Sep 01, 2016 9:40 am
boisy offline
User avatar
Posts: 273
Joined: Jun 25, 2013

Re: Forcing a "Send Status Request"

Thanks Matt. This is working great!

Posted on
Mon Sep 12, 2016 4:12 pm
mortenkols offline
Posts: 198
Joined: Oct 29, 2014
Location: Norway

Re: Forcing a "Send Status Request"

I use this code to send a status request

Code: Select all
indigo.device.statusRequest(117884308)
suppressLogging=False

But the status request does appear in the log. What am I doing wrong?
Attachments
Skjermbilde 2016-09-13 kl. 00.09.37.png
Skjermbilde 2016-09-13 kl. 00.09.37.png (252.9 KiB) Viewed 2973 times

Posted on
Mon Sep 12, 2016 7:26 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Forcing a "Send Status Request"

suppressLogging goes into the argument list:

indigo.device.statusRequest(dev_id, suppressLogging=False)

Image

Posted on
Tue Sep 13, 2016 12:30 am
lochnesz offline
Posts: 370
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: Forcing a "Send Status Request"

mortenkols wrote:
I use this code to send a status request

Code: Select all
indigo.device.statusRequest(117884308)
suppressLogging=False

But the status request does appear in the log. What am I doing wrong?


In addition to Matt's reply above, if you don't want to see the log entry, suppressLogging should be set to True, not False.

Peter

Posted on
Tue Sep 13, 2016 1:02 am
mortenkols offline
Posts: 198
Joined: Oct 29, 2014
Location: Norway

Re: Forcing a "Send Status Request"

I have tried with False and True.

Posted on
Tue Sep 13, 2016 3:51 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Forcing a "Send Status Request"

This code works for me:

Code: Select all
# A sleep interval is required to allow time to process the request.
from time import sleep

# The device must support status request, battery-powered devices will not respond unless awake.
indigo.device.statusRequest(dev_id, suppressLogging=False)
sleep(0.5)

Many devices don't support status requests and some seem to only support it for certain features (for example, my Fibaro Multisensor responds for the master device--the motion sensor--but not the slave devices.) You might also try adjusting the sleep interval as some devices likely take longer to respond than others.

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

[My Plugins] - [My Forums]

Posted on
Tue Sep 13, 2016 12:57 pm
mortenkols offline
Posts: 198
Joined: Oct 29, 2014
Location: Norway

Re: Forcing a "Send Status Request"

When i use this code, the sent command appears in the log. I can't se any different between supressLogging=True and supressLogging=False

Code: Select all
indigo.device.statusRequest(806959927,suppressLogging=True)


13. sep. 2016, 20.51.13
Z-Wave sent "Gang kjeller - Lys tak" status request
Z-Wave sent "Gang kjeller - Lys tak" energy status request
Z-Wave sent "Gang kjeller - Lys tak I2" status request
Z-Wave sent "Gang kjeller - Lys tak I3" status request
Z-Wave received "Gang kjeller - Lys tak I2" status update is off
Z-Wave received "Gang kjeller - Lys tak I3" status update is off

Posted on
Tue Sep 13, 2016 2:24 pm
mortenkols offline
Posts: 198
Joined: Oct 29, 2014
Location: Norway

Re: Forcing a "Send Status Request"

I have used suppress in the code.

Posted on
Tue Sep 13, 2016 2:27 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Forcing a "Send Status Request"

Sorry, but the suppressLogging option isn't currently working for the Z-Wave interface. It works for INSTEON and X10, but not Z-Wave or any 3rd party plugins. We have on our ToDo list to improve it...

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 8 guests