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

DiyHue sync with Home Assistant is pulling HA Switches too #1042

Open
Hufenbacke opened this issue Sep 4, 2024 · 12 comments
Open

DiyHue sync with Home Assistant is pulling HA Switches too #1042

Hufenbacke opened this issue Sep 4, 2024 · 12 comments

Comments

@Hufenbacke
Copy link

Issue does not already exist?

I have searched and found no existing issue

Select Environment

Install Script

Home Assistant related?

Yes

Description

Hey guys,

I am trying to setup my diyHue. It is integrated in my Home Assistant. I want to have my lights in my Home Assistant/mqtt so I tried the diyHue Home Assistant synchronization feature. And I got it working. But it is working a little bit too well. In addition, to the lights, it will also import Home Assistant switches(Smart plugs or even my virtual wake up on lan Switch for my Synology). Something is not working the way it should be.
The system will throw error code 500 because it will have problems connecting to those switches. I can solve it my manually removing those switches. But I don´t want to do this every time I need to add a new device to diyHue.

Errorlog:

This can be downloaded from the webUI.
DiyHue > Bridge > Brdige Control > Download debug > Log tar
This is also included in Full debug
If diyHue does not start upload from normal log

Steps to reproduce

Add the Home Assistant Addon in diyHue
Press "Scan for lights"

Please enter your operating system details here

If diyHue does not star use "uname -mrs"
Hue-Emulator Version: 2.0.16
Architecture: x64
OS: Homeassistant
Os version: 2024.8.3
Os release: 13.1
Hardware: Mini PC with Proxmox

Upload debug tar

This can be downloaded from the webUI.
DiyHue > Bridge > Brdige Control > Download debug > Full debug
Do not upload from Force config dump, Force config dump contains sensitive information
``
[diyhue.zip](https://github.com/user-attachments/files/16874377/diyhue.zip)


### What DiyHue version(branch) are you using?

master (latest)
@hendriksen-mark
Copy link
Member

Hi, you want the lights from diyhue in HA or do you want the lights from HA in diyhue?

@Hufenbacke
Copy link
Author

Hi, you want the lights from diyhue in HA or do you want the lights from HA in diyhue?

I want the lights from HA in diyhue. Ha->diyhue

@hendriksen-mark
Copy link
Member

If you do this by using HA in the addon page of the webui of diyhue only the lights are added, if you do this with mqtt everything is added, from what I hear from other users is that you can setup mqtt to only expose lights, but i dont have mqtt so i can not help you with that.

@Hufenbacke
Copy link
Author

If you do this by using HA in the addon page of the webui of diyhue only the lights are added, if you do this with mqtt everything is added, from what I hear from other users is that you can setup mqtt to only expose lights, but i dont have mqtt so i can not help you with that.

But I use the HA integration in the addon page of the webui of diyhue. The ZigBee2MQTT config in the addon page of the webui of diyhue is disabled.

@hendriksen-mark
Copy link
Member

Can you send me the config_debug.tar from the webui>diyhue>bridge>bridge control>download debug>full debug.

@Hufenbacke
Copy link
Author

Can you send me the config_debug.tar from the webui>diyhue>bridge>bridge control>download debug>full debug.

config_debug.zip

@Paalap
Copy link
Contributor

Paalap commented Sep 4, 2024

For me it is easier to set "include by default" to false and to define on each entity in ha if this should be included.

Also the integration of switches was added shortly on request ...maybe even by my PR.

@hendriksen-mark
Copy link
Member

hendriksen-mark commented Sep 4, 2024

the switches are added as smart plugs.

'1':
  id_v2: 635da972-d6d2-40bb-a662-3d13016038b3
  name: STOERCHESERVER
  modelid: LOM001
  uniqueid: 00:17:88:01:00:c8:40:26-0b
  function: mixed
  state:
    'on': true
    alert: select
    mode: homeautomation
    reachable: true
  config:
    archetype: plug
    function: functional
    direction: omnidirectional
    startup:
      mode: safety
      configured: true
  protocol: homeassistant_ws
  protocol_cfg:
    entity_id: switch.stoercheserver
    ip: none

the important part is modelid: LOM001 and archetype: plug

i think i can make some changes but we are in the middle of changing some big stuff so this have to wait a bit.
@Paalap in the homeassistant discover code of diyhue there is noting related to switches.

@Hufenbacke
Copy link
Author

For me it is easier to set "include by default" to false and to define on each entity in ha if this should be included.

How do I define those?

@Paalap
Copy link
Contributor

Paalap commented Sep 4, 2024

Here was it
#1018

@Paalap
Copy link
Contributor

Paalap commented Sep 4, 2024

For me it is easier to set "include by default" to false and to define on each entity in ha if this should be included.

How do I define those?

On the ha config page, additionally you need an attribute on entities to be included diyhue: true

edit: it should be diyhue: include

@hendriksen-mark
Copy link
Member

@Paalap that is in the change light the switches are still added as lights/plugs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants