Help Using Rest Api or MQTT with Eventghost/Python

http://docs.openhab.org/addons/bindings/mqtt1/readme.html

Some example Python code I use:

I know nothing about eventghost but if it can receive MQTT messages it stands to reason that it can publish them as well.

That isn’t a correct openHAB 2 REST call. I recommend installing the REST API Docs (under the Misc tab in PaperUI) and experiment there with the calls. For one it needs to be a POST (sendCommand) or a PUT (postUpdate), not a GET. Secondly, the URL would be something like: “https://10.10.1.52:8080/rest/items/MyItemName” with a body of “ON” to send the command ON to MyItemName.

To check the state of an Item use a HTTP GET with the same URL with /state (https://10.10.1.52:8080/rest/items/MyItemName/state). The body of the response will be the Item’s current state.

The REST API is very powerful but a lot of people end up setting up and using MQTT because it has become a lingua franca for home automation systems to talk to each other. If you aren’t using it yet, you probably will eventually.