A PC is a device, right? :)

If this happens just come back and we'll give you some milk and cookies :laughing:

2 Likes

In theory, everything should work now on the HE end.........except: I apparently don't understand virtual button creation.

At the top of the device page, I have command buttons (push, hold, Double tap, etc). There is an input filed below them asking 'type: NUMBER Button number to [command name]'.

I have tried inserting numbers here, and saving. Yet every time I load the device page, the numbers are gone, and pressing the command buttons results in an error message to fill in required fields. Those number fields appear to be the only empty required ones- yet I cannot enter numeric values that will stay when I save.

What am I missing?

Thanks, from a frustrated noob.

Figured out my button issue. I was definitely doing it wrong. I can get the toggle to work with my basic rule in a dashboard, but now the batch file I made with the remote command from my PC doesn't work. (I changed the device ID and command name to match what the Maker API calls for.) Stuck again. Will Work on what's missing.

Here's the command for the scene itself, to turn it on:

curl http://192.x.x.x/apps/api/52/devices/11/on?access_token=xxxxxxxxxxxxxxxx

Works just fine from the batch file. The command for the virtual button corrects the device ID and command, but does nothing:

    curl http://192.x.x.x/apps/api/52/devices/15/push?access_token=xxxxxxxxxxxxxxxx

Selecting the push command on the device page works. The virtual button on my dashboard works. Feels like something is amiss in the command I'm using, but I cannot for the life of me figure it out.

For the Button CURL command, I believe you also need to pass in the button number, in addition to the “push” command.

1 Like

Yes! That's it! My understanding was not correct. I obviously figured Simply the command name would do the trick. Thanks much! Now, to wrap all this in VBS to suppress Powershell.....

2 Likes

Dangit. Got it all working, except the VBS. I've got this in the VBS:

Set objShell = CreateObject("Wscript.shell")
objShell.run "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -File " & Chr(34) & "C:\tmp\test22.sp1" & Chr(34), 0
Set objShell = Nothing

And this in the .SP1:

Invoke-WebRequest -Uri "http://192.x.x.x/apps/api/52/devices/15/push/1?access_token=xxxxx"

Obviously, some pertinent numbers are removed. :slight_smile: I can't see any issues. But you folks know an awful lot more than I do!

OK, don't mind me. Just a bad typist. I may see the problem! Silly old fart here transposed two letters. Fixing that, to see if it works.

Yup. My terrible typing caught up to me. :slight_smile:

All is working now. Thanks very much for everyone's help! I created a headache, and all of you helped it go away! :grinning:

2 Likes

If this works, you must show process. This silly old fart has chased self inflicted for 2-3 day! :laughing: :laughing:

1 Like

Id didn't help that when I worked in TV for two decades, there was an entity with the label SP1. Of course, I typed that instead of PS1.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.