Low's Iris shutting down March 31

Posted on
Tue Feb 12, 2019 1:39 am
Dual offline
Posts: 257
Joined: Feb 05, 2019

Re: Low's Iris shutting down March 31

jay (support) wrote:
Any other approach would require writing a script.


A script is preferred, since I need to learn Python and how to use it with Indigo anyways. I want to both modify the temperature setting and turn the system off as double insurance against failure of one or the other. This is to avoid setting a new electrical demand level. I have a script written and tested. The problem I am having is I need Indigo to get the latest status from the Thermostat before the rest of my script executes. Likely an easy thing to do. I just haven't found the command yet. Here is what I have so far:

Code: Select all
# schedule the below to run at 3 pm weekdays (high power rates)
frontTherm = indigo.devices[1045487200]
# need a line here to get the up-to-the-second data from the thermostat
# otherwise it seems the data is from last time the thermostat was polled
frontThermSavedMode = frontTherm.hvacMode
indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.Off)

# schedule the below to run at 8 pm weekdays (low power rates)
if frontThermSavedMode == "Cool":
   indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.Cool)
elif frontThermSavedMode == "Heat":
   indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.Heat)
elif frontThermSavedMode == "HeatCool":
   indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.HeatCool)
else:
   indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.Off)


Things accomplished since my last post 2 days ago:

  • included and tested DOME DMS01 Siren successfully (I can turn the siren on and off, I need to figure out how to operate any of it's 10 different chimes as well ... help please)
  • included and tested DOME DMWS1 Leak Detector successfully
  • included and tested ZOOZ ZSE40 4-in-1 sensor after "mashing" with the paper clip continuously as recommended elsewhere on the forum
  • included Ring Contact Sensor successfully ... no Indigo device definition so it is not working ... I have contacted Ring to see if I can get the specification to parse the Z-Wave communication
  • removed failed modules from controller (that took me multiple attempts to include)
  • installed and deployed the Door Locks Manager plugin (connected to my Kwikset 910 and al is working beautifully)
  • purchased my Indigo license ... I am committed now
  • set up my reflector
  • connected to Indigo server using a web browser (indigo Touch)
  • connected to Indigo server using Indigo Touch on my iPhone 8+ running iOS 12.1.2
  • read the Indigo Object Model Reference v2.0
  • read the Indigo Scripting Tutorial
  • read the Indigo 7 v7.0.0 forum topic re Python
  • played quite a bit with Python scripting to see what info I could get from the server re devices etc
  • wrote and tested the above script

I have purchased and tested many different Z-Wave devices so I can ultimately make a decision on which are my preferred devices going forward. I have 2 more devices coming. A Ring Keypad. And an AEOTEC Smart Switch 6. As mentioned in my first post I have over 120 devices deployed on 3 Iris systems. After the hell of Iris I want to do my best to choose devices carefully.

I am ahead of schedule. I need to have this system deployed by March 8. I have another home that is on Iris as well so I will be heading there March 8 to deploy Indigo (a second licensed server).

I am currently doing all of the development and testing on my MBP with macOS High Sierra 10.13.6. I will need to figure out how to move the Server and license over to another computer here at this house. I have already found the instructions for moving the license so I don't see any big issues coming.

I currently have iMacs running High Sierra at both houses. I could use them to run Indigo. However, I would rather do so on a separate computer. I have looked at the new Mac Mini:

3.6GHz quad-core 8th-generation Intel Core i3 processor
8GB 2666MHz DDR4 memory
Intel UHD Graphics 630
128GB PCIe-based SSD storage
$799.00

I can get a refurbished unit for $679 and save $120. However, I believe it will come preloaded with macOS 10.14 Mojave. I see there are warnings about compatibility with Mojave. Is anyone running indigo with Mojave successfully? Otherwise I need to look for used Mac Minis.

Cheers

John

Posted on
Tue Feb 12, 2019 4:30 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Low's Iris shutting down March 31

Indigo runs perfectly well under Mojave -- I have it running on two machines with no problems. That said, some users have reported that there are challenges with Insteon. I don't use Insteon, but I believe that the issues can be overcome by addressingthe relevant driver and (IIRC) the challenges are controller-specific. The only potential future challenge I know of with Indigo is when Apple ultimately requires 64-bit. Matt and Jay have committed to a 64-bit version at or before the time that Apple requires it.

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

[My Plugins] - [My Forums]

Posted on
Tue Feb 12, 2019 8:24 am
CliveS offline
Posts: 770
Joined: Jan 10, 2016
Location: Medomsley, County Durham, UK

Re: Low's Iris shutting down March 31

Dual wrote:
[*]included and tested DOME DMS01 Siren successfully (I can turn the siren on and off, I need to figure out how to operate any of it's 10 different chimes as well ... help please)

Welcome to Indigo,

As the Dome Siren is a rebadged Neo Coolcam Siren then all Matt/Jay need to do is add it to the Neo definition but at present to get the different chimes goto action groups and for 'Type' use'ZWave Actions' then 'Modify Configuration Parameter' , pick your siren device and param index of 5, param value of your choice between 1 and 10 and save.

You can change volume and length of tone and also use a second set of 10 chimes and enable or disable the Flashing LED Ring (strobe) by the above setup, full details can be found at http://docs.domeha.com/#configuration-command-class-parameters20

CliveS

Indigo 2023.2.0 : macOS Ventura 13.6.3 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
----------------------------------------------------------------------------------
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer

Posted on
Tue Feb 12, 2019 10:09 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Low's Iris shutting down March 31

Dual wrote:
The problem I am having is I need Indigo to get the latest status from the Thermostat before the rest of my script executes. Likely an easy thing to do. I just haven't found the command yet.


indigo.device.statusRequest

You'll want to do that before you get the thermostat instance (otherwise you'd also have to refresh the local instance) and perhaps pause briefly:

Code: Select all
import time
indigo.device.statusRequest(1045487200)
time.sleep(1)
frontTherm = indigo.devices[1045487200]


Though, I have to say I'm extremely surprised that you have to do that - every Z-Wave thermostat I know of reports all changes made to it immediately. Polling out status is definitely not something I'd expect would have to happen. But I suppose there might be some out there that don't do that.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Feb 12, 2019 10:11 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Low's Iris shutting down March 31

CliveS wrote:
As the Dome Siren is a rebadged Neo Coolcam Siren then all Matt/Jay need to do is add it to the Neo definition


Open the Device Config dialog and click the Submit Device Info button (if it's present) and fill out the resulting web form. This will get it on our radar to add.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Feb 12, 2019 7:15 pm
Dual offline
Posts: 257
Joined: Feb 05, 2019

Re: Low's Iris shutting down March 31

jay (support) wrote:
CliveS wrote:
As the Dome Siren is a rebadged Neo Coolcam Siren then all Matt/Jay need to do is add it to the Neo definition


Open the Device Config dialog and click the Submit Device Info button (if it's present) and fill out the resulting web form. This will get it on our radar to add.


There is a device definition. It shows as a relay module in the device config dialog and therefore the Submit button is not present. Screenshot attached. If I create a new trigger and an action for Device Actions - Light/Appliance Control I can turn the siren on or off but not select a chime instead. Do I need to use Z-Wave Actions - Send Raw Z-Wave Command instead? If so I can likely figure it out using the docs referenced by CliveS above. I just figured if it had a device definition there would be something I could do directly. Alternatively I could use a simple Python script as well. I am learning slowly but surely thanks to all the help.

Cheers

John
Attachments
Screen Shot 2019-02-12 at 6.08.15 PM.png
Screen Shot 2019-02-12 at 6.08.15 PM.png (112.85 KiB) Viewed 4918 times

Posted on
Tue Feb 12, 2019 7:38 pm
Dual offline
Posts: 257
Joined: Feb 05, 2019

Re: Low's Iris shutting down March 31

jay (support) wrote:
Though, I have to say I'm extremely surprised that you have to do that - every Z-Wave thermostat I know of reports all changes made to it immediately. Polling out status is definitely not something I'd expect would have to happen. But I suppose there might be some out there that don't do that.


You are indeed extremely surprised then. I have tested it:

  • Thermostat was in Off mode for past 18 hours.
  • Executed:
    >>> frontTherm = indigo.devices[1045487200]
    >>> indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.Cool)
  • Observed on thermostat that mode indeed changed to Cool
  • I waited a minute then executed:
    >>> frontThermSavedMode = frontTherm.hvacMode
    >>> print frontThermSavedMode
    Off
  • Waited a couple of more minutes and got the same result
  • Executed:
    >>> import time
    >>> indigo.device.statusRequest(1045487200)
    >>> time.sleep(1)
    >>> frontTherm = indigo.devices[1045487200]
    >>> frontThermSavedMode = frontTherm.hvacMode
    >>> print frontThermSavedMode
    Cool
Thanks for your help Jay. With the addition of the statusRequest command my script should work.

Posted on
Tue Feb 12, 2019 8:25 pm
Dual offline
Posts: 257
Joined: Feb 05, 2019

Re: Low's Iris shutting down March 31

Arrrrrrrgh! Likely it's something simple and something I don't yet know about Python, but what is wrong with my script below? It should execute the main IF statement, instead it executes the ELSE statement. If I put the system in Heat in should execute the first ELIF statement, instead it executes the Else statement. Huh?

>>> import time
>>> indigo.device.statusRequest(1045487200)
>>> time.sleep(1)
>>> frontTherm = indigo.devices[1045487200]
>>> frontThermSavedMode = frontTherm.hvacMode
>>> print frontThermSavedMode
Cool
>>> indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.Off)
>>> time.sleep(5)
>>> if frontThermSavedMode == "Cool":
... print "1"
... print frontThermSavedMode
... indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.Cool)
... elif frontThermSavedMode == "Heat":
... print "2"
... print frontThermSavedMode
... indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.Heat)
... elif frontThermSavedMode == "HeatCool":
... print "3"
... print frontThermSavedMode
... indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.HeatCool)
... else:
... print "4"
... print frontThermSavedMode
... indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.Off)
...
4
Cool
>>> print "5"
5
>>>

Code: Select all
import time
indigo.device.statusRequest(1045487200)
time.sleep(1)
frontTherm = indigo.devices[1045487200]
frontThermSavedMode = frontTherm.hvacMode
print frontThermSavedMode
indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.Off)
time.sleep(5)
if frontThermSavedMode == "Cool":
   print "1"
   print frontThermSavedMode
   indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.Cool)
elif frontThermSavedMode == "Heat":
   print "2"
   print frontThermSavedMode
   indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.Heat)
elif frontThermSavedMode == "HeatCool":
   print "3"
   print frontThermSavedMode
   indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.HeatCool)
else:
   print "4"
   print frontThermSavedMode
   indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.Off)

print "5"


I need a beer.

Cheers

John

Posted on
Tue Feb 12, 2019 9:37 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Low's Iris shutting down March 31

Dual wrote:
Arrrrrrrgh! Likely it's something simple and something I don't yet know about Python, but what is wrong with my script below?

So here's one "secret" about Python. Whenever I see something like this where things should obviously be equivalent--but aren't--it's more than likely due to differences in the objects' types. Consider:

Code: Select all
dev = indigo.devices[1700355009]
mode = dev.hvacMode
indigo.server.log(str(type(mode)))

Result:
Code: Select all
   Script                          <class 'indigo.kHvacMode'>

So then try this:
Code: Select all
dev = indigo.devices[1700355009]
mode = str(dev.hvacMode)

if mode == "Heat":
     indigo.server.log("Yup.")

Result:
Code: Select all
   Script                          Yup.

So in the first example, the result of the statement gives you an Indigo class object. This is not the same as a string, so your first IF is False. Converting the object to a string will make the comparison work as you expect.

Don't sweat that you didn't see this--it's not that intuitive.

Sometimes a beer is just what the doctor ordered. In fact, I'm enjoying a fine SweetWater IPA right now. :D

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

[My Plugins] - [My Forums]

Posted on
Wed Feb 13, 2019 3:32 am
Dual offline
Posts: 257
Joined: Feb 05, 2019

Re: Low's Iris shutting down March 31

Ring Contact Sensor

Building on Matt's earlier tip for the Howzee Contact Sensor, I managed to get the Ring Contact Sensors working (yes) properly (I hope).

For the open trigger I used Match Raw Packet with a Match Bytes of
* 0x71 0x05 0x00 0x00 0x00 0xFF 0x07 0x02 *

For the close trigger I used Match Raw Packet with a Match Bytes of
* 0x71 0x05 0x00 0x00 0x00 0xFF 0x07 0x00 *

The data from the sensor in the log for an open followed by a close was:

Code: Select all
   Z-Wave Debug                    RCVD requestAlarmSensorStatus: 01 0F 00 04 00 25 09 71 05 00 00 00 FF 07 02 00 56
   Z-Wave Debug                    . .  requestAlarmSensorStatus: node 037, endpoint None, cmdClass 71, type 0, value 0, classSubKey 710000
   Z-Wave Debug                    . .  requestAlarmSensorStatus: typeExt 7, valueExt 2, classSubKeyExt 7100000702
   Z-Wave Debug                    RCVD requestAlarmSensorStatus: 01 10 00 04 00 25 0A 71 05 00 00 00 FF 07 00 01 02 4B
   Z-Wave Debug                    . .  requestAlarmSensorStatus: node 037, endpoint None, cmdClass 71, type 0, value 0, classSubKey 710000
   Z-Wave Debug                    . .  requestAlarmSensorStatus: typeExt 7, valueExt 0, classSubKeyExt 7100000700

Do my Match Bytes values look ok?

Ring Keypad

Ring Keypad is included and synced. Raw Packets are being received in the log. I have pressed all the buttons and observed the data received in the log (with Z-Wave Debug on). Tomorrow (actually later today since it is 2:30 am and therefore bedtime) I will try to figure out what my Match Bytes should be for each of the buttons and how this thing works. Raw data below. Any input would be appreciated. I have noticed that if I press 3 of the digit buttons in a row I don't receive 3 separate sets of data. It is as if only the first digit press is transmitted until the 5 seconds goes by. This seems like a problem. Perhaps I need to be acknowledging receipt of the key press before the keypad will send me the next digit? Thus the 5 seconds and the next data received are possibly a timeout?

Code: Select all
keypad button 1:
pressed and released:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 2C 5C CB B9 D9 D8 A7 15 25 7A 2D
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 05 02 00 00 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0C 00 04 00 2C 06 6F 01 05 02 00 00 FF (hex)
after 5 seconds:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 2C 5C CB B9 D9 D8 A7 15 25 7B 2C
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 06 02 01 01 31 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0D 00 04 00 2C 07 6F 01 06 02 01 01 31 FF (hex)

keypad button 2:
pressed:
 Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 C0 2F 53 90 A7 A3 99 C1 25 7F E9
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 07 02 00 00 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0C 00 04 00 2C 06 6F 01 07 02 00 00 FF (hex)
after:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 8A 2B 69 BE 1C 08 E4 AD 25 80 4D
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 08 02 01 01 32 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0D 00 04 00 2C 07 6F 01 08 02 01 01 32 FF (hex)

keypad button 3:
pressed:
 Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 08 44 88 F0 32 97 31 60 25 81 A7
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 09 02 00 00 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0C 00 04 00 2C 06 6F 01 09 02 00 00 FF (hex)
after:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 62 D7 F7 A2 4A EC 36 13 25 82 07
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 0A 02 01 01 33 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0D 00 04 00 2C 07 6F 01 0A 02 01 01 33 FF (hex)
   
keypad button 4:
pressed:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 7F 75 9D 06 4A 75 AC 09 25 83 6E
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 0B 02 00 00 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0C 00 04 00 2C 06 6F 01 0B 02 00 00 FF (hex)
after:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 A0 C9 91 CA BF A5 58 AA 25 84 B8
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 0C 02 01 01 34 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0D 00 04 00 2C 07 6F 01 0C 02 01 01 34 FF (hex)
   
keypad button 5:
pressed:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 1F D1 CD E4 BC 83 2E 90 25 85 05
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 0D 02 00 00 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0C 00 04 00 2C 06 6F 01 0D 02 00 00 FF (hex)
after:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 D4 F3 55 D8 BE 44 84 F1 25 86 45
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 0E 02 01 01 35 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0D 00 04 00 2C 07 6F 01 0E 02 01 01 35 FF (hex)
   
keypad button 6:
pressed:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 D7 DF EB D4 85 E8 68 E0 25 87 B3
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 0F 02 00 00 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0C 00 04 00 2C 06 6F 01 0F 02 00 00 FF (hex)
after:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 5A 1C 07 2A 3C 6A 7C 0D 25 88 22
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 10 02 01 01 36 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0D 00 04 00 2C 07 6F 01 10 02 01 01 36 FF (hex)

keypad button 7:
pressed:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 E2 FE 3E 58 38 5D C6 FA 25 89 4C
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 11 02 00 00 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0C 00 04 00 2C 06 6F 01 11 02 00 00 FF (hex)
after:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 DD BC 7D 06 32 64 28 17 25 8A 1F
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 12 02 01 01 37 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0D 00 04 00 2C 07 6F 01 12 02 01 01 37 FF (hex)

keypad button 8:
pressed:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 44 D5 6C 30 A2 1F 8F 74 25 8B E6
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 13 02 00 00 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0C 00 04 00 2C 06 6F 01 13 02 00 00 FF (hex)
after:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 FC 18 7F 1E 94 2D 1B 9A 25 8C D7
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 14 02 01 01 38 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0D 00 04 00 2C 07 6F 01 14 02 01 01 38 FF (hex)

keypad button 9:
pressed:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 7A 44 76 F9 F0 6C 82 77 25 8D B3
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 15 02 00 00 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0C 00 04 00 2C 06 6F 01 15 02 00 00 FF (hex)
after:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 B6 D1 8F 99 AE 36 3E C0 25 8E 7F
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 16 02 01 01 39 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0D 00 04 00 2C 07 6F 01 16 02 01 01 39 FF (hex)

keypad button X:
pressed:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 86 A0 C6 B7 24 BF 52 E8 25 8F 1F
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 17 02 19 00 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0C 00 04 00 2C 06 6F 01 17 02 19 00 FF (hex)

keypad button 0:
pressed:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 20 62 9C C2 0C D3 68 31 25 90 EC
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 18 02 00 00 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0C 00 04 00 2C 06 6F 01 18 02 00 00 FF (hex)
after:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 6F D8 44 0A 31 0C AF D7 25 91 CB
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 19 02 01 01 30 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0D 00 04 00 2C 07 6F 01 19 02 01 01 30 FF (hex)

keypad button V:
pressed:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 93 BB 92 FF B3 A4 59 BF 25 92 C0
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 1A 02 02 00 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0C 00 04 00 2C 06 6F 01 1A 02 02 00 FF (hex)

keypad button AWAY:
pressed:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 8E 90 A8 99 C0 80 94 F1 25 93 7F
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 1B 02 05 00 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0C 00 04 00 2C 06 6F 01 1B 02 05 00 FF (hex)

keypad button HOME:
pressed:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 F3 E3 50 95 CB F0 06 96 25 94 0C
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 1C 02 06 00 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0C 00 04 00 2C 06 6F 01 1C 02 06 00 FF (hex)

keypad button DISARMED:
pressed:
   Z-Wave Debug                    RCVD nonceFetch: node 044
   Z-Wave Debug                    SENT nonceReport: 01 11 00 13 2C 0A 98 80 22 7A 4F 82 28 A1 DB D1 25 95 65
   Z-Wave Debug                    RCVD encryptedPacket: 00 6F 01 1D 02 03 00 (decrypted)
   Z-Wave Debug                    RCVD requestReply1: 01 0C 00 04 00 2C 06 6F 01 1D 02 03 00 FF (hex)


Cheers

John

Posted on
Wed Feb 13, 2019 9:29 am
CliveS offline
Posts: 770
Joined: Jan 10, 2016
Location: Medomsley, County Durham, UK

Re: Low's Iris shutting down March 31

Dual wrote:
jay (support) wrote:
CliveS wrote:
As the Dome Siren is a rebadged Neo Coolcam Siren then all Matt/Jay need to do is add it to the Neo definition


Open the Device Config dialog and click the Submit Device Info button (if it's present) and fill out the resulting web form. This will get it on our radar to add.


There is a device definition. It shows as a relay module in the device config dialog and therefore the Submit button is not present. Screenshot attached. If I create a new trigger and an action for Device Actions - Light/Appliance Control I can turn the siren on or off but not select a chime instead. Do I need to use Z-Wave Actions - Send Raw Z-Wave Command instead? If so I can likely figure it out using the docs referenced by CliveS above. I just figured if it had a device definition there would be something I could do directly. Alternatively I could use a simple Python script as well. I am learning slowly but surely thanks to all the help.

Cheers

John


When it is supported it should look like picture below but to change volume/chime you will need to run a predefined z-wave action.

Screenshot 2019-02-13 at 10.07.11.jpg
Screenshot 2019-02-13 at 10.07.11.jpg (157.4 KiB) Viewed 4845 times

CliveS

Indigo 2023.2.0 : macOS Ventura 13.6.3 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
----------------------------------------------------------------------------------
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer

Posted on
Wed Feb 13, 2019 10:05 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Low's Iris shutting down March 31

Dual wrote:
jay (support) wrote:
Though, I have to say I'm extremely surprised that you have to do that - every Z-Wave thermostat I know of reports all changes made to it immediately. Polling out status is definitely not something I'd expect would have to happen. But I suppose there might be some out there that don't do that.


You are indeed extremely surprised then. I have tested it:

  • Thermostat was in Off mode for past 18 hours.
  • Executed:
    >>> frontTherm = indigo.devices[1045487200]
    >>> indigo.thermostat.setHvacMode(1045487200, value=indigo.kHvacMode.Cool)
  • Observed on thermostat that mode indeed changed to Cool
  • I waited a minute then executed:
    >>> frontThermSavedMode = frontTherm.hvacMode
    >>> print frontThermSavedMode
    Off
  • Waited a couple of more minutes and got the same result
  • Executed:
    >>> import time
    >>> indigo.device.statusRequest(1045487200)
    >>> time.sleep(1)
    >>> frontTherm = indigo.devices[1045487200]
    >>> frontThermSavedMode = frontTherm.hvacMode
    >>> print frontThermSavedMode
    Cool
Thanks for your help Jay. With the addition of the statusRequest command my script should work.


When you get a device instance in a script, it's a snapshot of the device at the time you got it. Any changes to the device that happen after you get it aren't reflected in your instance copy. So, your thermostat is getting updated on the server, but you are never refreshing your local copy (frontTherm.refreshFromServer()). The Introduction section of the IOM docs is extremely import in that it outlines the fundamentals around using the IOM.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Feb 13, 2019 10:49 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Low's Iris shutting down March 31

Let me help you out a bit more here since you're new to Indigo and clearly trying hard to get this done. I also know that you're eventually going to run up against a problem (enumerations) when you finally get to the point of resetting the thermostat from a saved value.

You need 2 parts: one that saves off the current mode of the thermostat and another that restores that. There are a variety of ways of accomplishing part 1, but really only a script can work for part 2 (since there isn't a direct action to set the mode of a thermostat to the value of a variable).

For the first part, you could just create a trigger such that any time the mode changes, you store the new value in an Indigo variable (using the Insert Device State into Variable action). When you "temporarily" turn it off, you would first need to disable the trigger (thereby preserving the previous value) then when you restore it you would reenable it.

However, I think I'll just take another path and show you how to save the old state into an Indigo Variable in your script instead:

Code: Select all
# Get a local copy of the thermostat instance
frontTherm = indigo.devices[1045487200]
# Save the state into an Indigo variable - note that we're casting it to a string first (it's a Python pseudo-enumeration)
indigo.variables.updateValue(ID_OF_AN_INDIGO_VARIABLE_HERE, value=str(frontTherm.hvacMode))
# Turn the thermostat off - note, I'm passing it the thermostat object since I already have a copy
indigo.thermostat.setHvacMode(frontTherm, value=indigo.kHvacMode.Cool)


This will store the string version of the HVAC Mode Enumeration in the variable whose ID is specified in the updateValue call. A quick note here: Python doesn't actually support enumerations in Python 2.7, so we sorta hack it. This can cause some issues that I won't go into here since we're dealing with it in these scripts).

The next script, which will run sometime later, needs to get the value from the Indigo Variable and set the thermostat's mode accordingly. Note that these are two completely separate scripts, which run at different times, so that's why you have to use an Indigo Variable as persistent storage for the original state value.

Code: Select all
# Get the original state Indigo Variable
previous_state_var = indigo.variable[ID_OF_AN_INDIGO_VARIABLE_HERE]
# Get the value from the variable
previous_state_string = previous_state_var.value
# Set the thermostat into the correct mode. Here's where using our hacked enumeration is a little painful.
if previous_state_string == "Cool":
    indigo.thermostat.setHvacMode(frontTherm, value=indigo.kHvacMode.Cool)
elif previous_state_string == "HeatCool":
    indigo.thermostat.setHvacMode(frontTherm, value=indigo.kHvacMode.HeatCool)
elif previous_state_string == "Heat":
    indigo.thermostat.setHvacMode(frontTherm, value=indigo.kHvacMode.Heat)
elif previous_state_string == "ProgramHeat":
    indigo.thermostat.setHvacMode(frontTherm, value=indigo.kHvacMode.ProgramHeat)
elif previous_state_string == "ProgramHeatCool":
    indigo.thermostat.setHvacMode(frontTherm, value=indigo.kHvacMode.ProgramHeatCool)
elif previous_state_string == "ProgramCool":
    indigo.thermostat.setHvacMode(frontTherm, value=indigo.kHvacMode.ProgramCool)
# Note I didn't set it to "Off" because if it was off and it's already off no need to do anything, and
# if the variable was somehow empty or incorrect, we'll just leave the thermostat as-is.
# For good measure, we'll set the variable value to an empty string
indigo.variables.updateValue(previous_state_var, value="")


I think that pretty much does it. You'll execute the first script when you want to temporarily turn off the HVAC system, then call the second when you're ready to restore it.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Feb 13, 2019 11:43 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Low's Iris shutting down March 31

So, Matt just pointed out something I had forgotten that would make the scripts a little easier. First script is almost identical:

Code: Select all
# Get a local copy of the thermostat instance
frontTherm = indigo.devices[1045487200]
# Save the state into an Indigo variable - note that we're casting it to a string first (it's a Python pseudo-enumeration)
indigo.variables.updateValue(ID_OF_AN_INDIGO_VARIABLE_HERE, value=str(frontTherm.states["hvacOperationMode"]))
# Turn the thermostat off - note, I'm passing it the thermostat object since I already have a copy
indigo.thermostat.setHvacMode(frontTherm, value=indigo.kHvacMode.Cool)



Second script is shorter:

Code: Select all
# Get the original state Indigo Variable
previous_state_var = indigo.variable[ID_OF_AN_INDIGO_VARIABLE_HERE]
# Get the value from the variable
previous_state_string = previous_state_var.value
# Set the thermostat into the correct mode. Here's where using our hacked enumeration is a little painful.
try:
   old_state_val = int(previous_state_string) # attempt to convert the value to a valid integer
   # Note: the next line is necessary because we identified a bug in the enumeration handling
   # code. Trying to set an hvac mode that's not in the correct range should raise an exception, but
   # instead it just sets it to OFF. We'll fix that bug in an upcoming release, but for now we'll
   # just do the testing ourselves.
    if old_state_val in range(7):
       indigo.thermostat.setHvacMode(frontTherm, value=indigo.kHvacMode(int(previous_state_string)))
   else:
      raise # Go down to the except block below
except:
    # the likely issue is that the previous_state_string wasn't a valid int, and we don't want to change anything
    # so we'll just log an error to the event log
    indigo.server.log("Saved HVAC mode invalid: '{}', skipping change".format(previous_state_string))
finally:
    # For good measure, we'll set the variable value to an empty string
    indigo.variables.updateValue(previous_state_var, value="")

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Feb 23, 2019 11:45 am
Dual offline
Posts: 257
Joined: Feb 05, 2019

Re: Low's Iris shutting down March 31

DaveL17 wrote:
So here's one "secret" about Python. Whenever I see something like this where things should obviously be equivalent--but aren't--it's more than likely due to differences in the objects' types.
So in the first example, the result of the statement gives you an Indigo class object. This is not the same as a string, so your first IF is False. Converting the object to a string will make the comparison work as you expect.

Don't sweat that you didn't see this--it's not that intuitive.

Sometimes a beer is just what the doctor ordered. In fact, I'm enjoying a fine SweetWater IPA right now. :D


Awesome help. Thanks. I will not forget that now.

Who is online

Users browsing this forum: No registered users and 7 guests