Yet another "how do I" question.

Posted on
Mon Apr 03, 2023 2:58 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Yet another "how do I" question.

There is probably something very simple I am missing. But...

How do I represent an Indigo device with a numeric value (other than temperature) in HomeKit? In the current case, the value is longStatusString from an Indigo timer device. But, it could be any numeric value. (And, yes, there is probably a problem here because longStatusString contains colons -- hh:mm:ss. So, I probably need to store timerLeftSeconds in a variable somewhere and use that.) But, the key issue remains, how can I represent this number (or time value) in HomeKit as a device of some type?

Ideas?

Posted on
Mon Apr 03, 2023 8:11 pm
GlennNZ offline
User avatar
Posts: 1570
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Yet another "how do I" question.

Hi

Probably isn’t possible.

Bottom line is pretty limited HomeKit device types all with quite specific requirements, True/False, certain temperature range etc.

HKLS supports most HomeKit device types - if you find one that fits the bill could consider adding support for it - but suspect you won’t be able to.

Certainly a limitation of Homekit devices more than anything else.

(I have a water-level that I wouldn’t mind getting into Homekit, which is a simple percentage - haven’t found a way…)


Sent from my iPad using Tapatalk

Posted on
Mon Apr 03, 2023 8:21 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Yet another

GlennNZ wrote:
…HKLS supports most HomeKit device types - if you find one that fits the bill could consider adding support for it - but suspect you won’t be able to.

I strongly suspect you are right. Thanks for the reply.

Posted on
Mon Apr 03, 2023 8:39 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Yet another "how do I" question.

Hmmmm. Have you seen this? https://www.reddit.com/r/homeassistant/ ... _a_sensor/

Notably the last comment from Horatius509

Or, maybe https://developer.apple.com/documentati ... waterlevel

Posted on
Mon Apr 03, 2023 10:21 pm
GlennNZ offline
User avatar
Posts: 1570
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Yet another "how do I" question.

Yeah - pretty sure I had.

The Water Level Characteristic - is only compatible with the humidifier device, as a side bit of info. I did look at it, would need to add support for humidifier device (which has a whole lot of characteristics) but felt probably to clunky (will look like humidifier in interface and for reporting characteristics)

The CO2 sensor - similar - reporting will be number 0-1000 as CO2

Basically at that point I gave up - whilst could trigger on these aspects was more for routine display/checking that I would probably use.

Glenn


Sent from my iPad using Tapatalk

Posted on
Tue Apr 04, 2023 1:53 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Yet another

GlennNZ wrote:
...Basically at that point I gave up - whilst could trigger on these aspects was more for routine display/checking that I would probably use. ...
Did you see the last link in my post? I added it in an edit, so you might have missed it.

https://developer.apple.com/documentati ... waterlevel

Declaration
let HMCharacteristicTypeWaterLevel: String
Discussion
The corresponding value is a percentage of the maximum amount of water that the accessory, like a humidifier, can hold.

Posted on
Tue Apr 04, 2023 2:02 am
GlennNZ offline
User avatar
Posts: 1570
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Yet another "how do I" question.

Yep.

That characteristic is only available within a Humidifier or purifier device.

Need to add humidifier and its details, with it’s characteristics, so as above. Will look like a humidifier and be a pretty internal state - good trigger on it - but not great to look at


Sent from my iPad using Tapatalk

Posted on
Tue Apr 04, 2023 2:16 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Yet another "how do I" question.

Sorry to keep pestering...

I have decided to try implementing my timer as a valve, as a valve is supposed to support a timer value up to 3600 seconds. I have published the HKLS device as shown in the screenshot below. However, the Home app implements as a switch. Same thing happens if I set it as a LightSensor.

Screenshot 2023-04-04 at 10.12.14.png
Screenshot 2023-04-04 at 10.12.14.png (118.33 KiB) Viewed 1043 times

Posted on
Tue Apr 04, 2023 2:55 am
GlennNZ offline
User avatar
Posts: 1570
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Yet another "how do I" question.

berkinet wrote:
Sorry to keep pestering...

I have decided to try implementing my timer as a valve, as a valve is supposed to support a timer value up to 3600 seconds. I have published the HKLS device as shown in the screenshot below. However, the Home app implements as a switch. Same thing happens if I set it as a LightSensor.

Screenshot 2023-04-04 at 10.12.14.png

We don’t support timer values as secondary characteristics (if indeed they exist as a characteristic for Valve)

Typically valve is a On/Off True / False value - which the Active chacteristic.

Code: Select all
Valve": {
      "OptionalCharacteristics": [
         "SetDuration",
         "RemainingDuration",
         "IsConfigured",
         "ServiceLabelIndex",
         "StatusFault",
         "Name"
      ],
      "RequiredCharacteristics": [
         "Active",
         "InUse",
         "ValveType"
      ],
      "UUID": "000000D0-0000-1000-8000-0026BB765291"
   },


This is the timer example - the UI work alone to add support would be big and not really worth it unfortunately. If indeed these optional characteristics can be set at beginning.

Glenn


Sent from my iPad using Tapatalk

Posted on
Tue Apr 04, 2023 3:39 am
GlennNZ offline
User avatar
Posts: 1570
Joined: Dec 07, 2014
Location: Central Coast, Australia

Yet another "how do I" question.

Hmm

A lux Sensor should work I would guess…. if truly a number being passed and not a string…

(but def not valve)


Sent from my iPad using Tapatalk

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest