ALLTERCO / shelly-script-examples

Shelly Scripts for Gen2 Shelly devices
Apache License 2.0
199 stars 55 forks source link

Idea: Include a BLE script that support ESPresence functionality for Home Assistant #23

Open Wipnose opened 1 year ago

Wipnose commented 1 year ago

Dear Allterco,

Next to the 'normal switching function' (which I much appreciate) the Shelly 1PM devices (and product family) also seem ideally suited to detect BLE sensors (phones, tags etc) !

Would your (Allterco's) new example script makes that the Shelly 1PM also sends MQTT BLE messages or would the new shelly integration also include the BLE beacon information, then (for sure !) many Home Assistant users would be most pleased with the new Person_Presence detection functionality. To further explain: With several Shelly devices installed in the house, then lights and other devices in each room can be automated, pending the presence of the mobile beacon (e.g. phone, smart watch etc.) of the person wearing that device. All without additional hardware !

A simular software function is outlined at https://github.com/ESPresense/ESPresense. ESPresence recommends acquiring a seperate ESP32 which needs a power supply, housing etc. It pleasantly struck me to also note that this type of required hardware is already in abundancy at my house: All my electric light switches have Shelly 1PM devices, so I guess (as I am not a software expert) that the following is required: A1. new Shelly BLE script sending MQTT and A2. sensor definition in Home Assistant or B. the Shelly integration for Home Assistant also include BLE beacon detections functionality.

Is that a nice idea? Regards, Wipnose (an enthousiastic Shelly and Home Assistant hobbyist)

Mircho commented 1 year ago

That might be doable, but do you happen to have Gen2 devices. You mention Shelly 1PM but those don't support Bluetooth.

Wipnose commented 1 year ago

Hi Mircho, All my switches are Gen 2: They have ESP32 with Bluetooth! The "1" in the "Shelly 1PM" stand for 1 switch.

bvhme commented 1 year ago

It is confusing, the Gen 2 with bluetooth is calles Shelly Plus 1PM. The old one Shelly 1PM.

But yes, i'd love this!

emcepe commented 1 month ago

any news for that feature script?

I am totally new to the Shelly World and bought a BLU Gateway and a Button Tough for presence detection of a car inside/outside my garage. It works pretty nice.

But I'd also like to get presence detection for all the mobiles in my house. If that'll be possible I'll buy some more BLU gateways for my house to get room automation and so on, for example with MQTT publish to my FHEM server or similar.

That would be pretty cool.