philklei / tahoma-api

API for Tahoma
Apache License 2.0
30 stars 13 forks source link

available commands #13

Open ivandompe opened 5 years ago

ivandompe commented 5 years ago

Hi, nice api! I'd like to use it to integrate actions from Domoticz.

I've 4x RollerShutter (SSL) and 4x Motors for centre-pivot roof window (KSX 100) from Velux. All 8 devices are parametrized on my Somfy account and are weel working from the connexoon Window app.

Now with this api, I can send http command and actually I was able to make it work with the shutter only sending:

http://server:5000/execute/nameOfDevice/up (or down)

1) I didn't found how to send a positon, like setPosition=50 2) I was not able to make it works with my KSX... I try command open, close, up, down...

Any help would be very appreciated. Best Regards, Ivan

ivandompe commented 5 years ago

Sorry... I found why others commands didn't work. I updated my server with othes commands, now I can open/close/stop also the KSX. That's great! Unfortunately I try also to set position but I had not success.

Any hint would be appreciated.

@app.route('/execute///', methods=['GET']) def execute(label, command, val): if command not in ['up', 'my', 'down', 'open', 'close', 'setPosition', 'stop', 'setSecuredPosition']: return jsonify(success=False, message='Command not found')

data = {
    "commands": [
        {
            "name": command,
            #"parameters": [
            #{
             #   "name": command,
              #  "value": val
            #}
            #]

        }
    ]
}