You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7-1
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## Unreleased
9
9
10
+
## [0.2-beta] - 2024-06-26
11
+
12
+
### Breaking changes
13
+
- This integration now uses a configuration file to store the setup state and advanced settings (see below). Existing users therefore need to run the integration setup again to create this file. Just open the integration settings and click on "Start integration setup". You don't need to enter the advanced settings.
14
+
10
15
### Added
11
16
12
17
- Added a more granular http status code response handling
13
18
- Added optional parameter to send form data in the request body as key/value pairs (see README)
19
+
- Added optional custom global entity-independent timeout and ssl verify option in the integration setup. For self signed ssl certificates to work the ssl verify option needs to be deactivated.
14
20
15
21
### Changed
16
22
- Only return an error response to the remote if the http response code is in the 400 or 500 range. Otherwise display the status code in the integration log if it's not 200/Ok
Copy file name to clipboardExpand all lines: README.md
+11-8
Original file line number
Diff line number
Diff line change
@@ -1,43 +1,46 @@
1
-
# HTTP Get/Post/Put/Patch & Wake on LAN Integration for Unfolded Circle Remote Two
1
+
# HTTP Get/Post/Put/Patch & Wake on LAN Integration for Unfolded Circle Remote Two and Remote 3
2
2
3
3
## ⚠️ WARNING ⚠️
4
4
5
5
### Disclaimer: This software is at an early stage of development and may contain serious bugs that could affect system stability. Please use it at your own risk!
6
6
7
7
##
8
8
9
-
Integration for [Unfolded Circle Remote Two](https://unfoldedcircle.com) to send network requests to a specified url or mac address.
9
+
Integration for Unfolded Circle [Remote Two](https://www.unfoldedcircle.com/remote-two) and [Remote 3](https://www.unfoldedcircle.com) running [Unfolded OS](https://www.unfoldedcircle.com/unfolded-os) to send network requests to a specified url or mac address.
10
10
11
11
Using [uc-integration-api](https://github.com/aitatoi/integration-python-library), [requests](https://github.com/psf/requests) and [pywakeonlan](https://github.com/remcohaszing/pywakeonlan).
12
12
13
13
14
14
### Supported features
15
15
16
16
- Send http(s) get, post, patch & put requests to a specified url
17
+
- Set a custom timeout and deactivate ssl certificate verification
17
18
- Send Wake on LAN magic packets to a specified mac address
18
19
19
20
20
21
### Planned features
21
22
22
23
- Send Wake on LAN magic packets by entering the ip address
23
24
- Support for sending json and xml data in request body
24
-
- Configurable timeout in integration setup
25
-
- Support for self signed SSL certificates / deactivate SSL verification in integration setup
26
25
27
26
*Planned improvements are labeled with #TODO in the code*
28
27
29
28
29
+
## Configuration
30
+
31
+
During the integration setup you can change the default http request timeout of 2 seconds to a custom value. You also can deactivate the ssl certificate verification. This is needed for self signed certificates. You can run the setup process again in the integration settings after adding entities to the remote.
32
+
30
33
## Usage
31
34
32
-
The integration exposes a media player entity for each supported request command. These entities only support the source feature. Just enter the desired url (including http(s)://) or mac address in the source field when you configure your activity/macro sequences or activity ui. The default timeout is 2 seconds.
35
+
The integration exposes a media player entity for each supported request command. These entities only support the source feature. Just enter the desired url (including http(s)://) or mac address in the source field when you configure your activity/macro sequences or activity ui.
33
36
<br>
34
-
For http requests your server needs to respond with a 200 OKor any other informational or redirection http status codes (100s, 200s or 300s). In case of a client or server error (400s or 500s) the command will fail on the remote and the error and status code will be shown in the log of the integration.
37
+
For http requests your server needs to respond with a *200 OK* status or any other informational or redirection http status codes (100s, 200s or 300s). In case of a client or server error (400s or 500s) the command will fail on the remote and the error message and status code will be shown in the integration log.
35
38
<br>
36
39
<br>
37
-
Optional form data in the request body as key/value pairs can be added with a paragraph as a separator like this:
40
+
Optional form data in the request body as key/value pairs can be added with a paragraph character (§) as a separator like this:
38
41
-https://httpbin.org/post§key1=value1,key2=value2
39
42
40
-
Note that if your url contains a paragraph you need to url-encode it first (%C2%A7, see https://www.urlencoder.io)
43
+
Note that if your url contains a paragraph character you need to url-encode it first (%C2%A7, see https://www.urlencoder.io)
_LOG.info("Loaded requests timeout of "+str(configfile["rq_timeout"]) +" seconds into runtime storage from "+CFG_FILENAME)
109
+
else:
110
+
_LOG.info("Skip loading custom requests timeout as it has not been changed during setup. Default value of "+str(setup.get("rq_timeout")) +" seconds will be used")
_LOG.info("Loaded http ssl verification: "+str(configfile["rq_ssl_verify"]) +" into runtime storage from "+CFG_FILENAME)
115
+
else:
116
+
_LOG.info("Skip loading http ssl verification flag as it has not been changed during setup. Default value "+str(setup.get("rq_ssl_verify")) +" will be used")
117
+
38
118
else:
39
-
raiseNameError("Name not accepted in set() method")
119
+
_LOG.info(CFG_FILENAME+" does not exist (yet). Please start the setup process")
#TODO Find out how to prevent the remote from constantly reconnecting when the integration is not running without deleting the integration configuration on the remote every time
0 commit comments