Announcement
Collapse
No announcement yet.
Nanoleaf Aurora
Collapse
X
-
Anyone interested in writing a plug-in for these? They have their API available now, is that all that is required?
https://nanoleaf.me/en/consumer-led-...eaf-local-api/
Comment
-
Originally posted by ckellyusa View PostAnyone interested in writing a plug-in for these? They have their API available now, is that all that is required?
https://nanoleaf.me/en/consumer-led-...eaf-local-api/
Comment
-
Originally posted by ckellyusa View PostAnyone interested in writing a plug-in for these? They have their API available now, is that all that is required?
https://nanoleaf.me/en/consumer-led-...eaf-local-api/
The API that they publish now seems to be cloudbased only, that is something I stay far away from. But if they support 'standard' Zigbee, I can check if it could be incorporated in my JowiHue plugin in the future.
Wim-- Wim
Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData
1210 devices/features ---- 392 events ----- 40 scripts
Comment
-
Ok,
Checked in more details here: https://nanoleaf.me/en/consumer-led-...pecifications/
All smarter series lights of Nanoleaf are supporting Zigbee HA 1.2 and are controllable with the JowiHue plugin in combination with the Raspbee/Conbee (current beta of the plugin).
Except the Aurora, sadly, which only supports wifi and is thus following the cloud protocol.
To bad for the Aurora. But the good news is that the other smart lights are controllable already.
Wim-- Wim
Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData
1210 devices/features ---- 392 events ----- 40 scripts
Comment
-
Has anyone had a play with the Nanoleaf API?
I can get it to retrieve values (state, effect brightness etc) using the GET syntax but I can't seem to control it with "PUT" commands.
I would be keen to know if anyone else has had a play with this API in HS.
Here's my GET script if anyone is interested:
Sub Main (ByVal Parm As Object)
' &hs.runScript("GetNanoleafStatus.vb",False,True)
Dim WebIp As String = "localnaonleafIPaddress:16021"
Dim Token As String = "enter your token here"
Dim WebAddress As String
Dim Result As String
Dim NanoleafPowerDevice As Integer = 2079
Dim NanoleafTestDevice As Integer = 2082
Dim NanoleafEffectDevice As Integer = 2081
Dim NanoleafBrightnessDevice As Integer =2083
' GET state, result will be something like {"value":true}
WebAddress = "http://" + WebIp + "/api/v1/" + Token + "/state/on"
Result = hs.URLAction(WebAddress, "GET", "", "")
hs.writelog ("Nano Test" , Result + " ")
If Result.Contains("false") Then
hs.SetDeviceValueByRef (NanoleafTestDevice, 0 , True)
Else
hs.SetDeviceValueByRef (NanoleafTestDevice, 100 , True)
End If
' GET brightness , result will be something like {"value":100,"max":100,"min":0}
WebAddress = "http://" + WebIp + "/api/v1/" + Token + "/state/brightness"
Result = hs.URLAction(WebAddress, "GET", "", "")
Result = onlyDigits (Result)
hs.writelog ("Nano Test" , Result + " ")
hs.SetDeviceValueByRef (NanoleafBrightnessDevice, Result , True)
' GET effect
WebAddress = "http://" + WebIp + "/api/v1/" + Token + "/effects/select"
Result = hs.URLAction(WebAddress, "GET", "", "")
Result = Result.replace ("""", "")
hs.writelog ("Nano Test" , Result + " ")
hs.SetDeviceString (NanoleafEffectDevice, Result , True)
End Sub
'Function to retrive value from string
Function onlyDigits(s As String) As Integer
Dim retval As String ' This is the return string. '
Dim i As Integer ' Counter for character position. '
' Initialise return string to empty '
retval = ""
For i = 1 To Len(s)
If Mid(s, i, 1) >= "0" And Mid(s, i, 1) <= "9" Then
retval = retval + Mid(s, i, 1)
Else If Mid(s, i, 1) = "," Then 'end if a comma
Exit For
End If
Next
' Then return the return string. '
onlyDigits = retval
End FunctionLast edited by mminehan; January 11, 2018, 03:30 PM.iCore5 Win 10 Pro x64 SSD
HS3 Pro Edition 3.0.0.435 Windows
BLOccupied:,Device History:,Yamaha:,UltraMon3:,mcsXap:,Restart:,UltraNetatmo3:, UltraM1G3:,Ultra1Wire3:,BLBackup:,Harmony Hub:,DoorBird:,UltraECM3:,Nanoleaf 3P:,UltraRachio3:,Z-Wave:,SDJ-Health:,BLGarbage:,Blue-Iris:,Chromecast:,Pushover 3P:,EasyTrigger:
Comment
-
I got it working.
Turns out that the 'hs.URLaction' has problems with the PUT command. There are several posts about this problem. Here for example:
https://forums.homeseer.com/showthread.php?t=178424
https://forums.homeseer.com/showthread.php?t=180358
The solution is to use a stream writer. Check the posts above on how to do this.iCore5 Win 10 Pro x64 SSD
HS3 Pro Edition 3.0.0.435 Windows
BLOccupied:,Device History:,Yamaha:,UltraMon3:,mcsXap:,Restart:,UltraNetatmo3:, UltraM1G3:,Ultra1Wire3:,BLBackup:,Harmony Hub:,DoorBird:,UltraECM3:,Nanoleaf 3P:,UltraRachio3:,Z-Wave:,SDJ-Health:,BLGarbage:,Blue-Iris:,Chromecast:,Pushover 3P:,EasyTrigger:
Comment
-
If anyone wants to have a look at my script that sets on/off, brightness and effect (uses value/status pairs) the script is attached. I'm not the best coder but it works. VB script.Attached FilesiCore5 Win 10 Pro x64 SSD
HS3 Pro Edition 3.0.0.435 Windows
BLOccupied:,Device History:,Yamaha:,UltraMon3:,mcsXap:,Restart:,UltraNetatmo3:, UltraM1G3:,Ultra1Wire3:,BLBackup:,Harmony Hub:,DoorBird:,UltraECM3:,Nanoleaf 3P:,UltraRachio3:,Z-Wave:,SDJ-Health:,BLGarbage:,Blue-Iris:,Chromecast:,Pushover 3P:,EasyTrigger:
Comment
-
Originally posted by mminehan View PostIf anyone wants to have a look at my script that sets on/off, brightness and effect (uses value/status pairs) the script is attached. I'm not the best coder but it works. VB script.
Can you describe a bit the configuration required. I'm thinking a virtual device and then launching the script when the device changes? How did you configure the device?
Thanks!
Comment
-
Yep...that's exactly what I did.
You have get a token from the nanoleaf first. I did this using CURL which you can download for Windows. Instructions are in the nano leaf API document (register with nanoleaf as a developer to get this).
Once you have the token set up 3 virtual devices (on/of, brightness and effect). When any one of these virtual devices changes HS runs the script. The effect virtual device needs to have value pairs set up with the exact effect names (scenes) from the app.
Of course this is asymmetric in that if you use the nanoleaf iOS or Android app HS does not change the virtual devices.
I'm not at home but if you get stuck I can send some screenshots.
M
Originally posted by theplant View PostHi!
Can you describe a bit the configuration required. I'm thinking a virtual device and then launching the script when the device changes? How did you configure the device?
Thanks!iCore5 Win 10 Pro x64 SSD
HS3 Pro Edition 3.0.0.435 Windows
BLOccupied:,Device History:,Yamaha:,UltraMon3:,mcsXap:,Restart:,UltraNetatmo3:, UltraM1G3:,Ultra1Wire3:,BLBackup:,Harmony Hub:,DoorBird:,UltraECM3:,Nanoleaf 3P:,UltraRachio3:,Z-Wave:,SDJ-Health:,BLGarbage:,Blue-Iris:,Chromecast:,Pushover 3P:,EasyTrigger:
Comment
Comment