Olen / homeassistant-plant

Alternative Plant component of home assistant
349 stars 23 forks source link

not syncing plant #35

Closed warlordattack closed 2 years ago

warlordattack commented 2 years ago

hello i have 3 mi flower plants

Xiaomi BLE gives data for all 3 plants, but plant monitor do not give data for one of them : pl-rosa-marie (this plant is on the balcony far from bluetooth reciever, but it gives data sometimes in Xiaomi BLE, but never in Plant Monitor)

how can i debug this please ?

Xiaomi BLE : OK

type: vertical-stack
cards:
  - type: entities
    entities:
      - entity: sensor.fl_dischidia_conductivity
        name: Conductivity
      - entity: sensor.fl_dischidia_illuminance
        name: Illuminance
      - entity: sensor.fl_dischidia_moisture
        name: Moisture
      - entity: sensor.fl_dischidia_temperature_2
        name: Temperature
    title: fl-dischidia
    state_color: true
  - type: entities
    entities:
      - entity: sensor.fl_rhipsalis_conductivity_2
        name: Conductivity
      - entity: sensor.fl_rhipsalis_illuminance_2
        name: Illuminance
      - entity: sensor.fl_rhipsalis_moisture_2
        name: Moisture
      - entity: sensor.fl_rhipsalis_temperature
        name: Temperature
    title: fl-rhipsalis
    state_color: true
  - type: entities
    entities:
      - sensor.fl_rosa_marie_illuminance
      - sensor.fl_rosa_marie_moisture
      - sensor.fl_rosa_marie_temperature
      - sensor.fl_rosa_marie_conductivity
    title: fl-rosa-marie
    state_color: true

Plant Monitor : NOK

type: vertical-stack
cards:
  - type: entities
    entities:
      - entity: sensor.pl_dischidia_air_humidity
        name: Air humidity
      - entity: sensor.pl_dischidia_conductivity
        name: Conductivity
      - entity: sensor.pl_dischidia_dli
        name: Dli
      - entity: sensor.pl_dischidia_illuminance
        name: Illuminance
      - entity: sensor.pl_dischidia_soil_moisture
        name: Soil moisture
      - entity: sensor.pl_dischidia_temperature
        name: Temperature
    title: pl-dischidia
  - type: entities
    entities:
      - entity: sensor.pl_rhipsalis_air_humidity
        name: Air humidity
      - entity: sensor.pl_rhipsalis_conductivity
        name: Conductivity
      - entity: sensor.pl_rhipsalis_dli
        name: Dli
      - entity: sensor.pl_rhipsalis_illuminance
        name: Illuminance
      - entity: sensor.pl_rhipsalis_soil_moisture
        name: Soil moisture
      - entity: sensor.pl_rhipsalis_temperature
        name: Temperature
    title: pl-rhipsalis
  - type: entities
    entities:
      - entity: sensor.pl_rosa_marie_air_humidity
        name: Air humidity
      - entity: sensor.pl_rosa_marie_conductivity
        name: Conductivity
      - entity: sensor.pl_rosa_marie_dli
        name: Dli
      - entity: sensor.pl_rosa_marie_illuminance
        name: Illuminance
      - entity: sensor.pl_rosa_marie_soil_moisture
        name: Soil moisture
      - entity: sensor.pl_rosa_marie_temperature
        name: Temperature
    title: pl-rosa-marie

2022-08-17_102600 2022-08-17_102617 2022-08-17_102807 2022-08-17_103430

Olen commented 2 years ago

If you look at the Attributes for the pl-rosa-marie sensors - what do they list as their "External sensor"?

image

This should point to the entity_id of the matching fl-rosa-marie sensor. If not, you can use the "Replace sensor" service call (available from devleoper tools) to set the correct external sensor.

warlordattack commented 2 years ago

great i will try this

m-gustafsson commented 2 years ago

This should point to the entity_id of the matching fl-rosa-marie sensor. If not, you can use the "Replace sensor" service call (available from devleoper tools) to set the correct external sensor.

Thanks! I had the same issue and this resolved the issue for me.

Olen commented 2 years ago

@warlordattack Did you get it to work?

warlordattack commented 2 years ago

hello, i deleted and re created both Xiaomi BLE then Plant Monitor for fl-rosa-marie and pl-rosa-marie some sensors are now OK on pl-rosa-marie but, for mosture it took (i don't know how) an old non existant sensor :

2022-08-18_100058 2022-08-18_100117

so now : -conductivity + temperature : OK -illuminance + soil moisture : NOK uses old deleted sensors

what a mess :)

Xiaomi BLE (fl-rosa-marie) is OK : all sensors give data, but Plant Monitor (pl-rosa-marie) re-created and attached to fl-rosa-matie took some old deleted sensors when re-creating pl-rosa-marie, attaching sensors i verified twice and took good sensors from fl-rosa-marie but when he created pl-rosa-marie, there was no data for illuminance + soil moisture, and bad sensors were attached :)

when i add integration, i always rename new devices to have nice names

m-gustafsson commented 2 years ago

Deleting and re-creating doesn't necessarily solve the issue, you still have to call the service to replace the wrong sensors.

image

warlordattack commented 2 years ago

ok problem fixed thank you :)

2022-08-18_102536 2022-08-18_102606

Olen commented 2 years ago

I still don't understand what happened here. The integration don't choose sensors by itself. If you migrate from yaml, it uses the same sensors you have defined there. If you add a plant manually in the gui, you select what sensors you want to use. If anything other than that happens, I would really like to know what it is.

Please explain in more detail, including any relevant yaml config, and show me the attributes from the sensors (under the plant device) that give you problems.