OK .. I think I just needed play with it more actually![]()
You can more simply just toggle a scene based on an API direct though right? .. rather that via a Virtual API object?
To be more specific than a random example ... one use-case I'm looking to control here is that in my office, I have 2 desks - 1 for each of myself and my wife. Each desk has external monitors that consume enough power that I don't leave them powered on full time, plus some aesthetic LED lighting on each desk. So, what I want is to vary the room activity based on "who" is at home during working-day hours.
If someone enters the office - I want each 'desk' to only power on only based on whether each individual is at home and clearly still obey the lights being controlled by room occupancy.
So with this, I suppose 1 GL Object Output could set each light / 'PC monitor' object to be active when that person is "home", and another GL Inactive when they leave the house, however, why wouldn't I just set the light / 'PC Monitor' active and inactive via the API that would otherwise have set the API Variable, direct, cutting out the middle man (the GL object)?
That said, I have just looked at what you said and (contrary to what I "think" you describe, maybe I'm mis-interpreting what you mean), I do appear to be able to control a light object using the Virtual API Variable state directly ... I've connected a test light object so that the "Turn On" connection = "Virtual API Object On True" and the the "Turn Off" connection = "Virtual API Object On False" ... with this, changing the state of the Virtual API object turns the light on/off depending the API value being True/False ..
Likewise I setup an 'Analogue (Real)' Virtual API variable, and I've connected the "Brightness (Dimmer Control)" connection of a Dimmer object to be "Virtual API Variable-Out Value" and with this, whatever value 0-100 I set the Virtual API variable to be, sets the brightness of the dimmer.
So .. I think this gives me scope to do what I need ... will certainly have more time to tinker over Xmas once tomorrow is out of the way
Ahh! Brilliant! Well done! ... these things are usually something simple enough, but without someone explicitly stating this is a mandatory "option" in a curl, ya wouldn't have known to find it without experimentation like this ..![]()
Not that I've spent ages on it, but for the life of me I can't get curl working in PowerShell in Windows .. even for a basic GET I just get this in Powershell;
PS C:\Users\me> curl -X GET http://192.111.1.111:1111/api/v1/Objects/522 -H 'Authorization: Basic Y2xpZmZhcGk6Q2wxZmABbbse'
Invoke-WebRequest : Cannot bind parameter 'Headers'. Cannot convert the "Authorization: Basic
Y2xpZmZhcGk6Q2wxZmABbbse" value of type "System.String" to type "System.Collections.IDictionary".
At line:1 char:61
+ ... api/v1/Objects/522 -H 'Authorization: Basic Y2xpZmZhcGk6Q2wxZmABbbse'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (: ) [Invoke-WebRequest], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShel l.Commands.InvokeWebRequestCommand