Void httpPut(String uri, String body, Closure closure) The closure is passed one HttpResponseDecorator argument from which the response content and header information can be extracted. String uri - The URI to make the HTTP POST call toĮxecutes an HTTP PUT request and passes control to the specified closure. Void httpPostJson(Map params, Closure closure) Parameters: Void httpPostJson(String uri, Map body, Closure closure) Void httpPostJson(String uri, String body, Closure closure) Void httpPost(Map params, Closure closure) Parameters:Ĭlosure closure - The closure that will be called with the response of the request.Įxecutes an HTTP POST request with a JSON-encoded body and content type, and passes control to the specified closure. Void httpPost(String uri, String body, Closure closure) String uri - The URI to make the HTTP GET call toĬlosure - closure - The closure that will be called with the response of the request.Įxecutes an HTTP POST request and passes control to the specified closure. Void httpGet(Map params, Closure closure) Parameters: Void httpGet(String uri, Closure closure) If the response content type is JSON, the response data will automatically be parsed into a data structure. Returns: voidĮxecutes an HTTP DELETE request and passes control to the specified closure. Request body that will be encoded based on the given contentType.Ĭlosure closure - The closure that will be called with the response of the request. Request path that is merged with the URI.įorced response content type and request Accept header.Ĭontent type for the request, if it is different from the expected response content-type. The valid parameters are: ParameterĮither a URI or URL of of the endpoint to make a request from. Map params - A map of parameters for configuring the request. String uri - The URI to make the HTTP DELETE call to. Void httpDelete(Map params, Closure closure) Parameters: Void httpDelete(String uri, Closure closure) I have tried using the IP address, as well as “localhost” where called for.Executes an HTTP DELETE request and passes control to the specified closure. HA and MQTT and the broker are all running on the same server. All my configs seem to be correct, but it’s just not working. I also have HA setup to show my power usage and inside temp, but they are blank even though I can see the messages in the MQTT log coming over from smartthings. I see messages coming over from smartthings in the MQTT log, but when I click on my Hall Light in HA, nothing happens. The bridge is connected to MQTT and it APPEARS that HA is connected to MQTT, although I am not 100% sure of that. So I am still having issues getting this setup and running. Preface: smartthings Port number to listen on # Preface for the topics $PREFACE/$DEVICE_NAME/$PROPERTY # Specify your MQTT Broker’s hostname or IP address here State_topic: “smartthings/Front Door Lock/lock”Ĭommand_topic: “smartthings/Front Door Lock/lock” Here is an excerpt from my configuration.yaml: Once you can see the events coming in the name of your devices and their options will be printed in clear text on the log, which makes configuring the configuration.yaml much easier. With PM2 you jsut run pm2 logs smartthings-mqtt-bridge. Every event will be visible if you tail the logs. I would first try and get topics populating on the Node.js app and work from there. You Node.js/Docker app needs to point to your Mosquitto broker. Your MQTT Bridge device on your ST needs to point to the ip/MAC/Port of the Node.js/Docker app. Your HA configuration.yaml needs to point to the IP/Port of your Mosquitto broker. My Mosquitto Broker is on my OpenWRT router and I used nvm/pm2 for the Node.js bridge app. I just spent the last couple of days getting mine set up with Mosquitto with no previous MQTT experience.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |