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

No state update for StatefulOnOffLight (eliot:OnOffLightEliotComponent) #230

Closed
sherlant opened this issue Aug 14, 2020 · 10 comments
Closed
Labels
bug Something isn't working platform: light

Comments

@sherlant
Copy link

sherlant commented Aug 14, 2020

Describe the bug
hi.
I have test your integration.
I have in my tahoma box a legrand light which is linked from legrand account.
In the tahoma application the state of my light works good. When i turn on the light in my legrand application, the state in the tahoma application refresh and show me on. But in ha, i can't see the state on of my light. The state is always off and i can't change manually the state.

To Reproduce
Steps to reproduce the behavior:

  1. Go to service in developer tools
  2. Launch light.turn_on in the light entity
  3. The light is on
  4. The state of the light is always off

Expected behavior
When I turn on the light, the state of the entity should be "on" and no "off"

Environment (please complete the following information):

  • ha-tahoma version: 2.0.1
  • Home Assistant version: 0.113.3
  • Platform: light

Device: interrupteur legrand celiane with netatmo (with neutral) linked in tahoma application

  • Model: StatefulOnOffLight
  • Type: eliot:OnOffLightEliotComponent

Additional context

{
	"commands": [{
		"commandName": "off",
		"nparams": 0
	}, {
		"commandName": "on",
		"nparams": 0
	}, {
		"commandName": "onWithTimer",
		"nparams": 1
	}, {
		"commandName": "refreshState",
		"nparams": 0
	}, {
		"commandName": "setOnOff",
		"nparams": 1
	}, {
		"commandName": "refreshAllLightStates",
		"nparams": 0
	}],
	"states": [{
		"type": "DataState",
		"qualifiedName": "core:FirmwareRevisionState"
	}, {
		"values": ["off", "on"],
		"type": "DiscreteState",
		"qualifiedName": "core:OnOffState"
	}],
	"dataProperties": [],
	"widgetName": "StatefulOnOffLight",
	"uiClass": "Light",
	"qualifiedName": "eliot:OnOffLightEliotComponent",
	"type": "ACTUATOR"
}
@sherlant sherlant added the bug Something isn't working label Aug 14, 2020
@tetienne tetienne added enhancement New feature or request and removed bug Something isn't working labels Aug 14, 2020
@tetienne tetienne changed the title No state update for my lights Add support for eliot:OnOffLightEliotComponent Aug 14, 2020
@iMicknl
Copy link
Owner

iMicknl commented Aug 14, 2020

Thanks @HaSHi93110! I haven't seen an eliot: device (legrand) before. It looks related to #167, since there is a command available called refreshAllLightStates.

Could you take the following steps:

  1. Open Home Assistant
  2. Turn light on (or off) via tahomalink.com
  3. Does the state change directly in tahomalink.com?
  4. Does the state change in Home Assistant within 2 minutes?

@iMicknl iMicknl changed the title Add support for eliot:OnOffLightEliotComponent No state update for StatefulOnOffLight (eliot:OnOffLightEliotComponent) Aug 14, 2020
@tetienne tetienne added bug Something isn't working and removed enhancement New feature or request labels Aug 14, 2020
@tetienne
Copy link
Collaborator

It would be interesting to dump the tahoma website to see where in their code they use this command. @iMicknl What do you think?

@sherlant
Copy link
Author

When i turn on the light with tahoma app, thé light appear on in 5 6 seconds in the app, and she is also on in ha.
But when i turn on the entity in ha, the buttons return in off position after 2 3 seconds and the state of the light won't change

@sherlant
Copy link
Author

When i change the state to on from off by ha woth the service light.turn_off, the light is immediatly off, she appears off about in 2 3 seconds in the tahoma app and 1 2 minutes in ha

@sherlant
Copy link
Author

After tests, it appears that when i go in tahoma app, thé state off the light is update and ha show the New state. But if i don't go in the app, the state doesn't change

@iMicknl
Copy link
Owner

iMicknl commented Aug 14, 2020

@HaSHi93110 thanks! This is exactly the same as #167. Apparently for some devices, the state is only refreshed when you open the TaHoma app/website or when you execute a command via the TaHoma app/website. We are still figuring this out, so would be great to retrieve a few more details.

The suggestion from @tetienne to make a dump of your tahomalink.com environment would be great. They do a lot of stuff in their website, thus in their JavaScript files. He can provide you with instructions how to make a dump.

@sherlant
Copy link
Author

OK.
How can i give this ?

@tetienne
Copy link
Collaborator

tetienne commented Aug 14, 2020

On the Tahoma website, just type ctrl+s (or cmd+s if on mac). Select a folder and confirm. You can then zip this folder and share it.

@iMicknl
Copy link
Owner

iMicknl commented Sep 1, 2020

@HaSHi93110 could you give https://github.com/iMicknl/ha-tahoma/archive/feature/add_refresh_states_service.zip a try? You can unzip this file and place the tahoma folder in your custom_components folder. Best is to first remove the old one, to make sure you don't have any conflicts.

This will add a new service call named tahoma.refresh_states. Calling this service should trigger an update within 30 seconds (or less, based on your configured update interval). Could you give it a try? We will investigate better solutions in the future in #167.

@iMicknl
Copy link
Owner

iMicknl commented Sep 2, 2020

I will close this issue for now, since we will track this feature in #167. If you subscribe to that issue, you will get notifications of updates and when it is ready :-).

Please give the zip in my post above a try, would be great to know if this service works for you.

@iMicknl iMicknl closed this as completed Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform: light
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants