Somfy-Developer / Somfy-TaHoma-Developer-Mode

A collection of requests to use a local API with Somfy TaHoma gateways
147 stars 12 forks source link

How to control Case sensative taste #74

Closed MadPatrick closed 1 year ago

MadPatrick commented 2 years ago

How can you activate the Case Sensative taste of the Tahomo box. You can find a device called POD0, but which command do you need to send to activate this in a Python script

MadPatrick commented 2 years ago

A addition to above. We are developing a plugin for Domoticz at https://github.com/MadPatrick/somfy A device has popped up as we think it is the "Taste sensative button" This should be the the butoon when the press the front of your Tahoma box. This button can be programmed in the Somfy menu as a sort for scene. The only think you need to to is to toucht the front to activate screen scene.

2022-11-12 08:59:18,993 - DEBUG    - plugin.py          - onCommand: DeviceId: 'internal://xxxx-xxxx-xxxx/pod/0' Unit: '1', Command: 'On', Level: '0', Hue: ''
2022-11-12 08:59:18,993 - DEBUG    - plugin.py          - preparing command: # commands: 1
2022-11-12 08:59:18,993 - DEBUG    - plugin.py          - preparing command: # actions_serialized: 1
2022-11-12 08:59:18,994 - DEBUG    - plugin.py          - preparing command: json data: {'label': 'Domoticz - Aanraakgevoelige knop - activateCalendar', 'actions': [{'deviceURL': 'internal://xxxx-xxxx-xxxx/pod/0', 'commands': [{'name': 'activateCalendar'}]}]}
2022-11-12 08:59:18,994 - DEBUG    - tahoma_local.py    - checking logged in status: self.__logged_in = True and self.__expiry_date >= datetime.datetime.now() = True
2022-11-12 08:59:18,994 - INFO     - tahoma_local.py    - Sending command to local api
2022-11-12 08:59:18,994 - DEBUG    - tahoma_local.py    - onCommand: data '{'label': 'Domoticz - Aanraakgevoelige knop - activateCalendar', 'actions': [{'deviceURL': 'internal://xxxx-xxxx-xxxx/pod/0', 'commands': [{'name': 'activateCalendar'}]}]}'
2022-11-12 08:59:18,996 - DEBUG    - connectionpool.py  - Starting new HTTPS connection (1): xxxx-xxxx-xxxx.local:8443
2022-11-12 08:59:19,196 - DEBUG    - connectionpool.py  - https://xxxx-xxxx-xxxx.local:8443 "POST /enduser-mobile-web/1/enduserAPI/exec/apply HTTP/1.1" 200 49
2022-11-12 08:59:19,199 - DEBUG    - tahoma_local.py    - command response: status '200' response body: '{'execId': '5d2ea471-923f-4b56-ad5f-9b4a418ff7ba'}'
2022-11-12 08:59:19,199 - DEBUG    - tahoma_local.py    - succeeded to post command: {'execId': '5d2ea471-923f-4b56-ad5f-9b4a418ff7ba'}
2022-11-12 08:59:19,199 - DEBUG    - tahoma_local.py    - start get events
2022-11-12 08:59:19,199 - DEBUG    - listener.py        - listener vald: self.__listener_expiry = 2022-11-12 09:29:01 self.__valid = True
2022-11-12 08:59:19,201 - DEBUG    - connectionpool.py  - Starting new HTTPS connection (1): xxxx-xxxx-xxxx.local:8443
2022-11-12 08:59:19,550 - DEBUG    - connectionpool.py  - https://xxxx-xxxx-xxxx.local:8443 "POST /enduser-mobile-web/1/enduserAPI/events/1ff8247b-e5d3-4f37-96b6-3a858552bb68/fetch HTTP/1.1" 200 527
2022-11-12 08:59:19,554 - DEBUG    - tahoma_local.py    - get events response: status '200' response body: '<Response [200]>'
2022-11-12 08:59:19,554 - DEBUG    - tahoma_local.py    - succeeded to get local API events: [{'name': 'ExecutionRegisteredEvent', 'execId': '5d2ea471-923f-4b56-ad5f-9b4a418ff7ba', 'actions': [{'command': 'activateCalendar', 'execId': '0d6d0bc5-4da2-4a1f-b3d1-b8f4462c7ed1', 'state': 'INITIALIZED', 'deviceURL': 'internal://xxxx-xxxx-xxxx/pod/0', 'rank': 0}]}, {'name': 'ExecutionStateChangedEvent', 'oldState': 'INITIALIZED', 'execId': '5d2ea471-923f-4b56-ad5f-9b4a418ff7ba', 'newState': 'IN_PROGRESS'}, {'name': 'ExecutionStateChangedEvent', 'oldState': 'IN_PROGRESS', 'execId': '5d2ea471-923f-4b56-ad5f-9b4a418ff7ba', 'newState': 'COMPLETED'}]
2022-11-12 08:59:19,555 - DEBUG    - tahoma_local.py    - get_events: no DeviceStateChangedEvent found in response: [{'name': 'ExecutionRegisteredEvent', 'execId': '5d2ea471-923f-4b56-ad5f-9b4a418ff7ba', 'actions': [{'command': 'activateCalendar', 'execId': '0d6d0bc5-4da2-4a1f-b3d1-b8f4462c7ed1', 'state': 'INITIALIZED', 'deviceURL': 'internal://xxxx-xxxx-xxxx/pod/0', 'rank': 0}]}, {'name': 'ExecutionStateChangedEvent', 'oldState': 'INITIALIZED', 'execId': '5d2ea471-923f-4b56-ad5f-9b4a418ff7ba', 'newState': 'IN_PROGRESS'}, {'name': 'ExecutionStateChangedEvent', 'oldState': 'IN_PROGRESS', 'execId': '5d2ea471-923f-4b56-ad5f-9b4a418ff7ba', 'newState': 'COMPLETED'}]
2022-11-12 08:59:21,067 - DEBUG    - plugin.py          - Poll unit

We are looking which command is needed to activate this button

JanJaapKo commented 2 years ago

The setup/devices endpoint returns the below list of possible commands for the device with "uiClass": "Pod". The question is: which command can we use to trigger the behavior this is set up when using the physical button?

            "commands": [
                {
                    "commandName": "deactivateCalendar",
                    "nparams": 0
                },
                {
                    "commandName": "refreshPodMode",
                    "nparams": 0
                },
                {
                    "commandName": "getName",
                    "nparams": 0
                },
                {
                    "commandName": "setPodLedOff",
                    "nparams": 0
                },
                {
                    "nparams": 1,
                    "commandName": "setCalendar",
                    "paramsSig": "p1"
                },
                {
                    "commandName": "update",
                    "nparams": 0
                },
                {
                    "commandName": "setPodLedOn",
                    "nparams": 0
                },
                {
                    "commandName": "refreshBatteryStatus",
                    "nparams": 0
                },
                {
                    "nparams": 1,
                    "commandName": "setLightingLedPodMode",
                    "paramsSig": "p1"
                },
                {
                    "commandName": "activateCalendar",
                    "nparams": 0
                },
                {
                    "commandName": "refreshUpdateStatus",
                    "nparams": 0
                },
                {
                    "nparams": 1,
                    "commandName": "setCountryCode",
                    "paramsSig": "p1"
                }
            ]
BuBuaBu commented 2 years ago

You cannot simulate a press on the touch button.

When the touch button is pressed (physically) The state core:CyclicButtonState will be updated on the pod/0 device.

You will thus be able to get an event if have registered an event listener.

MadPatrick commented 2 years ago

Thanks for tour reply. Unfortunately the button is not controlable from Domoticz. Would be a nice feature