NorthernMan54 / homebridge-tasmota

Plugin for Tasmota devices leveraging Home Assistant auto discovery
Apache License 2.0
35 stars 9 forks source link

motion sensor #42

Closed HarryMcGill2022 closed 2 years ago

HarryMcGill2022 commented 2 years ago

how do configure the plugin to show a devise as a sensor?

NorthernMan54 commented 2 years ago

If you look at the DEVICES page, samples from my personal collection are documented including my pir motion sensor

https://github.com/NorthernMan54/homebridge-tasmota/blob/master/DEVICES.md#motion--bme280-temperature-sensor

HarryMcGill2022 commented 2 years ago

so how do I config Homebridge to show as pir sensor?

NorthernMan54 commented 2 years ago

As Tasmota doesn't know its a motion sensor, you need to supply an override to the configuration ie

"override":
  "869815_SW_1": {             <--- This is the unique_id of the discovery message you want to override
    "device_class": "motion",  <--- This is the key and property you want to override
    "name": "Motion Sensor"    <--- You can overwrite an existing value
 }
HarryMcGill2022 commented 2 years ago

i am sounding relly dum now where can i find my unique id]

NorthernMan54 commented 2 years ago

Oh, in the homebridge log when you start it with the debug option set to true

It will be very verbose as it discovers all your devices, and your looking for a section like this for the device your playing with. For this one, the unique id is 5673B2_RL_1

  Tasmota:platform Discovered -> homeassistant/switch/5673B2_RL_1/config Switch 1 {
  name: 'Switch 1',
  stat_t: 'tele/tasmota_5673B2/STATE',
  avty_t: 'tele/tasmota_5673B2/LWT',
  pl_avail: 'Online',
  pl_not_avail: 'Offline',
  cmd_t: 'cmnd/tasmota_5673B2/POWER1',
  val_tpl: '{{value_json.POWER1}}',
  pl_off: 'OFF',
  pl_on: 'ON',
  uniq_id: '5673B2_RL_1',
  dev: { ids: [ '5673B2' ] },
  tasmotaType: 'switch'
} +0ms
HarryMcGill2022 commented 2 years ago

ok i will have a look thanks

HarryMcGill2022 commented 2 years ago

Removed

NorthernMan54 commented 2 years ago

For the PIR it should not be a sensor but a switch or relay

HarryMcGill2022 commented 2 years ago

its a relay

NorthernMan54 commented 2 years ago

Config was updated, but I still think its the incorrect Unique ID

In the config I used 'AFD5E9_RL_1', but your device AFD5E9 has three relays ???

HarryMcGill2022 commented 2 years ago

it has just updated its selth so there is only q one relay now

HarryMcGill2022 commented 2 years ago

1 replay now

NorthernMan54 commented 2 years ago

To make this easier, would could have direct chatted via discord

After restart it looks correct

HarryMcGill2022 commented 2 years ago

yea Harry McGill#8631

NorthernMan54 commented 2 years ago

I removed your website details

HarryMcGill2022 commented 2 years ago

ok thanks

NorthernMan54 commented 2 years ago

Found a config issue with more modern Tasmota firmwares, and needed to change the override config

"override": { "AFD5E9_RL_1": { "device_class": "motion", "name": "Motion Sensor", "tasmotaType": "binary_sensor" } }