Help needed converting this AppleScript to an action

Posted on
Tue Feb 07, 2023 2:15 am
pxzel offline
Posts: 39
Joined: Jan 19, 2019
Location: Lombard, IL.

Help needed converting this AppleScript to an action

Use to have this AppleScript run and it would have my Insteon outlet to emit a beep 3 times

send Insteon raw cmd1 48 cmd2 5 to address “1A.84.1F”
send Insteon raw cmd1 48 cmd2 5 to address “1A.84.1F”
send Insteon raw cmd1 48 cmd2 5 to address “1A.84.1F”

Recreated three actions each with Insteon send raw cmd to the outlet
CMD 1 byte 0x48
CMD 2 byte 0x05

And it doesn’t emit any beeps. Have I translated it correctly?

Posted on
Tue Feb 07, 2023 7:36 am
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Help needed converting this AppleScript to an action

Untested, but might work....
Code: Select all
dev = indigo.devices[someDevIdHere]
devAddr = dev.address
indigo.insteon.sendRaw (devAddr, [0x30, 0x02], waitUntilAck=True) # 2 is duration of the beep
indigo.insteon.sendRaw (devAddr, [0x30, 0x02], waitUntilAck=True)
indigo.insteon.sendRaw (devAddr, [0x30, 0x02], waitUntilAck=True)


I read somewhere else on the forum that due to an NDA with insteon, some of the stuff they can't disclose. I stole the above from nssheldon https://forums.indigodomo.com/viewtopic.php?t=10226&p=66827

Bill
My Plugin: My People

Posted on
Tue Feb 07, 2023 10:13 am
pxzel offline
Posts: 39
Joined: Jan 19, 2019
Location: Lombard, IL.

Re: Help needed converting this AppleScript to an action

Thanks so much. Works perfectly now.

Yeah, I saw that one thread regarding the command tables and the NDA. Couldn't find any command tables to refer to looking through the forum.

Appreciate your help. I had the beep function work fine for years and after upgrading Indigo last year lost that functionality without Applescript support .

Posted on
Tue Feb 07, 2023 10:27 am
pxzel offline
Posts: 39
Joined: Jan 19, 2019
Location: Lombard, IL.

Re: Help needed converting this AppleScript to an action

Just curious…. Can the volume of the beep be increased any?

Posted on
Tue Feb 07, 2023 11:39 am
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Help needed converting this AppleScript to an action

pxzel wrote:
Just curious…. Can the volume of the beep be increased any?


I'm pretty sure no, which is one of the reasons I never used it... In my experience, the beep was always to quiet and my hearing to crappy to notice it.

...I just found this which might be a simpler way to beep the device without sending a raw command. I've never messed with sending raw commands nor have I ever bothered to beep a device beyond just seeing if it works.

indigo.device.beep(123)
Code: Select all
dev = indigo.devices[someDevIdHere]
devAddr = dev.address
indigo.device.beep(devAddr)
indigo.device.beep(devAddr)
indigo.device.beep(devAddr)


In my previous post, however, the code has duration.... so I guess you could arrange quick and long beeps then brush up on your Morris Code :D
Attachments
morse-code-overview.png
morse-code-overview.png (45.65 KiB) Viewed 1108 times

Bill
My Plugin: My People

Posted on
Tue Feb 07, 2023 12:34 pm
pxzel offline
Posts: 39
Joined: Jan 19, 2019
Location: Lombard, IL.

Re: Help needed converting this AppleScript to an action

Ha ha! Love the Morse code!

Again, thanks for the info. Glad I’m learning something everyday

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests