Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V.2.0 Mqtt entities ok but not operable #12

Open
maverik80 opened this issue Feb 25, 2024 · 26 comments
Open

V.2.0 Mqtt entities ok but not operable #12

maverik80 opened this issue Feb 25, 2024 · 26 comments

Comments

@maverik80
Copy link

maverik80 commented Feb 25, 2024

Thanks again for your work, I installed component 2.0 and configured conq from the documentation, it sees the entities but they don't activate anything, from the logs I see that they communicate well but then nothing

For me Values for my personal split air conditioner (deviceFeatureCode 104, deviceTypeCode 009)

@bilan
Copy link
Owner

bilan commented Feb 25, 2024

Try v2.1.0.

@maverik80
Copy link
Author

Try v2.1.0.

unfortunately same situation, entities present but I can't control them, if you need something tell me

@maverik80
Copy link
Author

maverik80 commented Feb 25, 2024

I attach the debug log

2024-02-25 23:26:27.500 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on pu000098650051000200030003000000f7f6067a6c4/ac/mode/get (qos=0): b'off'
2024-02-25 23:26:27.501 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on pu000098650051000200030003000000f7f6067a6c4/ac/temperature/get (qos=0): b'30'
2024-02-25 23:26:27.501 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on pu000098650051000200030003000000f7f6067a6c4/ac/current-temperature/get (qos=0): b'22'
2024-02-25 23:26:27.501 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on pu000098650051000200030003000000f7f6067a6c4/ac/attributes/get (qos=0): b'{"t_sleep":"0","t_power":"0","t_work_mode":"1","t_fan_speed":"0","t_fan_speed_s":"0","t_fan_mute":"0","t_super":"0","t_eco":"1","t_temp":"30","t_temp_type":"0","t_up_down":"0","t_swing_follow":"1","t_swing_direction":"0","t_swing_angle":"0","t_fanspeedcv":"0","t_tms":"0","t_temp_compensate":"14","f_humidity":"128","f_temp_in":"22","f_electricity":"0","f_votage":"0","f_e_intemp":"0","f_e_incoiltemp":"0","f_e_inhumidity":"0","f_e_infanmotor":"0","f_e_arkgrille":"0","f_e_invzero":"0","f_e_incom":"0","f_e_indisplay":"0","f_e_inkeys":"0","f_e_inwifi":"0","f_e_inele":"0","f_e_ineeprom":"0","f_e_outeeprom":"0","f_e_outcoiltemp":"0","f_e_outgastemp":"0","f_e_outtemp":"0","f_e_waterfull":"0","f_e_upmachine":"0","f_e_dwmachine":"0","f_e_over_cold":"0","f_e_over_hot":"0","f_e_push":"0","t_demand_response":"0","t_dal":"0","t_talr":"0","f-filter":"0","f_ecm":"0"}'
2024-02-25 23:26:27.502 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on pu000098650051000200030003000000f7f6067a6c4/ac/fan/get (qos=0): b'auto'
2024-02-25 23:26:27.502 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on pu000098650051000200030003000000f7f606752e9/ac/mode/get (qos=0): b'off'
2024-02-25 23:26:27.505 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on pu000098650051000200030003000000f7f606752e9/ac/temperature/get (qos=0): b'30'
2024-02-25 23:26:27.505 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on pu000098650051000200030003000000f7f606752e9/ac/current-temperature/get (qos=0): b'23'
2024-02-25 23:26:27.505 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on pu000098650051000200030003000000f7f606752e9/ac/attributes/get (qos=0): b'{"t_sleep":"0","t_power":"0","t_work_mode":"1","t_fan_speed":"0","t_fan_speed_s":"0","t_fan_mute":"0","t_super":"0","t_eco":"0","t_temp":"30","t_temp_type":"0","t_up_down":"0","t_swing_follow":"0","t_swing_direction":"0","t_swing_angle":"0","t_fanspeedcv":"0","t_tms":"0","t_temp_compensate":"11","f_humidity":"128","f_temp_in":"23","f_electricity":"0","f_votage":"0","f_e_intemp":"0","f_e_incoiltemp":"0","f_e_inhumidity":"0","f_e_infanmotor":"0","f_e_arkgrille":"0","f_e_invzero":"0","f_e_incom":"0","f_e_indisplay":"0","f_e_inkeys":"0","f_e_inwifi":"0","f_e_inele":"0","f_e_ineeprom":"0","f_e_outeeprom":"0","f_e_outcoiltemp":"0","f_e_outgastemp":"0","f_e_outtemp":"0","f_e_waterfull":"0","f_e_upmachine":"0","f_e_dwmachine":"0","f_e_over_cold":"0","f_e_over_hot":"0","f_e_push":"0","t_demand_response":"0","t_dal":"0","t_talr":"0","f-filter":"0","f_ecm":"0"}'
2024-02-25 23:26:27.541 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on pu000098650051000200030003000000f7f606752e9/ac/fan/get (qos=0): b'auto'
2024-02-25 23:26:27.867 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on d8f15bc5cec7/info (qos=0): b'{"Versione":"SmartHome V7.1beta6","MAC_address":"d8f15bc5cec7","IP":"192.168.1.80","SSID":"Tiscali_HOME_2.4","RSSI":-55,"RSSI_P":90,"WILLTopic":"d8f15bc5cec7","Time_alive":"0d:5h:39m:59s","FreeHeap":"20896"}'
2024-02-25 23:26:27.867 DEBUG (MainThread) [homeassistant.components.mqtt.models] Rendering incoming payload '{"Versione":"SmartHome V7.1beta6","MAC_address":"d8f15bc5cec7","IP":"192.168.1.80","SSID":"Tiscali_HOME_2.4","RSSI":-55,"RSSI_P":90,"WILLTopic":"d8f15bc5cec7","Time_alive":"0d:5h:39m:59s","FreeHeap":"20896"}' with variables {'entity_id': 'sensor.tapparella_cucina_segnale', 'name': 'Tapparella_cucina segnale', 'this': <template TemplateStateFromEntityId(sensor.tapparella_cucina_segnale)>} with default value 'default' and Template<template=({{value_json.RSSI_P}}) renders=2032>

@bilan
Copy link
Owner

bilan commented Feb 26, 2024

How do you control AC device through home assistant? Please attach screenshots. It looks like no "set" mqtt messages.

@maverik80
Copy link
Author

Come controlli il dispositivo AC tramite l'assistente domestico? Si prega di allegare screenshot. Sembra che non ci siano messaggi mqtt "impostati".

so I turn it on from HA via broadlink, then I purchased the aeh-w4g2 wifi modules which are compatible with connect-life, until before they closed the API it worked like a god, now I turn it on with the connectlife app manually and with broadlink to get the my automations, if you need any other debugging let me know, p.s. now in mqtt with version 2.1.0 I see the right product name and type, 104 and 009

@bilan
Copy link
Owner

bilan commented Feb 26, 2024

Stop add on, remove all MQTT AC devices from previous integration, start add-on again. Notice that ID of the device changed in v2.

@maverik80
Copy link
Author

Stop add on, remove all MQTT AC devices from previous integration, start add-on again. Notice that ID of the device changed in v2.

mqtt connectlife.json

I hope it can be useful to you

@maverik80
Copy link
Author

Interrompi l'aggiunta, rimuovi tutti i dispositivi MQTT AC dall'integrazione precedente, avvia nuovamente l'aggiunta. Tieni presente che l'ID del dispositivo è cambiato nella v2.

@bilan hi I'm still trying to figure out how to turn them on from the component and today with mqtt explorer when I turn on remotely with the Connectlife app this is what I sniff

pu000098650051000200030003000000f7f6067a6c4
B.C
attributes
get = {"t_sleep":"0","t_power":"0","t_work_mode":"1","t_fan_speed":"0","t_fan_speed_s":"0","t_fan_mute":"0" ,"t_super":"0","t_eco":"1","t_temp":"30","t_temp_type":"0","t_up_down":"0","t_swing_follow":"1"," t_swing_direction":"0","t_swing_angle":"0","t_fanspeedcv":"0","t_tms":"0","t_temp_compensate":"14","f_humidity":"128","f_temp_in" :"24","f_electricity":"0","f_votage":"0","f_e_intemp":"0","f_e_incoiltemp…
current-temperature
get = 24
fan
get = self
fashions
get = heat
temperatures
get = 30

@bilan
Copy link
Owner

bilan commented Feb 27, 2024

@maverik80 do you have mqtt integration installed?
https://www.home-assistant.io/integrations/mqtt

@maverik80
Copy link
Author

@maverik80 do you have mqtt integration installed? https://www.home-assistant.io/integrations/mqtt

yes, i have other device attached on my server mqtt

@bilan
Copy link
Owner

bilan commented Feb 27, 2024

How do you set mode and temperature in homeassistant? Please attach screenshots.

@maverik80
Copy link
Author

Senza nome

I use this card which is the original home assistant card

@bilan
Copy link
Owner

bilan commented Feb 27, 2024

I use this card too. Hard to say what is wrong.

@bilan
Copy link
Owner

bilan commented Feb 27, 2024

When you turn the device ON from HA you should have in add-on logs something like this:

[2024-02-27 13:42:45] production.INFO: ConnectLife: updating device. {"puid":"pu000098650051000X","properties":{"t_power":1,"t_temp_type":"0","t_temp":16,"t_beep":0,"t_swing_direction":2,"t_swing_angle":4,"t_fan_speed":0,"t_work_mode":1}} 
[2024-02-27 13:42:45] production.INFO: Response ["{\"resultCode\":0,\"kvMap\":null,\"errorCode\":0,\"errorDesc\":null}"] 
[2024-02-27 13:42:45] production.INFO: ConnectLife: updating device result. {"resultCode":0,"kvMap":null,"errorCode":0,"errorDesc":null} 

Do you have it?

@maverik80
Copy link
Author

[2024-02-27 13:42:45]

no, I don't have any of this, in fact it reads all the states if posted by the connect life app, but it doesn't take any type of command from HA, can you give me an example of a service to send via developer tools to turn it on?

@bilan
Copy link
Owner

bilan commented Feb 27, 2024

service: climate.set_temperature
data:
  temperature: 32
  hvac_mode: heat
target:
  entity_id: climate.klimatyzator

@maverik80
Copy link
Author

service: climate.set_temperature
data:
temperature: 32
hvac_mode: heat
target:
entity_id: climate.klimatyzator

I meant a command with mqtt service to activate it, so then I adapted it with my data

@bilan
Copy link
Owner

bilan commented Feb 27, 2024

service: mqtt.publish
data:
  topic: DEVICE_ID/ac/mode/set
  payload: heat

@bilan
Copy link
Owner

bilan commented Feb 27, 2024

Notice that you've pasted two different DEVICE_ID:
pu000098650051000200030003000000f7f6067a6c4
pu000098650051000200030003000000f7f606752e9

@maverik80
Copy link
Author

Notice that you've pasted two different DEVICE_ID: pu000098650051000200030003000000f7f6067a6c4 pu000098650051000200030003000000f7f606752e9

in fact I have 2 wifi modules and he finds two for me, it seems as if the commands he sends in mqtt are not good and I'm trying to understand which ones they are

@maverik80
Copy link
Author

Notice that you've pasted two different DEVICE_ID: pu000098650051000200030003000000f7f6067a6c4 pu000098650051000200030003000000f7f606752e9

in fact I have 2 wifi modules and he finds two for me, it seems as if the commands he sends in mqtt are not good and I'm trying to understand which ones they are

Since I want to understand why it's not working... Can you get information on how your broker is configured?

@bilan
Copy link
Owner

bilan commented Mar 3, 2024

Try updating Home Assistant to newest version.

@maverik80
Copy link
Author

Try updating Home Assistant to newest version.

@bilan updated to the latest version of HA but nothing but now this appears in the logs of your add-on component

2024-03-09 16:37:26,356 DEBG 'mqtt' stdout output:
[2024-03-09 15:37:26] production.ERROR: MQTT [core-mosquitto:1883] [connectlife-api] Subscriber callback threw exception for published message on topic [pu000098650051000200030003000000f7f606752e9/ac/mode/set]. {"host":"core-mosquitto","port":1883,"clientId":"connectlife-api","topic":"pu000098650051000200030003000000f7f606752e9/ac/mode/set","message":"","exception":"[object] (ErrorException(code: 0): Undefined array key "" at /home/app/app/Services/AcDevice.php:108)
[stacktrace]
#0 /home/app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(255): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /home/app/app/Services/AcDevice.php(108): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}()
#2 /home/app/app/Services/MqttService.php(91): App\Services\AcDevice->toConnectLifeApiPropertiesArray()
#3 /home/app/app/Services/MqttService.php(81): App\Services\MqttService->updateAcDevice()
#4 /home/app/app/Services/MqttService.php(62): App\Services\MqttService->reactToMessageOnTopic()
#5 [internal function]: App\Services\MqttService->App\Services\{closure}()
#6 /home/app/vendor/php-mqtt/client/src/MqttClient.php(899): call_user_func()
#7 /home/app/vendor/php-mqtt/client/src/MqttClient.php(729): PhpMqtt\Client\MqttClient->deliverPublishedMessage()
#8 /home/app/vendor/php-mqtt/client/src/MqttClient.php(686): PhpMqtt\Client\MqttClient->handleMessage()
#9 /home/app/vendor/php-mqtt/client/src/MqttClient.php(640): PhpMqtt\Client\MqttClient->processMessageBuffer()
#10 /home/app/app/Console/Commands/MqttLoop.php(49): PhpMqtt\Client\MqttClient->loopOnce()
#11 /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\MqttLoop->handle()
#12 /home/app/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#13 /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#14 /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#15 /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call()
#16 /home/app/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#17 /home/app/vendor/symfony/console/Command/Command.php(326): Illuminate\Console\Command->execute()
#18 /home/app/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run()
#19 /home/app/vendor/symfony/console/Application.php(1096): Illuminate\Console\Command->run()
#20 /home/app/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#21 /home/app/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#22 /home/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\Component\Console\Application->run()
#23 /home/app/artisan(35): Illuminate\Foundation\Console\Kernel->handle()
#24 {main}
"}

2024-03-09 16:37:26,356 DEBG 'mqtt' stdout output:
[2024-03-09 15:37:26] production.ERROR: MQTT [core-mosquitto:1883] [connectlife-api] Subscriber callback threw exception for published message on topic [pu000098650051000200030003000000f7f606752e9/ac/mode/set]. {"host":"core-mosquitto","port":1883,"clientId":"connectlife-api","topic":"pu000098650051000200030003000000f7f606752e9/ac/mode/set","message":"","exception":"[object] (ErrorException(code: 0): Undefined array key "" at /home/app/app/Services/AcDevice.php:108)
[stacktrace]
#0 /home/app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(255): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /home/app/app/Services/AcDevice.php(108): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}()
#2 /home/app/app/Services/MqttService.php(91): App\Services\AcDevice->toConnectLifeApiPropertiesArray()
#3 /home/app/app/Services/MqttService.php(81): App\Services\MqttService->updateAcDevice()
#4 /home/app/app/Services/MqttService.php(62): App\Services\MqttService->reactToMessageOnTopic()
#5 [internal function]: App\Services\MqttService->App\Services\{closure}()
#6 /home/app/vendor/php-mqtt/client/src/MqttClient.php(899): call_user_func()
#7 /home/app/vendor/php-mqtt/client/src/MqttClient.php(729): PhpMqtt\Client\MqttClient->deliverPublishedMessage()
#8 /home/app/vendor/php-mqtt/client/src/MqttClient.php(686): PhpMqtt\Client\MqttClient->handleMessage()
#9 /home/app/vendor/php-mqtt/client/src/MqttClient.php(640): PhpMqtt\Client\MqttClient->processMessageBuffer()
#10 /home/app/app/Console/Commands/MqttLoop.php(49): PhpMqtt\Client\MqttClient->loopOnce()
#11 /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\MqttLoop->handle()
#12 /home/app/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#13 /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#14 /home/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#15 /home/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call()
#16 /home/app/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#17 /home/app/vendor/symfony/console/Command/Command.php(326): Illuminate\Console\Command->execute()
#18 /home/app/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run()
#19 /home/app/vendor/symfony/console/Application.php(1096): Illuminate\Console\Command->run()
#20 /home/app/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#21 /home/app/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#22 /home/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\Component\Console\Application->run()
#23 /home/app/artisan(35): Illuminate\Foundation\Console\Kernel->handle()
#24 {main}
"}

@bilan
Copy link
Owner

bilan commented Mar 9, 2024

Reinstall add-on, wrong devices_config value.

@maverik80
Copy link
Author

@bilan
now this is the log

2024-03-09 17:16:25,600 DEBG 'mqtt' stdout output:
[2024-03-09 16:16:25] production.INFO: ConnectLife: updating device. {"puid":"pu000098650051000200030003000000f7f606752e9","properties":{"t_power":0,"t_temp_type":"0","t_temp":28,"t_beep":0,"t_fan_speed":0}}

2024-03-09 17:16:25,600 DEBG 'mqtt' stdout output:
[2024-03-09 16:16:25] production.INFO: ConnectLife: updating device. {"puid":"pu000098650051000200030003000000f7f606752e9","properties":{"t_power":0,"t_temp_type":"0","t_temp":28,"t_beep":0,"t_fan_speed":0}}

2024-03-09 17:16:25,744 DEBG 'mqtt' stdout output:
[2024-03-09 16:16:25] production.INFO: Response ["{"resultCode":0,"kvMap":null,"errorCode":0,"errorDesc":null}"]
[2024-03-09 16:16:25] production.INFO: ConnectLife: updating device result. {"resultCode":0,"kvMap":null,"errorCode":0,"errorDesc":null}

2024-03-09 17:16:25,744 DEBG 'mqtt' stdout output:
[2024-03-09 16:16:25] production.INFO: Response ["{"resultCode":0,"kvMap":null,"errorCode":0,"errorDesc":null}"]
[2024-03-09 16:16:25] production.INFO: ConnectLife: updating device result. {"resultCode":0,"kvMap":null,"errorCode":0,"errorDesc":null}

2024-03-09 17:16:28,752 DEBG 'mqtt' stdout output:
[2024-03-09 16:16:28] production.INFO: Mqtt: received a on [pu000098650051000200030003000000f7f606752e9/ac/mode/set] heat

2024-03-09 17:16:28,752 DEBG 'mqtt' stdout output:
[2024-03-09 16:16:28] production.INFO: Mqtt: received a on [pu000098650051000200030003000000f7f606752e9/ac/mode/set] heat

2024-03-09 17:16:28,753 DEBG 'mqtt' stdout output:
[2024-03-09 16:16:28] production.INFO: ConnectLife: updating device. {"puid":"pu000098650051000200030003000000f7f606752e9","properties":{"t_power":1,"t_temp_type":"0","t_temp":28,"t_beep":0,"t_fan_speed":0,"t_work_mode":1}}

2024-03-09 17:16:28,753 DEBG 'mqtt' stdout output:
[2024-03-09 16:16:28] production.INFO: ConnectLife: updating device. {"puid":"pu000098650051000200030003000000f7f606752e9","properties":{"t_power":1,"t_temp_type":"0","t_temp":28,"t_beep":0,"t_fan_speed":0,"t_work_mode":1}}

2024-03-09 17:16:28,917 DEBG 'mqtt' stdout output:
[2024-03-09 16:16:28] production.INFO: Response ["{"resultCode":0,"kvMap":null,"errorCode":0,"errorDesc":null}"]
[2024-03-09 16:16:28] production.INFO: ConnectLife: updating device result. {"resultCode":0,"kvMap":null,"errorCode":0,"errorDesc":null}

2024-03-09 17:16:28,917 DEBG 'mqtt' stdout output:
[2024-03-09 16:16:28] production.INFO: Response ["{"resultCode":0,"kvMap":null,"errorCode":0,"errorDesc":null}"]
[2024-03-09 16:16:28] production.INFO: ConnectLife: updating device result. {"resultCode":0,"kvMap":null,"errorCode":0,"errorDesc":null}

@iTigere
Copy link

iTigere commented May 28, 2024

Grazie ancora per il tuo lavoro, ho installato il componente 2.0 e configurato conq dalla documentazione, vede le entità ma non attivano nulla, dai log vedo che comunicano bene ma poi niente

Per me Valori per il mio condizionatore d'aria split personale (deviceFeatureCode 104, deviceTypeCode 009)

Grazie ancora per il tuo lavoro, ho installato il componente 2.0 e configurato conq dalla documentazione, vede le entità ma non attivano nulla, dai log vedo che comunicano bene ma poi niente

Per me Valori per il mio condizionatore d'aria split personale (deviceFeatureCode 104, deviceTypeCode 009)

Hi, did you manage to solve it? I have the same problem but even with the update it doesn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants