Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose auto/manual switch of Somfy remote (io) #794

Closed
1 task done
neuhausf opened this issue Apr 1, 2022 · 12 comments
Closed
1 task done

Expose auto/manual switch of Somfy remote (io) #794

neuhausf opened this issue Apr 1, 2022 · 12 comments
Labels
enhancement New feature or request

Comments

@neuhausf
Copy link

neuhausf commented Apr 1, 2022

Did you read the instructions?

The request

I’m trying to use the little A/M switch on the somfy remote as a sensor in my automations. But I can’t figure how (or if) the switch is represented by this integration.
image
See also https://community.home-assistant.io/t/overkiz-api-and-somfy-api/61448/1769?u=neuhausf

Which gateway / hub do you use?

Somfy TaHoma V2, Firmware: 2021.6.4

Device model (optional)

PositionableExteriorVenetianBlind (or probably TaHoma Short Channel)

Device type (optional)

io:ExteriorVenetianBlindIOComponent

Additional information

diagnostics of TaHoma V2 from HA
config_entry-overkiz-91796d4b3b8434e80fa9ccd21a2481e9-tahoma.json.txt

@neuhausf neuhausf added the enhancement New feature or request label Apr 1, 2022
@iMicknl
Copy link
Owner

iMicknl commented Apr 1, 2022

@neuhausf can you change the value of your remote and generate your diagnostics again? It would be good to have a diff to easily spot what changed.

There is a RemoteController present in your config, thus perhaps this is the right one. The limitation will be that it takes up to 30 seconds until your update is in anyway, thus real-time scenarios are not interesting.

  {
  	"creationTime": 1620383790000,
  	"lastUpdateTime": 1620383790000,
  	"label": "**",
  	"deviceURL": "rtds://****-****-1997/176943",
  	"shortcut": false,
  	"controllableName": "rtds:RTDSRemoteControllerComponent",
  	"definition": {
  		"commands": [],
  		"states": [{
  				"type": "ContinuousState",
  				"qualifiedName": "rtds:ControllerBatteryState"
  			},
  			{
  				"type": "ContinuousState",
  				"qualifiedName": "rtds:ControllerBipState"
  			},
  			{
  				"type": "ContinuousState",
  				"qualifiedName": "rtds:ControllerOrderTypeState"
  			},
  			{
  				"type": "ContinuousState",
  				"qualifiedName": "rtds:ControllerOriginatorState"
  			},
  			{
  				"type": "ContinuousState",
  				"qualifiedName": "rtds:ControllerSensingState"
  			},
  			{
  				"type": "ContinuousState",
  				"qualifiedName": "rtds:ControllerSirenState"
  			}
  		],
  		"dataProperties": [],
  		"widgetName": "AlarmRemoteController",
  		"uiProfiles": [
  			"Specific"
  		],
  		"uiClass": "RemoteController",
  		"qualifiedName": "rtds:RTDSRemoteControllerComponent",
  		"type": "REMOTE_CONTROLLER"
  	},
  	"states": [{
  			"name": "rtds:ControllerOriginatorState",
  			"type": 1,
  			"value": 2
  		},
  		{
  			"name": "rtds:ControllerSensingState",
  			"type": 3,
  			"value": "KO"
  		},
  		{
  			"name": "rtds:ControllerBatteryState",
  			"type": 3,
  			"value": "OK"
  		},
  		{
  			"name": "rtds:ControllerOrderTypeState",
  			"type": 3,
  			"value": "onZ2"
  		}
  	],
  	"available": true,
  	"enabled": true,
  	"placeOID": "ebd524eb-5f73-435c-bb7c-60ed8cf2ed9b",
  	"widget": "AlarmRemoteController",
  	"type": 4,
  	"oid": "437d55db-6467-41c1-9292-2d6108cb8abb",
  	"uiClass": "RemoteController"
  }

@neuhausf
Copy link
Author

neuhausf commented Apr 1, 2022

(2): remote on "auto"
-> switch auto to manual
(3): remote on "manual"
config_entry-overkiz-91796d4b3b8434e80fa9ccd21a2481e9.json (2).txt
config_entry-overkiz-91796d4b3b8434e80fa9ccd21a2481e9.json (3).txt

I don't see any difference... All registered blinds on the remote move a little bit (same as identify). Not only the blind on the selected channel.

@neuhausf
Copy link
Author

neuhausf commented Apr 1, 2022

@iMicknl as for the remote I guess it's the basic TaHoma Remote, which came with the box:
https://elektro-zollinger.ch/Shop/Somfy/RF-Handsender-Somfy-TaHoma-Serenity-2-RTS-ws-gu-204012039?sort=rating&order=ASC&page=9
I'm interested in the state of the Somfy Situo 5 Variation A/M remote:
https://www.somfy.ch/de-ch/produkte/1811636/situo-5-variation-a-m-io-pure-ii
Shouldn't the remote store the auto/manual state on the blind or on the box?

@iMicknl
Copy link
Owner

iMicknl commented Apr 1, 2022

What does the remote do? But it doesn't seem like this is exposed unfortunately. If you cannot see it on tahomalink.com or in the official app, it is probably not available.

@neuhausf
Copy link
Author

neuhausf commented Apr 1, 2022

The Situo remote closes/opens the blind. It has 5 channels to control 5 blinds.
The auto/manual switch is to enable/disable automations running on the TaHoma box. The switch state is reflected in Tahomalink:
image
So it should be retrievable by the API I guess?

@neuhausfhacs
Copy link

I guess I found it. It's the priority lock originator sensor, which is disabled by default.
image
image
"Benutzer" (user) means in this case, that the manual control is activated. "Unbekannt" means it's on "auto".

Only issue: The value doesn't update itself. Only if I open the TaHoma App on the phone or refresh Tahomalink. @iMicknl can you poll this sensor from time to time? Or expose a service to do so. I don't need "realtime" data - every 5 to 10 minutes would be enough.

@iMicknl
Copy link
Owner

iMicknl commented Apr 1, 2022

@neuhausf we won't fix this on short term. We already poll every 30 seconds for updates on the event listener, but apparently this state is not broadcasted. Opening the TaHoma app (or tahomalink.com) will call an endpoint to refresh all states, which we should not call every 5 minutes.

We looked into this in the past: #271, however we couldn't settle yet on a good decision. Somfy's infrastructure is just not built for this...

@neuhausfhacs
Copy link

@iMicknl I see. It's a pitty that I can't use this switch without polling.
Probably you can reconsider #271 in a different approach: Expose a service which refreshes the state of (one) device. Implement some rate limiting: Only x requests per hour/day. Something like HACS does with the github API.

In my case I just need about three updates a day: Auto opening/closing blinds in the morning/during the day/evening. So the update will occur before making a decision in terms of automation (in my case with AppDaemon, hass-blinds).

@tetienne
Copy link
Collaborator

tetienne commented Apr 2, 2022

@neuhausf Within the Tahoma website, when you switch the mode, do you see an instant update of UI? If yes it means there is an event we don't read.

@neuhausf
Copy link
Author

neuhausf commented Apr 3, 2022

@tetienne No and yes...

  1. I open tahomalink.com, navigate to "product" view
  2. Change auto to manual on the remote
  3. Wait... even after 3mins the state is not reflected in tahomalink
  4. Open Tahoma Classic on iPhone
  5. Do nothing but wait a few seconds
  6. On the web interface tahomalink.com, the state is now updated. The same is true for the home-assistant sensor.

The following happens in the web interface after opening the iPhone app:
image
image
image
image

@tetienne
Copy link
Collaborator

tetienne commented Apr 4, 2022

Thx for clear debug session :) So indeed even Somfy cannot trigger a live update within calling this RefreshAllDevicesStatesCompletedEvent.

@neuhausf
Copy link
Author

neuhausf commented Apr 8, 2022

@tetienne
Just another detail: I activated manual mode on 20:30 -> state was not reflected in HA until 7:00 the next day. At this time, a Somfy automation ran. So I guess that the Tahoma box must refresh all device states before running an automation.

Hopefully we can refresh the states more often with #796
So I'm closing this for now, so we (meaning you 😜 ) can all focus on implementing the local API (which will be awesome 😉 )!

@neuhausf neuhausf closed this as completed Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants