Testing a Z-Wave device to verify it is receiving power

Posted on
Sat Jun 08, 2019 7:02 pm
ken_jacobs offline
Posts: 189
Joined: Jul 23, 2005

Re: Testing a Z-Wave device to verify it is receiving power

Correction fixed the problem, thanks.

Posted on
Sun Jun 09, 2019 7:09 am
ken_jacobs offline
Posts: 189
Joined: Jul 23, 2005

Re: Testing a Z-Wave device to verify it is receiving power

Now that the script is running I have transitioned to an operational issue. Although the script works as expected when power is supplied to the device, I have a timeout issue when power is removed from the device. Apparently the timeout on a non-responding device is so long that Indigo shuts down the script.

The current script

Code: Select all
result = indigo.device.ping(1637128522,suppressLogging=True)
if not result["Success"]:
  indigo.server.log("ping failed", isError=True)
  indigo.actionGroup.execute(165280149)

The log info

Code: Select all
   Error                           because embedded scripts execute sequentially they must complete their execution within 10 seconds.
   Error                           modify the script to exit quickly or convert it to an external file (not embedded).
   Stopping embedded script executor host (pid 97060)
   Error                           process (pid 97060) failed to quit after polite request -- forcing it to quit now
   Stopped "embedded script executor host"
   Error                           client target com.perceptiveautomation.indigoplugin.scriptexecutor.embedded_bg not found for message CallPluginFunc

Posted on
Sun Jun 09, 2019 7:18 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Testing a Z-Wave device to verify it is receiving power

Hi Ken.

I’m not sure if you haven’t understood or don’t know how to, but Joe has suggested a few times that you paste code inside CODE blocks when asking questions.

Before you paste your sample code into a response, either use the toolbar buttons to insert CODE tags, or manually type: [ code ] [ /code ] without the spaces. (I can’t type without spaces or they won’t appear for you to read.) Then paste your code between the two sections.

This ensures that line breaks and tabs/spacing in your code are preserved, so we can see you’re using the correct code, as Python relies upon correct tabbing to work. If you continue pasting without code blocks, folk won’t be able to help you.

(As it happens, it’s probably unrelated to this latest question about timeouts, but it’s still worth me reiterating to you for future, as you’ve posted again without code blocks - we’re just trying to help you)

Peter



Sent from my iPhone using Tapatalk Pro

Posted on
Sun Jun 09, 2019 7:22 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Testing a Z-Wave device to verify it is receiving power

According to this post, there's no way to set a timeout on the ping call:
viewtopic.php?f=107&t=17500

So you'll need to run this in an external script to avoid the error.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Jun 09, 2019 5:12 pm
ken_jacobs offline
Posts: 189
Joined: Jul 23, 2005

Re: Testing a Z-Wave device to verify it is receiving power

Well I moved the Python script to an external file and everything works as expected. I want to thank all those who offered help in this activity.

Posted on
Mon Jun 10, 2019 11:03 am
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Testing a Z-Wave device to verify it is receiving power

FlyingDiver wrote:
Use the code tags.


I've edited @ken_jacobs posts to include code tags - please note how those work (there's a Code button above the post edit box) so future script/code examples are easier for everyone to read.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Who is online

Users browsing this forum: No registered users and 19 guests