Innogy smarthome integration by httprequest

Hello everyone,

I started using home assistant today and already made a lot of progress.
My local smarthome hub is by a company called Innogy (https://www.innogy.com/web/cms/de/3753870/home/ui/).
The system provides a http-request module that allows me to make requests when “things” change on the hub side. Unfortunately the module only allows to make GET and POST request with query parameters but no payload (neither JSON nor anything else). So I cannot use the default json api.

The innogy system also does not provide a “easy” method to poll the values. (the API is not publicly available)

Is it possible to set entity states by query / url parameters e.g.: http://homeio.local/api/states/binary_sensor.testsensor?api_password=XXXX&state=on
(this returns rightfully invalid JSON specified…)

Currently I am using a workaround by using IFTTT as a man in the middle…
INNOGY HUB – send request?params -> IFTTT – send api request json(params) -> home assistant
It works - yay! but is also slow … I would prefer a more direct approach.

Thank you for any advice.

Best regards
noheton

First of all I made a mistake:
The post requests of the http-requests module put the parameters in the post parameters.
Still I have a new workaround. I modified /homeassistant/components/api.py:

Probably doing it like this is a bad idea for a number of reasons - but it works, for now:

def post(self, request, entity_id):
    """Update state of entity."""
    hass = request.app['hass']
    try:
        data = yield from request.json()
    except ValueError:
        try: #added
          _LOGGER.error("ValueError in json, falling back to post data") #added debug output
          data = yield from request.post()  #added get parameters from post parameters
        except ValueError:
            return self.json_message('Invalid JSON specified', HTTP_BAD_REQUEST) #not handled
    new_state = data.get('state')

Now I am looking for a way to host home-asssistant on https and normal (perferably only internally) http at the same time, as the http-request module of innogy cant deal with https… grrr

Hi,
did your efforts conclude? Is anybody using the Innogy in his setup? It seems to be quite popular in Germany, thought I have the feeling, it’s rather closed source.
Best

Sorry for the late reply.
My previous efforts failed.
But I havent given up and came up with a binding:

Regarding the platform - I know there is an open API but innogy seems rather reluctant to share it.

Best
noheton

Hi @noheton,

is there any progress on this?

Chers,
Mary

I’m interessted too! Any news here?