Skip to content

Developers

Lokonli edited this page Dec 17, 2019 · 5 revisions

Information for developers

Information I use during development of the plugin.

Links

https://github.com/ualex73/goslide-api/blob/master/goslideapi/goslideapi.py https://documenter.getpostman.com/view/6223391/S1Lu2pSf?version=latest https://www.domoticz.com/wiki/Developing_a_Python_plugin
Homebridge plugin
Pimatic plugin

Known issues

strptime bug?

There seems to be a python bug in strptime. The following code throws an error when executed the second time:

    self._expiretoken = datetime.strptime(
        expires_at + ' +0000', "%Y-%m-%d %H:%M:%S %z"
    )

I've implemented a workaround, but if someone knows how to fix this then that would be great.

Slide info

For debugging...

    {
    "slides": [
        {
        "id": 2001,
        "device_name": "Woonkamer Links",
        "slide_setup": "middle",
        "curtain_type": "rail",
        "device_id": "slid_246F284361BC",
        "household_id": 602,
        "zone_id": 398,
        "touch_go": false,
        "device_info": {
            "pos": 0.97
        },
        "routines": [
            {
            "action": "set_pos",
            "at": "@random:{\"from\":\"0 0 8 * * *\",\"to\":\"0 30 8 * * *\",\"number\":1}",
            "enable": false,
            "id": "cron:1",
            "payload": {
                "offset": 0,
                "pos": 0
            }
            },
            {
            "action": "set_pos",
            "at": "@random:{\"from\":\"0 0 20 * * *\",\"to\":\"0 30 20 * * *\",\"number\":1}",
            "enable": false,
            "id": "cron:2",
            "payload": {
                "offset": 0,
                "pos": 1
            }
            }
        ]
        }
    ]
    }