Enabling battery status for Shims devices

Posted on
Fri Jan 31, 2020 11:33 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Enabling battery status for Shims devices

I'm working on adding battery status to Shims devices. If you have devices that report battery status, please post the device type, topic, and payload for the report. Also what kind of Shim device you're using.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Jan 31, 2020 11:35 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Enabling battery status for Shims devices

For my Wyze devices. These are OnOff sensors (motion detectors) and Value sensors (temp, humidity).

Code: Select all
<prefix>/wyze/update --> {"address": "778D7038", "sensor_type": "switch", "state": "open", "battery": 90, "signal": 24}

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Jan 31, 2020 11:48 am
cuhouse offline
Posts: 144
Joined: Feb 21, 2007
Location: Virginia, USA

Re: Enabling battery status for Shims devices

Shelly H&T

Code: Select all
shellies/shellyht-E0100C/sensor/battery --> XX

Raw payload number in percentage of battery level

Indigo 2022.1.2, Big Sur v11.7.1, Dedicated late 2014 Mac Mini, PowerLinc 2413U.

Posted on
Fri Jan 31, 2020 11:57 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Enabling battery status for Shims devices

cuhouse wrote:
Shelly H&T
Code: Select all
shellies/shellyht-E0100C/sensor/battery --> XX

Raw payload number in percentage of battery level


That one is going to be tough. I'm going to have to map two different topics into one Indigo device. Tricky.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Jan 31, 2020 12:31 pm
cuhouse offline
Posts: 144
Joined: Feb 21, 2007
Location: Virginia, USA

Re: Enabling battery status for Shims devices

This one might be outside your scope...

LOLIN (Wemos) ESP8266 D1 MiniPro with backup battery. Device flashed with Tasmota 6.6.0

Code: Select all
indigo/sensor/tele/STATE --> {"Time":"2020-01-31T13:21:28","Uptime":"76T21:16:34","Vcc":3.538,"Heap":23,"SleepMode":"Dynamic","Sleep":65,"LoadAvg":14,"Wifi":{"AP":1,"SSId":"Guest","BSSId":"FE:EC:DA:BA:17:E6","Channel":11,"RSSI":88,"LinkCount":4150,"Downtime":"0T05:17:07"}


I use the Vcc value and display this as an MQTT Shims Value Sensor device Battery level.

Screen Shot 2020-01-31 at 1.28.58 PM.png
Screen Shot 2020-01-31 at 1.28.58 PM.png (35.31 KiB) Viewed 1662 times

Indigo 2022.1.2, Big Sur v11.7.1, Dedicated late 2014 Mac Mini, PowerLinc 2413U.

Posted on
Fri Jan 31, 2020 12:48 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Enabling battery status for Shims devices

cuhouse wrote:
This one might be outside your scope...

LOLIN (Wemos) ESP8266 D1 MiniPro with backup battery. Device flashed with Tasmota 6.6.0


Pass on that one. The Indigo UI wants a 0-100 percentage for the client display, and I don't want to figure out how to normalize a Vcc value.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Jan 31, 2020 1:14 pm
CliveS offline
Posts: 771
Joined: Jan 10, 2016
Location: Medomsley, County Durham, UK

Re: Enabling battery status for Shims devices

FlyingDiver wrote:
cuhouse wrote:
Shelly H&T
Code: Select all
shellies/shellyht-E0100C/sensor/battery --> XX

Raw payload number in percentage of battery level


That one is going to be tough. I'm going to have to map two different topics into one Indigo device. Tricky.


Looks the same as the Shelly Door/Window sensor and I get the battery readout or am I missing something in your request ?

CliveS

Indigo 2023.2.0 : macOS Ventura 13.6.3 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
----------------------------------------------------------------------------------
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer

Posted on
Fri Jan 31, 2020 1:16 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Enabling battery status for Shims devices

CliveS wrote:
Looks the same as the Shelly Door/Window sensor and I get the battery readout or am I missing something in your request ?


I expected those two to report the same. Thanks for the confirmation.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Jan 31, 2020 1:28 pm
CliveS offline
Posts: 771
Joined: Jan 10, 2016
Location: Medomsley, County Durham, UK

Re: Enabling battery status for Shims devices

I started with 2 new batteries and it gave 100 so to double check I swapped out 1 battery with a used one and got the following

Screenshot 2020-01-31 at 19.06.50.png
Screenshot 2020-01-31 at 19.06.50.png (233.51 KiB) Viewed 1616 times


Screenshot 2020-01-31 at 19.08.48.png
Screenshot 2020-01-31 at 19.08.48.png (174.59 KiB) Viewed 1616 times

CliveS

Indigo 2023.2.0 : macOS Ventura 13.6.3 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
----------------------------------------------------------------------------------
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer

Posted on
Fri Jan 31, 2020 2:40 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Enabling battery status for Shims devices

CliveS wrote:
I started with 2 new batteries and it gave 100 so to double check I swapped out 1 battery with a used one and got the following


I'm not sure what you're trying to show me. The MQTT Explorer window shows the device is reporting battery at 94%.

The plugin won't do anything different yet, I haven't released a version with battery support yet. This is what you'll get eventually:
Attachments
Screen Shot 2020-01-31 at 3.44.20 PM.png
Screen Shot 2020-01-31 at 3.44.20 PM.png (39.32 KiB) Viewed 1587 times

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Jan 31, 2020 3:04 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Enabling battery status for Shims devices

So getting this to work for devices that put the battery state in a JSON payload was easy. I'm still not sure how I'm going to make this work for devices that use a specific topic and a raw payload.

I ordered a Shelly H&T so I have a device to test with.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests