Closed Baldhor closed 1 year ago
Need add support to windowcoverings_closed capability I think
@Baldhor logs for information
"Unknown native capability, ignoring"
@JoachimVeulemans I published a new test version with additional logs ... https://homey.app/fr-fr/app/nl.inversion.esphome/ESPhome/test/
What I need is the new log which start with:
computeNativeCapability for entityId 1402501725:
I think the entity object will have a state property of type float, and I need to convert it into either windowcoverings_closed which expect a boolean, or to windowcoverings_state which expect an enum ...
In ESPhome, template cover have a state property with 3 possible values: 1.0 (open), 0.0 (close) or {} (unknown)
I will try to simulate your cover on my own device, but with your logs I will be sure I simulate the correct case.
NB: I was able to add those logs, because I solved the circular reference issue yesterday.
@Baldhor small side problem, the input field for the encryption key is limited to 20 characters. This is too short for the key, could you change the maximum number of characters?
Log for computeNativeCapability: [ManagerDrivers],[Driver:esphome-wizard],[PhysicalDevice:192.168.1.188:6053],computeNativeCapability for entityId,1402501725:
{
"_events": {},
"_eventsCount": 2,
"config": {
"objectId": "garage_door",
"key": 1402501725,
"name": "Garage Door",
"uniqueId": "garagecovergarage_door",
"assumedState": true,
"supportsPosition": false,
"supportsTilt": false,
"deviceClass": "",
"disabledByDefault": false,
"icon": "",
"entityCategory": 0,
"supportsStop": false
},
"type": "Cover",
"name": "Garage Door",
"id": 1402501725,
"connection": {
"_events": {
"message.SwitchStateResponse": [
null,
null,
null,
null,
null,
null
]
},
"_eventsCount": 28,
"frameHelper": {
"_events": {},
"_eventsCount": 5,
"host": "192.168.1.188",
"port": "6053",
"buffer": {
"type": "Buffer",
"data": []
},
"socket": {
"connecting": false,
"_hadError": false,
"_parent": null,
"_host": null,
"_closeAfterHandlingError": false,
"_readableState": {
"objectMode": false,
"highWaterMark": 16384,
"buffer": {
"head": null,
"tail": null,
"length": 0
},
"length": 0,
"pipes": [],
"flowing": true,
"ended": false,
"endEmitted": false,
"reading": true,
"constructed": true,
"sync": false,
"needReadable": true,
"emittedReadable": false,
"readableListening": false,
"resumeScheduled": false,
"errorEmitted": false,
"emitClose": false,
"autoDestroy": true,
"destroyed": false,
"errored": null,
"closed": false,
"closeEmitted": false,
"defaultEncoding": "utf8",
"awaitDrainWriters": null,
"multiAwaitDrain": false,
"readingMore": false,
"dataEmitted": true,
"decoder": null,
"encoding": null
},
"_events": {},
"_eventsCount": 5,
"_writableState": {
"objectMode": false,
"highWaterMark": 16384,
"finalCalled": false,
"needDrain": false,
"ending": false,
"ended": false,
"finished": false,
"destroyed": false,
"decodeStrings": false,
"defaultEncoding": "utf8",
"length": 0,
"writing": false,
"corked": 0,
"sync": false,
"bufferProcessing": false,
"writecb": null,
"writelen": 0,
"afterWriteTickInfo": {
"count": 2
},
"buffered": [],
"bufferedIndex": 0,
"allBuffers": true,
"allNoop": true,
"pendingcb": 2,
"constructed": true,
"prefinished": false,
"errorEmitted": false,
"emitClose": false,
"autoDestroy": true,
"errored": null,
"closed": false,
"closeEmitted": false
},
"allowHalfOpen": false,
"_sockname": null,
"_pendingData": null,
"_pendingEncoding": "",
"server": null,
"_server": null
}
},
"_connected": true,
"_authorized": true,
"port": "6053",
"host": "192.168.1.188",
"clientInfo": "homey",
"password": "<hidden value>",
"encryptionKey": "<no value>",
"reconnect": false,
"reconnectTimer": null,
"reconnectInterval": 30000,
"pingTimer": {
"_idleTimeout": 15000,
"_idlePrev": {
"_idlePrev": {
"_idleTimeout": 15000,
"_idlePrev": {
"_idleTimeout": 15000,
"_idleStart": 2972411,
"_repeat": 15000,
"_destroyed": false
},
"_idleStart": 2972409,
"_repeat": 15000,
"_destroyed": false
},
"expiry": 2987409,
"id": -9007199254739961,
"msecs": 15000,
"priorityQueuePosition": 2
},
"_idleStart": 2981474,
"_repeat": 15000,
"_destroyed": false
},
"pingInterval": 15000,
"pingAttempts": 3,
"pingCount": 0
}
}
@Baldhor small side problem, the input field for the encryption key is limited to 20 characters. This is too short for the key, could you change the maximum number of characters?
My bad, I made it 44 in conf_settings, but forgot to make it 44 in new_device ...
Fix published: https://homey.app/fr-fr/app/nl.inversion.esphome/ESPhome/test/
@Baldhor I can enter the full key but it does not allow me to click on "Connect". It seems some validation is incorrect. I can click on "Connect" when the key field is empty.
You cannot have both password and encryption key. I should add an info message I suppose
Why? In Home Assistant, I asks me to input the encryption key, then the password. Is this not the intended use?
I guess not, will adapt my configs :)
As far as I can tell it's either one or another :) I suppose home assistant ignore the password if there are an encryption key. Either that or there are a bug in the ESPhome low level client I use.
From logic point of view, one or another seems the way to go.
Ok so:
"config": {
"objectId": "garage_door",
"key": 1402501725,
"name": "Garage Door",
"uniqueId": "garagecovergarage_door",
"assumedState": true,
"supportsPosition": false,
"supportsTilt": false,
"deviceClass": "",
"disabledByDefault": false,
"icon": "",
"entityCategory": 0,
"supportsStop": false
},
supportsPosition == false
But:
Position == 1 ...
That doesn't make a lot of sense!
I need to be able to reproduce it. Maybe I will have time tomorrow, I will keep you aware.
@JoachimVeulemans I was able to reproduce your device using this yml conf:
- id: cover2
platform: template
name: "Garage Door"
optimistic: true
assumed_state: true
New version published: https://homey.app/fr-fr/app/nl.inversion.esphome/ESPhome/test/ Please confirm it works as expected, and I'd appreciate a review on the homey app store :)
Also, one small improvement, I have a sensor for the Wi-Fi signal but the capability is missing in the list. I have picked measure_pressure, but it is not entirely correct.
Config:
Originally posted by @JoachimVeulemans in https://github.com/Baldhor/Homey-ESPhome-Enhanced/issues/20#issuecomment-1685266910