Hello
I try to command my philips Hue lights
To comminucate with them I need the PUT command
How can I do this!
I have
What do i worng
De put data wgat i try to sent is : {"on":true}
and the link is : http://192.168.1.5/api/newdeveloper/lights/2/state
How can I fix sthis
I try to command my philips Hue lights
To comminucate with them I need the PUT command
How can I do this!
I have
B4X:
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
Dim aan As String
Dim lampstatus As String = "true"
aan = "{""on"": " & lampstatus & "}"
If Job.Success = True Then
ToastMessageShow(Job.GetString,True)
Job.PostString("http://192.168.1.5/api/newdeveloper/lights/2/state", aan )
Else
Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub
Sub Button1_Click
job1.Initialize("Job1", Me)
job1.Download("http://192.168.1.5/api/newdeveloper/lights/2/state")
'job1.Download("http://192.168.1.5/api/newdeveloper/lights/1")
End Sub
What do i worng
De put data wgat i try to sent is : {"on":true}
and the link is : http://192.168.1.5/api/newdeveloper/lights/2/state
How can I fix sthis