fsaris / EspHome-AwoX-BLE-mesh-hub

Custom component for ESPhome that can act as a AwoX BLE mesh hub (Telink mesh)
54 stars 16 forks source link

Eglo Plug Plus is always unknown #11

Closed Dillton closed 1 year ago

Dillton commented 1 year ago

Hello @fsaris its been some time.

First let me thank you for this new solution to control Awox devices. The first feel is very good in compare of old Awox integration so very good job. :)

Now to the problem one of my devices is Eglo Plug Plus which worked fine in old integration but with ESP the plug is recognized but always in unknown state. Lights working well. image

I have checked your list of supported/activated devices and should be this one so should work just fine: this->add_device(DEVICE_TYPE_PLUG, 0x85, "EGLO PLUG PLUS", "SMPWBm10GEa", MANUFACTURER_EGLO, "mdi:power-socket-de");

Do you have any idea what could be wrong? I can provide also some logs if you could guide me a bit, I am newbie to ESP devices :)

FYI: I was forced by HAOS yesterday update to migrate to this new solution because bluetooth in HAOS 10 is completely broken.

fsaris commented 1 year ago

Can you please provide the logs from ESPHome. That should tell us more

Dillton commented 1 year ago

Hi, I hope this is the log you need. logs_awox-ble-mesh-hub_logs.txt

fsaris commented 1 year ago

Looks like the mqtt client is reconnecting constantly. Could point to a memory issue or connection issues.

Do you have only this component running on the esp?

Dillton commented 1 year ago

Yes only Awox hub is running on this ESP module.

Regarding the mqtt reconnecting I think I fixed this by using latest arduino framework and there was also bigger ESPHome update recently. I can't see any constant reconnection in logs now maybe once per hour or so.

Anyway I am not sure if this is related to the problem as only the plug is in unknown state but all 8 lights working like a charm.

Dillton commented 1 year ago

Hi, there is also MQTT info for the device if its somehow helpful.

EGLO PLUG PLUS (switch.eglo_plug_plus) MQTT discovery data: Topic: homeassistant/switch/awox-A4C13821E89A/config Payload schema: json name: EGLO PLUG PLUS unique_id: awox-A4:C1:38:21:E8:9A-switch icon: mdi:power-socket-de state_topic: awox-ble-mesh-hub/26778/state command_topic: awox-ble-mesh-hub/26778/command availability:

michalpulda commented 1 year ago

Hello, I'm also experiencing the same issue. As mentioned in another issue, I don't have problem with MQTT disconnections and it works pretty solid so far.

Please see bellow VERBOSE logs. Turning off and on the plug showed following erorrs:

[14:14:50][E][json:101]: JSON parse error: InvalidInput
...
[14:15:14][E][json:101]: JSON parse error: InvalidInput

logs_esp32u-ble-awox_logs.txt

Thanks!

MineTech13 commented 1 year ago

Hello, I'm also experiencing the same issue. As mentioned in another issue, I don't have problem with MQTT disconnections and it works pretty solid so far.

Please see bellow VERBOSE logs. Turning off and on the plug showed following erorrs:

[14:14:50][E][json:101]: JSON parse error: InvalidInput
...
[14:15:14][E][json:101]: JSON parse error: InvalidInput

logs_esp32u-ble-awox_logs.txt

Thanks!

Same goes for me for my SMPWBm10GE (HW1.0) FW1.8.8

fsaris commented 1 year ago

Do you have the api: enabled? If so please give it a try with the api disabled

michalpulda commented 1 year ago

Do you have the api: enabled? If so please give it a try with the api disabled

I have the api: disabled.

Input type for the switch is not what I would expect to be for plug (see the image bellow). It's two buttons and not a switch. Isn't the problem connected with this?

image

fsaris commented 1 year ago

This is the state when HA doesn't now yet if the device is on or off

michalpulda commented 1 year ago

This is the state when HA doesn't now yet if the device is on or off

I didn't know that, thank you. The plug works fine with the original integration, though. Is there any way I could help any further? Thanks!

fsaris commented 1 year ago

Hello, I'm also experiencing the same issue. As mentioned in another issue, I don't have problem with MQTT disconnections and it works pretty solid so far.

Please see bellow VERBOSE logs. Turning off and on the plug showed following erorrs:

[14:14:50][E][json:101]: JSON parse error: InvalidInput
...
[14:15:14][E][json:101]: JSON parse error: InvalidInput

logs_esp32u-ble-awox_logs.txt

Thanks!

Do you maybe also have the mqtt message logs of this failing device (especially the outgoing)? I don't have a plug myself so I'm not able to reproduce.

michalpulda commented 1 year ago

Hello,

First, this is how it looks like when calling ON and OFF to a spot light that works well:

image image

Now, when I do the same for the plug:

image

The only difference I can see is that the call is in different format:

image vs. image

Hope this helps!

(For my future reference: this is a prompt I used via the SSH addon: mosquitto_sub -h host_address -u user_name -P password -d -v -t '#')

fsaris commented 1 year ago

ah, that log helped. I pushed a update. That should make it possible to control the plug

michalpulda commented 1 year ago

Works great, thank you!

michalpulda commented 1 year ago

@fsaris After updating to the last version (based on this issue), the plug doesn't work anymore. Looking at the log, it show exactly the same as before:

image

The only difference I can see is that the call is in different format:

image vs. image

fsaris commented 1 year ago

Please add the needed device info to your yaml and it should work again

michalpulda commented 1 year ago

Done and it's working. Thank you!