I solved it. Correct syntax for url is.
http://222.100.17.222::8080/rest/items/102/actions/On/invoke
Search found 6 matches
Re: Rest Api?
I realized that I probably should use action/invoke. But it gives me error 404.Problem with url?
url = "http://222.100.10.222:2222/rest/items/106/action/invoke"
body = "off"
response = requests.put(url, data=body, headers=headers)
print (response) # Result 404
url = "http://222.100.10.222:2222/rest/items/106/action/invoke"
body = "off"
response = requests.put(url, data=body, headers=headers)
print (response) # Result 404
Rest Api?
I amt trying to learn how to use the rest API. I can not change a value of an attribute (I want to turn off and on lamps). Can some one please help me? My example in python, If I change the name of "C2 Sovrumslampa" then it is changed. But I can not change value of attribute State. import ...
- Thu Feb 08, 2018 7:44 pm
- Forum: Software
- Topic: Daylitetimer over midnight? Not working
- Replies: 2
- Views: 18293
Re: Daylitetimer over midnight? Not working
Thanks, I wil try with a SunTimer.
- Sun Feb 04, 2018 5:36 pm
- Forum: Software
- Topic: Daylitetimer over midnight? Not working
- Replies: 2
- Views: 18293
Daylitetimer over midnight? Not working
I dont know I have found a bug or if I missunderstand the syntax. I want to have the light connected to Daylitetimer on over midnight. Can somebody please help me? This syntax works fine and I can enable the timer: -[06:30],[23:00]- But If I want to use sunrise and sunset and change to this it is no...
- Mon Jan 01, 2018 5:53 pm
- Forum: Software
- Topic: Password protected?
- Replies: 8
- Views: 26189
Re: Password protected?
Can I use another port than 80? I have an public web page on another raspberry pi so I would like to use 85 (or something) to do port forward to the RPI with NetHomeServer. Can I still use the script above to add password protection or do I need to do some modifications?