deiger / AirCon

Scripts for controlling Air Conditioners, e.g. with HiSense modules.
GNU General Public License v3.0
212 stars 58 forks source link

turn_on turn_off AC in Home Assistant and temperature issues #26

Closed Ras195 closed 3 years ago

Ras195 commented 4 years ago

I finally managed to have my AC on Hass.io

image

The first thing is how I can add a button to switch on/off the AC?

Then I've a problem regarding the temperature

In my /config/configuration.yaml I set:

max_temp: "30"
min_temp: "16"
temperature_unit: "C"

But when I execute:

curl -ik 'http://172.17.8.10:8889/hisense/status'

I get:

HTTP/1.0 200 OK Server: BaseHTTP/0.6 Python/3.8.2 Date: Thu, 25 Jun 2020 11:35:01 GMT Content-type: application/json

{"f_electricity": 0, "f_e_arkgrille": 0, "f_e_incoiltemp": 0, "f_e_incom": 0, "f_e_indisplay": 0, "f_e_ineeprom": 0, "f_e_inele": 0, "f_e_infanmotor": 0, "f_e_inhumidity": 0, "f_e_inkeys": 0, "f_e_inlow": 0, "f_e_intemp": 0, "f_e_invzero": 0, "f_e_outcoiltemp": 0, "f_e_outeeprom": 0, "f_e_outgastemp": 0, "f_e_outmachine2": 0, "f_e_outmachine": 0, "f_e_outtemp": 0, "f_e_outtemplow": 0, "f_e_push": 0, "f_filterclean": 0, "f_humidity": 0, "f_power_display": 0, "f_temp_in": 26.0, "f_voltage": 0, "t_backlight": "ON", "t_control_value": 3408897, "t_device_info": 0, "t_display_power": null, "t_eco": "OFF", "t_fan_leftright": "OFF", "t_fan_mute": "OFF", "t_fan_power": "OFF", "t_fan_speed": "AUTO", "t_ftkt_start": 0, "t_power": "OFF", "t_run_mode": "OFF", "t_setmulti_value": null, "t_sleep": "STOP", "t_temp": 81, "t_temptype": "FAHRENHEIT", "t_temp_eight": "OFF", "t_temp_heatcold": "OFF", "t_work_mode": "COOL"}

The question is: why I have f_temp_in in Celsious and t_temp in Fahrenheit? I should have everything in Celsious. If I change the temperature to 24°C on Home Assistant, t_temp changes from 81 to 24; it means that I'm asking the AC to set the temperature to 24 Fahrenheit (-4C°)! I think that this is wrong. Do I miss something? Should I leave the configuration in Fahrenheit?

max_temp: "86"
min_temp: "61"
temperature_unit: "F"

Thank you for your support.

karlkar commented 4 years ago

@wifi75 simply add to your home assistant's yaml config mode "off". It should look like this:

    modes:
      - "off"
      - "fan_only"
      - "heat"
      - "cool"
      - "dry"
      - "auto"

about that temperature - it is current temperature in the room?

wifi75 commented 4 years ago

@karlkar the Home assistant configuration.yaml maybe it is not complete,

If you try to change the temperature or the work mode (as COOL, DRY, FAN), the AC get it?

Yes I try and work all mode (cool,dry,fan and dry) also the fan speed not work : swing type vertical and orizzontal preset mode: economy, quiet ecc...

wifi75 commented 4 years ago

@wifi75 simply add to your home assistant's yaml config mode "off". It should look like this:

about that temperature - it is current temperature in the room?

no refers to the temperature to be reached

karlkar commented 4 years ago

So that huge number is current temp? If you want to enable vertical swing mode, add to your yaml

swing_modes:
      - "on"
      - "off"
wifi75 commented 4 years ago

I also insert on HA off like your instruction:

modes:

but not start only power off

now the temperature of the sets has also appeared ... I don't understand why now there is! image

karlkar commented 4 years ago

Horizontal air flow would not be that easy to add, as well as eco, quiet I will not work on that. I'll carry on creating official integration to HA, so that mqtt isn't necessary

wifi75 commented 4 years ago

@karlkar there is something wrong yet let me explain: when I restart it and the AC is off in HA it seems on instead it isn't, it should appear off instead on HA it shows the last command given, in my case COOL. in my opinion the image should be gray instead it is blue, just because HA reads the state of the last selected mode (COOL) maybe it should read the state t_power instead and shows the item off image

this below it is another differet script for Samsung AC: image

iut is off and also the set temperature of the curve remained where I had left it before ...

wifi75 commented 4 years ago

Horizontal air flow would not be that easy to add, as well as eco, quiet I will not work on that. I'll carry on creating official integration to HA, so that mqtt isn't necessary

a pity, in HA it would be very useful for the various modes of automatic configurations that a user can create for example when he reaches a certain temperature then he switches to quiet mode.

iw5edv commented 4 years ago

@karlkar the Home assistant configuration.yaml maybe it is not complete,

If you try to change the temperature or the work mode (as COOL, DRY, FAN), the AC get it?

Yes I try and work all mode (cool,dry,fan and dry) also the fan speed not work : swing type vertical and orizzontal preset mode: economy, quiet ecc...

I have tried with W4E1 The mode is ok (cool,dry ecc...) Fan speed not work, not send the t_fan_speed on MQTT and does not respond to the command t_temp not send in MQTT and does not respond to the command t_power ok work sleep swing ecc not test

now I try von W4B1

iw5edv commented 4 years ago

I have tried with W4B1 Not work TX e RX command and status on MQTT but it doesn't run on AC

iw5edv commented 4 years ago

I have tried with W4B1 Not work TX e RX command and status on MQTT but it doesn't run on AC

sorry W4B1 works well only slow to run the commands on the machine

iw5edv commented 4 years ago

I tried again after resetting the server on W4E1

t_power ok works well t_work_mode ok works well t_fan_speed executes the command on the machine but does not transmit status in MQTT t_temp executes the command on the machine but does not transmit status in MQTT t_fan_power not work not transmit status in MQTT and not execute on the machine

sleep ecc not test

karlkar commented 4 years ago

Is there anything useful in logs?

karlkar commented 4 years ago

t_fan_power should work after pulling the newest version

iw5edv commented 4 years ago

t_fan_power now work executes the command on the machine but does not transmit status in MQTT

192.168.178.52 - - [14/Jul/2020 16:02:54] "POST /local_lan/key_exchange.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:54] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:54] "POST /local_lan/property/datapoint.json?cmd_id=0&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:54] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:54] "POST /local_lan/property/datapoint.json?cmd_id=1&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:54] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:54] "POST /local_lan/property/datapoint.json?cmd_id=2&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:54] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:54] "POST /local_lan/property/datapoint.json?cmd_id=3&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:54] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:54] "POST /local_lan/property/datapoint.json?cmd_id=4&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:54] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:54] "POST /local_lan/property/datapoint.json?cmd_id=5&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:54] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "POST /local_lan/property/datapoint.json?cmd_id=6&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "POST /local_lan/property/datapoint.json?cmd_id=7&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "POST /local_lan/property/datapoint.json?cmd_id=8&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "POST /local_lan/property/datapoint.json?cmd_id=9&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "POST /local_lan/property/datapoint.json?cmd_id=10&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "POST /local_lan/property/datapoint.json?cmd_id=11&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "POST /local_lan/property/datapoint.json?cmd_id=12&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "POST /local_lan/property/datapoint.json?cmd_id=13&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "POST /local_lan/property/datapoint.json?cmd_id=14&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "POST /local_lan/property/datapoint.json?cmd_id=15&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "POST /local_lan/property/datapoint.json?cmd_id=16&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:55] "POST /local_lan/property/datapoint.json?cmd_id=17&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "POST /local_lan/property/datapoint.json?cmd_id=18&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "POST /local_lan/property/datapoint.json?cmd_id=19&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "POST /local_lan/property/datapoint.json?cmd_id=20&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "POST /local_lan/property/datapoint.json?cmd_id=21&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "POST /local_lan/property/datapoint.json?cmd_id=22&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "POST /local_lan/property/datapoint.json?cmd_id=23&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "POST /local_lan/property/datapoint.json?cmd_id=24&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "POST /local_lan/property/datapoint.json?cmd_id=25&status=404 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "POST /local_lan/property/datapoint.json?cmd_id=26&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "POST /local_lan/property/datapoint.json?cmd_id=27&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:56] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "POST /local_lan/property/datapoint.json?cmd_id=28&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "POST /local_lan/property/datapoint.json?cmd_id=29&status=404 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "POST /local_lan/property/datapoint.json?cmd_id=30&status=404 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "POST /local_lan/property/datapoint.json?cmd_id=31&status=404 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "POST /local_lan/property/datapoint.json?cmd_id=32&status=404 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "POST /local_lan/property/datapoint.json?cmd_id=33&status=404 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "POST /local_lan/property/datapoint.json?cmd_id=34&status=404 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "POST /local_lan/property/datapoint.json?cmd_id=35&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "POST /local_lan/property/datapoint.json?cmd_id=36&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "POST /local_lan/property/datapoint.json?cmd_id=37&status=404 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "POST /local_lan/property/datapoint.json?cmd_id=38&status=404 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:57] "POST /local_lan/property/datapoint.json?cmd_id=39&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:58] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:58] "POST /local_lan/property/datapoint.json?cmd_id=40&status=404 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:58] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:58] "POST /local_lan/property/datapoint.json?cmd_id=41&status=404 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:58] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:58] "POST /local_lan/property/datapoint.json?cmd_id=42&status=404 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:58] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:58] "POST /local_lan/property/datapoint.json?cmd_id=43&status=404 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:58] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:58] "POST /local_lan/property/datapoint.json?cmd_id=44&status=200 HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:02:58] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:03:18] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:03:28] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:03:38] "GET /local_lan/commands.json HTTP/1.1" 200 - 192.168.178.52 - - [14/Jul/2020 16:05:19] "GET /local_lan/commands.json HTTP/1.1" 200 -

the last two lines are on off t_fan_power

iw5edv commented 4 years ago

the comman --log_level not work

usage: main.py [-h] [--log_level {DEBUG,CRITICAL,INFO,WARNING,ERROR}] {run,discovery} ... main.py: error: unrecognized arguments: --log_level debug

karlkar commented 4 years ago

It's case sensitive and should be placed before discovery or run

Ras195 commented 4 years ago

It's case sensitive and should be placed before discovery or run

Hi kalkar, when I execute:

root@hassio:/home/hassio/AirCon# python3.8 -m aircon run -p 8891 --ip 172.17.8.6 --config config_cucina.json --type ac --mqtt_host 172.17.8.170 --mqtt_user mqtt_user:password

I get

usage: __main__.py [-h] [--log_level {CRITICAL,WARNING,INFO,ERROR,DEBUG}] {run,discovery} ...
__main__.py: error: unrecognized arguments: --ip 172.17.8.6

it does not like my subnet?

karlkar commented 4 years ago

I'm still working on that branch... I've changed the config file, so it contains now device name and ip. Please run the discovery to get the new config file structure and then execute run without passing any ip - only --config and --type There are also some changes to the MQTT topic, as it was not working correctly when user had several devices.

Ras195 commented 4 years ago

I'm still working on that branch... I've changed the config file, so it contains now device name and ip. Please run the discovery to get the new config file structure and then execute run without passing any ip - only --config and --type There are also some changes to the MQTT topic, as it was not working correctly when user had several devices.

it seems to work:

root@hassio:/home/hassio/AirCon# python3.8 -m aircon run -p 8888 --config config_cameretta.json --type ac --mqtt_host 172.17.8.170 --mqtt_topic cameretta --mqtt_user mqtt_user:password
172.17.8.7 - - [15/Jul/2020 00:45:50] "POST /local_lan/key_exchange.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "POST /local_lan/property/datapoint.json?cmd_id=0&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "POST /local_lan/property/datapoint.json?cmd_id=1&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "POST /local_lan/property/datapoint.json?cmd_id=2&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "POST /local_lan/property/datapoint.json?cmd_id=3&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "POST /local_lan/property/datapoint.json?cmd_id=4&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "POST /local_lan/property/datapoint.json?cmd_id=5&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "POST /local_lan/property/datapoint.json?cmd_id=6&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "POST /local_lan/property/datapoint.json?cmd_id=7&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "POST /local_lan/property/datapoint.json?cmd_id=8&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:50] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:51] "POST /local_lan/property/datapoint.json?cmd_id=9&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:51] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:51] "POST /local_lan/property/datapoint.json?cmd_id=10&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:51] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:51] "POST /local_lan/property/datapoint.json?cmd_id=11&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:51] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:51] "POST /local_lan/property/datapoint.json?cmd_id=12&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:51] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:51] "POST /local_lan/property/datapoint.json?cmd_id=13&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:51] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:51] "POST /local_lan/property/datapoint.json?cmd_id=14&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:51] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:51] "POST /local_lan/property/datapoint.json?cmd_id=15&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:51] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:51] "POST /local_lan/property/datapoint.json?cmd_id=16&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:51] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:52] "POST /local_lan/property/datapoint.json?cmd_id=17&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:52] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:52] "POST /local_lan/property/datapoint.json?cmd_id=18&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:52] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:52] "POST /local_lan/property/datapoint.json?cmd_id=19&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:52] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:52] "POST /local_lan/property/datapoint.json?cmd_id=20&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:52] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:52] "POST /local_lan/property/datapoint.json?cmd_id=21&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:52] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:52] "POST /local_lan/property/datapoint.json?cmd_id=22&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:52] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:52] "POST /local_lan/property/datapoint.json?cmd_id=23&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:52] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:52] "POST /local_lan/property/datapoint.json?cmd_id=24&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:52] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:53] "POST /local_lan/property/datapoint.json?cmd_id=25&status=404 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:53] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:53] "POST /local_lan/property/datapoint.json?cmd_id=26&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:53] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:53] "POST /local_lan/property/datapoint.json?cmd_id=27&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:53] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:53] "POST /local_lan/property/datapoint.json?cmd_id=28&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:53] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:53] "POST /local_lan/property/datapoint.json?cmd_id=29&status=404 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:53] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:53] "POST /local_lan/property/datapoint.json?cmd_id=30&status=404 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:53] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:53] "POST /local_lan/property/datapoint.json?cmd_id=31&status=404 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:53] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:53] "POST /local_lan/property/datapoint.json?cmd_id=32&status=404 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:53] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "POST /local_lan/property/datapoint.json?cmd_id=33&status=404 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "POST /local_lan/property/datapoint.json?cmd_id=34&status=404 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "POST /local_lan/property/datapoint.json?cmd_id=35&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "POST /local_lan/property/datapoint.json?cmd_id=36&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "POST /local_lan/property/datapoint.json?cmd_id=37&status=404 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "POST /local_lan/property/datapoint.json?cmd_id=38&status=404 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "POST /local_lan/property/datapoint.json?cmd_id=39&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "POST /local_lan/property/datapoint.json?cmd_id=40&status=404 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:54] "POST /local_lan/property/datapoint.json?cmd_id=41&status=404 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:55] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:55] "POST /local_lan/property/datapoint.json?cmd_id=42&status=404 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:55] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:55] "POST /local_lan/property/datapoint.json?cmd_id=43&status=404 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:55] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:55] "POST /local_lan/property/datapoint.json?cmd_id=44&status=200 HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:45:55] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.10 - - [15/Jul/2020 00:46:02] "GET /hisense/status HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:47:36] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:48:13] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:49:18] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:50:59] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:51:29] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:51:30] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.10 - - [15/Jul/2020 00:51:55] "GET /hisense/status HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:02] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:03] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:06] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:06] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:21] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:21] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:36] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:36] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:41] "GET /local_lan/commands.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:43] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:43] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:47] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:47] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:51] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:51] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:58] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:52:58] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:53:02] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -
172.17.8.7 - - [15/Jul/2020 00:53:02] "POST /local_lan/property/datapoint.json HTTP/1.1" 200 -

If I execute:

root@hassio:/home/hassio# curl -ik 'http://172.17.8.10:8888/hisense/status'

I get:

HTTP/1.0 200 OK
Server: BaseHTTP/0.6 Python/3.8.2
Date: Tue, 14 Jul 2020 22:51:55 GMT
Content-type: application/json

{"devices": [{"ip": "172.17.8.7", "props": {"f_electricity": 1, "f_e_arkgrille": 0, "f_e_incoiltemp": 0, "f_e_incom": 0, "f_e_indisplay": 0, "f_e_ineeprom": 0, "f_e_inele": 0, "f_e_infanmotor": 0, "f_e_inhumidity": 0, "f_e_inkeys": 0, "f_e_inlow": 0, "f_e_intemp": 0, "f_e_invzero": 0, "f_e_outcoiltemp": 0, "f_e_outeeprom": 0, "f_e_outgastemp": 0, "f_e_outmachine2": 0, "f_e_outmachine": 0, "f_e_outtemp": 0, "f_e_outtemplow": 0, "f_e_push": 0, "f_filterclean": 0, "f_humidity": 0, "f_power_display": 0, "f_temp_in": 25.0, "f_voltage": 0, "t_backlight": "ON", "t_control_value": 3147328, "t_device_info": 0, "t_display_power": null, "t_eco": "OFF", "t_fan_leftright": "OFF", "t_fan_mute": "OFF", "t_fan_power": "OFF", "t_fan_speed": "AUTO", "t_ftkt_start": 0, "t_power": "ON", "t_run_mode": "OFF", "t_setmulti_value": null, "t_sleep": "STOP", "t_temp": 81, "t_temptype": "FAHRENHEIT", "t_temp_eight": "OFF", "t_temp_heatcold": "OFF", "t_work_mode": "DRY"}}]}root@hassio:/home/hassio#

but on HA I do not have the control of the AC

image

maybe the /config/configuration.yaml is wrong, I use this one:

switch:
  - platform: mqtt
    name: "HiSense AC Cameretta"
    command_topic: "cameretta/t_power/command"
    state_topic: "cameretta/t_power/status"
    payload_on: "on"
    payload_off: "off"
    qos: 1

climate:
  - platform: mqtt
    name: "HiSense AC Cameretta"
    current_temperature_topic: "cameretta/f_temp_in/status"
    fan_mode_command_topic: "cameretta/t_fan_speed/command"
    fan_mode_state_topic: "cameretta/t_fan_speed/status"
    fan_modes:
      - "auto"
      - "lower"
      - "low"
      - "medium"
      - "high"
      - "higher"
    max_temp: "30"
    min_temp: "16"
    mode_command_topic: "cameretta/t_work_mode/command"
    mode_state_topic: "cameretta/t_work_mode/status"
    modes:
      - "fan_only"
      - "heat"
      - "cool"
      - "dry"
      - "auto"
    power_command_topic: "cameretta/t_power/command"
    power_state_topic: "cameretta/t_power/status"
    precision: 1.0
    swing_mode_command_topic: "cameretta/t_fan_power/command"
    swing_mode_state_topic: "cameretta/t_fan_power/status"
    temperature_command_topic: "cameretta/t_temp/command"
    temperature_state_topic: "cameretta/t_temp/status"
    temperature_unit: "C"
karlkar commented 4 years ago

Topic in ha is wrong. I think that topics should follow the schema platform/device/property/action So here I've allowed to set the topic using argument --mqtt_topic (platform part) After that we have a device name - taken from config json. And after that values depending on what have changed. So if you want to set your topic to cameretta, like you do, than in ha you should have topics ex. cameretta/cameretta/t_temp/status When you will skip --mqtt_topic argument than you will get hisense_ac/cameretta/t_temp/status

belladieg commented 4 years ago

I did some tests and it worked well; how can I activate the script as a service?

Ras195 commented 4 years ago

Hi karlkar, I made several test and I discovered 4 issues. I hope you can fix them. Herebelow you have all details.

1) -------------------------------------------------------

This is the initial AC state:

Jul 15 07:00:39 hassio D0715 09:00:39.914 query_handlers.py:117] Response:#012{"devices": [{"ip": "172.17.8.7", "props": {"f_electricity": 0, "f_e_arkgrille": 0, "f_e_incoiltemp": 0, "f_e_incom": 0, "f_e_indisplay": 0, "f_e_ineeprom": 0, "f_e_inele": 0, "f_e_infanmotor": 0, "f_e_inhumidity": 0, "f_e_inkeys": 0, "f_e_inlow": 0, "f_e_intemp": 0, "f_e_invzero": 0, "f_e_outcoiltemp": 0, "f_e_outeeprom": 0, "f_e_outgastemp": 0, "f_e_outmachine2": 0, "f_e_outmachine": 0, "f_e_outtemp": 0, "f_e_outtemplow": 0, "f_e_push": 0, "f_filterclean": 0, "f_humidity": 0, "f_power_display": 0, "f_temp_in": 27.0, "f_voltage": 0, "t_backlight": "ON", "t_control_value": 3539968, "t_device_info": 0, "t_display_power": null, "t_eco": "OFF", "t_fan_leftright": "OFF", "t_fan_mute": "OFF", "t_fan_power": "OFF", "t_fan_speed": "AUTO", "t_ftkt_start": 0, "t_power": "OFF", "t_run_mode": "OFF", "t_setmulti_value": null, "t_sleep": "STOP", "t_temp": 81, "t_temptype": "FAHRENHEIT", "t_temp_eight": "OFF", "t_temp_heatcold": "OFF", "t_work_mode": "COOL"}}]}

image

I switch the AC on by HA:

image

Jul 15 07:05:15 hassio D0715 09:05:15.748 main.py:79] [KeepAlive] PUT 172.17.8.7/local_reg.json {"local_reg": {"ip": "172.17.8.10", "notify": 1, "port": 8888, "uri": "/local_lan"}} Jul 15 07:05:15 hassio D0715 09:05:15.916 main.py:117] [KeepAlive] Waiting for notification or timeout Jul 15 07:05:16 hassio D0715 09:05:16.019 main.py:195] GET Request from 172.17.8.7,#012Path: /local_lan/commands.json Jul 15 07:05:16 hassio D0715 09:05:16.023 query_handlers.py:122] Encrypting: {"seq_no": 49, "data": {"properties": [{"property": {"base_type": "integer", "name": "t_control_value", "value": 3540064, "id": "KVqa5FC5"}}]}} Jul 15 07:05:16 hassio D0715 09:05:16.027 query_handlers.py:117] Response:#012{"enc": "ikfpGxa/DVMesQjgHgyCYkSA/Kytta2Efw7z+GK9hBzzWAb3K6/bmU0qCIaukMCJGMQ7ZvLqyy7VyR/RfPSUgZmr3CJ0cGpFJv0cMqJUfrffTv7OZ06p6uka5n2ECcXc03VkgplF3Enn70DRPGYuN5ZB/4p+CQnnevlaSUqoh+qLTY0x2+RcL6yTDqIjKnJO", "sign": "/F4T1KCJvcMYNyZcz0V5H7ckGKG9MmZUPHQbJ0jjq3I="} Jul 15 07:05:16 hassio D0715 09:05:16.034 aircon.py:60] Updated properties: AcProperties(f_electricity=0, f_e_arkgrille=0, f_e_incoiltemp=0, f_e_incom=0, f_e_indisplay=0, f_e_ineeprom=0, f_e_inele=0, f_e_infanmotor=0, f_e_inhumidity=0, f_e_inkeys=0, f_e_inlow=0, f_e_intemp=0, f_e_invzero=0, f_e_outcoiltemp=0, f_e_outeeprom=0, f_e_outgastemp=0, f_e_outmachine2=0, f_e_outmachine=0, f_e_outtemp=0, f_e_outtemplow=0, f_e_push=0, f_filterclean=0, f_humidity=0, f_power_display=0, f_temp_in=27.0, f_voltage=0, t_backlight=<Dimmer.ON: 0>, t_control_value=3540064, t_device_info=0, t_display_power=None, t_eco=<Economy.OFF: 0>, t_fan_leftright=<AirFlow.OFF: 0>, t_fan_mute=<Quiet.OFF: 0>, t_fan_power=<AirFlow.OFF: 0>, t_fan_speed=<FanSpeed.AUTO: 0>, t_ftkt_start=0, t_power=<Power.OFF: 0>, t_run_mode=<DoubleFrequency.OFF: 0>, t_setmulti_value=None, t_sleep=<SleepMode.STOP: 0>, t_temp=81, t_temptype=<TemperatureUnit.FAHRENHEIT: 1>, t_temp_eight=<EightHeat.OFF: 0>, t_temp_heatcold=<FastColdHeat.OFF: 0>, t_work_mode=<AcWorkMode.COOL: 2>) Jul 15 07:05:16 hassio D0715 09:05:16.765 main.py:212] POST request from 172.17.8.7,#012Path: /local_lan/property/datapoint.json?echo=true#012Headers:#012Host: 172.17.8.10#012Content-Length: 152#012Content-Type: application/json#012#012#012#012Body:#012{"enc":"DKRjSsRpbkE31Mr8VOIiIOlFQ0FXy4d8OlZrYfqgyfkRmlLV1ZEOQ3gr6C6W08+mAzWLinUEdVpJOkSXxj6C1A==","sign":"1jDcu0pkNwwqhP0TqN3XyqVvGxmzClgxN1GNxYYiZP4="} Jul 15 07:05:16 hassio I0715 09:05:16.767 query_handlers.py:135] Decrypted: {"seq_no":987,"data":{"name":"t_power","value":1}} Jul 15 07:05:16 hassio D0715 09:05:16.769 query_handlers.py:117] Response:#012null Jul 15 07:05:16 hassio D0715 09:05:16.772 aircon.py:60] Updated properties: AcProperties(f_electricity=0, f_e_arkgrille=0, f_e_incoiltemp=0, f_e_incom=0, f_e_indisplay=0, f_e_ineeprom=0, f_e_inele=0, f_e_infanmotor=0, f_e_inhumidity=0, f_e_inkeys=0, f_e_inlow=0, f_e_intemp=0, f_e_invzero=0, f_e_outcoiltemp=0, f_e_outeeprom=0, f_e_outgastemp=0, f_e_outmachine2=0, f_e_outmachine=0, f_e_outtemp=0, f_e_outtemplow=0, f_e_push=0, f_filterclean=0, f_humidity=0, f_power_display=0, f_temp_in=27.0, f_voltage=0, t_backlight=<Dimmer.ON: 0>, t_control_value=3540064, t_device_info=0, t_display_power=None, t_eco=<Economy.OFF: 0>, t_fan_leftright=<AirFlow.OFF: 0>, t_fan_mute=<Quiet.OFF: 0>, t_fan_power=<AirFlow.OFF: 0>, t_fan_speed=<FanSpeed.AUTO: 0>, t_ftkt_start=0, t_power=<Power.ON: 1>, t_run_mode=<DoubleFrequency.OFF: 0>, t_setmulti_value=None, t_sleep=<SleepMode.STOP: 0>, t_temp=81, t_temptype=<TemperatureUnit.FAHRENHEIT: 1>, t_temp_eight=<EightHeat.OFF: 0>, t_temp_heatcold=<FastColdHeat.OFF: 0>, t_work_mode=<AcWorkMode.COOL: 2>)

on HA does not change anything

image

I try to set the temperature but HA does not show it and the AC does not get it any changes (the display is still 27)

image

Jul 15 07:07:12 hassio D0715 09:07:12.885 main.py:212] POST request from 172.17.8.7,#012Path: /local_lan/property/datapoint.json#012Headers:#012Host: 172.17.8.10#012Content-Length: 152#012Content-Type: application/json#012#012#012#012Body:#012{"enc":"oabrXE210xXMkn0Wp0eBaAzS4Syos8np2v4k2FI5XEgNtSLyclCxT80RiC9vZthTY1vY7tSOn8tpjB3AxCPdag==","sign":"wC/z5Oq4r2O5zeZ6CEuTHuWC54+3miYTBZoRV2h/y8w="} Jul 15 07:07:12 hassio I0715 09:07:12.888 query_handlers.py:135] Decrypted: {"seq_no":992,"data":{"name":"f_electricity","value":1}} Jul 15 07:07:12 hassio D0715 09:07:12.891 query_handlers.py:117] Response:#012null Jul 15 07:07:12 hassio D0715 09:07:12.898 aircon.py:60] Updated properties: AcProperties(f_electricity=1, f_e_arkgrille=0, f_e_incoiltemp=0, f_e_incom=0, f_e_indisplay=0, f_e_ineeprom=0, f_e_inele=0, f_e_infanmotor=0, f_e_inhumidity=0, f_e_inkeys=0, f_e_inlow=0, f_e_intemp=0, f_e_invzero=0, f_e_outcoiltemp=0, f_e_outeeprom=0, f_e_outgastemp=0, f_e_outmachine2=0, f_e_outmachine=0, f_e_outtemp=0, f_e_outtemplow=0, f_e_push=0, f_filterclean=0, f_humidity=0, f_power_display=0, f_temp_in=27.0, f_voltage=0, t_backlight=<Dimmer.ON: 0>, t_control_value=3540064, t_device_info=0, t_display_power=None, t_eco=<Economy.OFF: 0>, t_fan_leftright=<AirFlow.OFF: 0>, t_fan_mute=<Quiet.OFF: 0>, t_fan_power=<AirFlow.OFF: 0>, t_fan_speed=<FanSpeed.AUTO: 0>, t_ftkt_start=0, t_power=<Power.ON: 1>, t_run_mode=<DoubleFrequency.OFF: 0>, t_setmulti_value=None, t_sleep=<SleepMode.STOP: 0>, t_temp=81, t_temptype=<TemperatureUnit.FAHRENHEIT: 1>, t_temp_eight=<EightHeat.OFF: 0>, t_temp_heatcold=<FastColdHeat.OFF: 0>, t_work_mode=<AcWorkMode.COOL: 2>) Jul 15 07:07:14 hassio multipathd[677]: sda: add missing path Jul 15 07:07:14 hassio multipathd[677]: sda: failed to get udev uid: Invalid argument Jul 15 07:07:14 hassio multipathd[677]: sda: failed to get sysfs uid: Invalid argument Jul 15 07:07:14 hassio multipathd[677]: sda: failed to get sgio uid: No such file or directory Jul 15 07:07:14 hassio D0715 09:07:14.113 main.py:212] POST request from 172.17.8.7,#012Path: /local_lan/property/datapoint.json#012Headers:#012Host: 172.17.8.10#012Content-Length: 152#012Content-Type: application/json#012#012#012#012Body:#012{"enc":"i3iouMzv5yFT0YMOOwVS+BUlbLHpxFez1+/waKVys9U31NozlCsRcGpXVqjxeBqbY68HmCwNi3DwYAeEbXO7ag==","sign":"cpohwGfFPjTXFVtN80uczxkzL/0pVq6F6v07Bw3z1SQ="} Jul 15 07:07:14 hassio I0715 09:07:14.115 query_handlers.py:135] Decrypted: {"seq_no":993,"data":{"name":"f_power_display","value":0}} Jul 15 07:07:14 hassio D0715 09:07:14.117 query_handlers.py:117] Response:#012null Jul 15 07:07:15 hassio I0715 09:07:15.547 mqtt_client.py:27] MQTT message Topic: 'cameretta/Cameretta/t_temp/command', Payload b'25.0' Jul 15 07:07:16 hassio D0715 09:07:16.570 main.py:212] POST request from 172.17.8.7,#012Path: /local_lan/property/datapoint.json#012Headers:#012Host: 172.17.8.10#012Content-Length: 152#012Content-Type: application/json#012#012#012#012Body:#012{"enc":"hdxfJZeXrfh4lRfDgRLXnDL9/egy15ugDRpGaEC6llK8LwA1XZjD66pEqjJFGDrWX2n6zzaauAdBX5FlYuaViQ==","sign":"DGCULqZHRFKEslI+E9RXpwleFTdw7NSjJ6XcBki1hSk="} Jul 15 07:07:16 hassio I0715 09:07:16.573 query_handlers.py:135] Decrypted: {"seq_no":994,"data":{"name":"f_electricity","value":2}} Jul 15 07:07:16 hassio D0715 09:07:16.575 query_handlers.py:117] Response:#012null Jul 15 07:07:16 hassio D0715 09:07:16.581 aircon.py:60] Updated properties: AcProperties(f_electricity=2, f_e_arkgrille=0, f_e_incoiltemp=0, f_e_incom=0, f_e_indisplay=0, f_e_ineeprom=0, f_e_inele=0, f_e_infanmotor=0, f_e_inhumidity=0, f_e_inkeys=0, f_e_inlow=0, f_e_intemp=0, f_e_invzero=0, f_e_outcoiltemp=0, f_e_outeeprom=0, f_e_outgastemp=0, f_e_outmachine2=0, f_e_outmachine=0, f_e_outtemp=0, f_e_outtemplow=0, f_e_push=0, f_filterclean=0, f_humidity=0, f_power_display=0, f_temp_in=27.0, f_voltage=0, t_backlight=<Dimmer.ON: 0>, t_control_value=3540064, t_device_info=0, t_display_power=None, t_eco=<Economy.OFF: 0>, t_fan_leftright=<AirFlow.OFF: 0>, t_fan_mute=<Quiet.OFF: 0>, t_fan_power=<AirFlow.OFF: 0>, t_fan_speed=<FanSpeed.AUTO: 0>, t_ftkt_start=0, t_power=<Power.ON: 1>, t_run_mode=<DoubleFrequency.OFF: 0>, t_setmulti_value=None, t_sleep=<SleepMode.STOP: 0>, t_temp=81, t_temptype=<TemperatureUnit.FAHRENHEIT: 1>, t_temp_eight=<EightHeat.OFF: 0>, t_temp_heatcold=<FastColdHeat.OFF: 0>, t_work_mode=<AcWorkMode.COOL: 2>) Jul 15 07:07:16 hassio D0715 09:07:16.819 main.py:212] POST request from 172.17.8.7,#012Path: /local_lan/property/datapoint.json#012Headers:#012Host: 172.17.8.10#012Content-Length: 152#012Content-Type: application/json#012#012#012#012Body:#012{"enc":"K1QoZTUM1Jw9KqWqjhiEQHlXuADsyA4vE5HmGX/3QSW3DQvfImEiY1Jhr3gIgy8+/sc8X4Ee0oi7UD79/B3skw==","sign":"cv//aJ2q3HXLVmhOM4+aGeV4CbDYSh/SSoPfQPgIbwI="} Jul 15 07:07:16 hassio I0715 09:07:16.821 query_handlers.py:135] Decrypted: {"seq_no":995,"data":{"name":"f_power_display","value":0}} Jul 15 07:07:16 hassio D0715 09:07:16.823 query_handlers.py:117] Response:#012null Jul 15 07:07:18 hassio D0715 09:07:18.386 main.py:79] [KeepAlive] PUT 172.17.8.7/local_reg.json {"local_reg": {"ip": "172.17.8.10", "notify": 1, "port": 8888, "uri": "/local_lan"}} Jul 15 07:07:18 hassio D0715 09:07:18.590 main.py:117] [KeepAlive] Waiting for notification or timeout Jul 15 07:07:18 hassio D0715 09:07:18.692 main.py:195] GET Request from 172.17.8.7,#012Path: /local_lan/commands.json Jul 15 07:07:18 hassio D0715 09:07:18.694 query_handlers.py:122] Encrypting: {"seq_no": 51, "data": {"properties": [{"property": {"base_type": "integer", "name": "t_control_value", "value": 3343456, "id": "9uSkDsRf"}}]}} Jul 15 07:07:18 hassio D0715 09:07:18.698 query_handlers.py:117] Response:#012{"enc": "cQ64U67jxu+PeVkam37mdOGWIdMYjx0nz8Gn912SswsmaTY4Dy1Eck/myVfaOb3VIeUHLbXYtWCOIKiPkNn7Cs4BXuCuucF+3G+SE7MFGGEP8WOEpLCMBIaGgEJjUejZJPjCR9vy+DDM8hur0TaItH2UYAaOihFjyhpn52arLVUy2u+f2/WA+qKMbwBlN2D7", "sign": "3aB8Wpq6SFTdYKeeQ4Fg5zRXEv/BXu6GuVYNBPY8Ag8="} Jul 15 07:07:18 hassio D0715 09:07:18.702 aircon.py:60] Updated properties: AcProperties(f_electricity=2, f_e_arkgrille=0, f_e_incoiltemp=0, f_e_incom=0, f_e_indisplay=0, f_e_ineeprom=0, f_e_inele=0, f_e_infanmotor=0, f_e_inhumidity=0, f_e_inkeys=0, f_e_inlow=0, f_e_intemp=0, f_e_invzero=0, f_e_outcoiltemp=0, f_e_outeeprom=0, f_e_outgastemp=0, f_e_outmachine2=0, f_e_outmachine=0, f_e_outtemp=0, f_e_outtemplow=0, f_e_push=0, f_filterclean=0, f_humidity=0, f_power_display=0, f_temp_in=27.0, f_voltage=0, t_backlight=<Dimmer.ON: 0>, t_control_value=3343456, t_device_info=0, t_display_power=None, t_eco=<Economy.OFF: 0>, t_fan_leftright=<AirFlow.OFF: 0>, t_fan_mute=<Quiet.OFF: 0>, t_fan_power=<AirFlow.OFF: 0>, t_fan_speed=<FanSpeed.AUTO: 0>, t_ftkt_start=0, t_power=<Power.ON: 1>, t_run_mode=<DoubleFrequency.OFF: 0>, t_setmulti_value=None, t_sleep=<SleepMode.STOP: 0>, t_temp=81, t_temptype=<TemperatureUnit.FAHRENHEIT: 1>, t_temp_eight=<EightHeat.OFF: 0>, t_temp_heatcold=<FastColdHeat.OFF: 0>, t_work_mode=<AcWorkMode.COOL: 2>) Jul 15 07:07:19 hassio multipathd[677]: sda: add missing path Jul 15 07:07:19 hassio multipathd[677]: sda: failed to get udev uid: Invalid argument Jul 15 07:07:19 hassio multipathd[677]: sda: failed to get sysfs uid: Invalid argument Jul 15 07:07:19 hassio multipathd[677]: sda: failed to get sgio uid: No such file or directory Jul 15 07:07:19 hassio D0715 09:07:19.174 main.py:212] POST request from 172.17.8.7,#012Path: /local_lan/property/datapoint.json?echo=true#012Headers:#012Host: 172.17.8.10#012Content-Length: 152#012Content-Type: application/json#012#012#012#012Body:#012{"enc":"r+cpYwqo3p8vEUi/f21C7rigDh/jbuI7PdaMMjY30PkHPMSccBS+njYJPA+jk9KWaMHGbcKtGbKkFyGnCfRRnQ==","sign":"3wLvvWCMCGaMEUZKdN+o7MesPC4YlUFTaRfeV9Fpa2I="} Jul 15 07:07:19 hassio I0715 09:07:19.176 query_handlers.py:135] Decrypted: {"seq_no":996,"data":{"name":"t_control_value","value":3540032}} Jul 15 07:07:19 hassio D0715 09:07:19.177 query_handlers.py:117] Response:#012null Jul 15 07:07:19 hassio D0715 09:07:19.181 aircon.py:60] Updated properties: AcProperties(f_electricity=2, f_e_arkgrille=0, f_e_incoiltemp=0, f_e_incom=0, f_e_indisplay=0, f_e_ineeprom=0, f_e_inele=0, f_e_infanmotor=0, f_e_inhumidity=0, f_e_inkeys=0, f_e_inlow=0, f_e_intemp=0, f_e_invzero=0, f_e_outcoiltemp=0, f_e_outeeprom=0, f_e_outgastemp=0, f_e_outmachine2=0, f_e_outmachine=0, f_e_outtemp=0, f_e_outtemplow=0, f_e_push=0, f_filterclean=0, f_humidity=0, f_power_display=0, f_temp_in=27.0, f_voltage=0, t_backlight=<Dimmer.ON: 0>, t_control_value=3540032, t_device_info=0, t_display_power=None, t_eco=<Economy.OFF: 0>, t_fan_leftright=<AirFlow.OFF: 0>, t_fan_mute=<Quiet.OFF: 0>, t_fan_power=<AirFlow.OFF: 0>, t_fan_speed=<FanSpeed.AUTO: 0>, t_ftkt_start=0, t_power=<Power.ON: 1>, t_run_mode=<DoubleFrequency.OFF: 0>, t_setmulti_value=None, t_sleep=<SleepMode.STOP: 0>, t_temp=81, t_temptype=<TemperatureUnit.FAHRENHEIT: 1>, t_temp_eight=<EightHeat.OFF: 0>, t_temp_heatcold=<FastColdHeat.OFF: 0>, t_work_mode=<AcWorkMode.COOL: 2>) Jul 15 07:07:19 hassio D0715 09:07:19.643 main.py:212] POST request from 172.17.8.7,#012Path: /local_lan/property/datapoint.json?echo=true#012Headers:#012Host: 172.17.8.10#012Content-Length: 152#012Content-Type: application/json#012#012#012#012Body:#012{"enc":"LfsirTc8c45WYBSXoqkmVWrmOf1TueL0J0VMX8T3uCcmmMXLYoAQui1o+G1alIXa7b8ZeZfhK30Fg4pLTzpKhg==","sign":"EoaNsTbKJyrB/2sRjBv8jUizTZJ2/R5nkZm3LqJRNp8="} Jul 15 07:07:19 hassio I0715 09:07:19.646 query_handlers.py:135] Decrypted: {"seq_no":997,"data":{"name":"t_work_mode","value":2}} Jul 15 07:07:19 hassio D0715 09:07:19.648 query_handlers.py:117] Response:#012null Jul 15 07:07:20 hassio D0715 09:07:20.228 main.py:212] POST request from 172.17.8.7,#012Path: /local_lan/property/datapoint.json#012Headers:#012Host: 172.17.8.10#012Content-Length: 152#012Content-Type: application/json#012#012#012#012Body:#012{"enc":"T6uFXaAWGLUMZpH/NVoUZtT0oErSUcYPfPTMYyzj8+avnOwvuxkdEQEIqOl5hS79Qm6HWBovfXYmvg7WSsMF8g==","sign":"mLECL3rIPOAmoyL6bA7g7TtYP+P7u3jlMQ6nRrGPWPw="} Jul 15 07:07:20 hassio I0715 09:07:20.231 query_handlers.py:135] Decrypted: {"seq_no":998,"data":{"name":"f_electricity","value":1}} Jul 15 07:07:20 hassio D0715 09:07:20.233 query_handlers.py:117] Response:#012null Jul 15 07:07:20 hassio D0715 09:07:20.236 aircon.py:60] Updated properties: AcProperties(f_electricity=1, f_e_arkgrille=0, f_e_incoiltemp=0, f_e_incom=0, f_e_indisplay=0, f_e_ineeprom=0, f_e_inele=0, f_e_infanmotor=0, f_e_inhumidity=0, f_e_inkeys=0, f_e_inlow=0, f_e_intemp=0, f_e_invzero=0, f_e_outcoiltemp=0, f_e_outeeprom=0, f_e_outgastemp=0, f_e_outmachine2=0, f_e_outmachine=0, f_e_outtemp=0, f_e_outtemplow=0, f_e_push=0, f_filterclean=0, f_humidity=0, f_power_display=0, f_temp_in=27.0, f_voltage=0, t_backlight=<Dimmer.ON: 0>, t_control_value=3540032, t_device_info=0, t_display_power=None, t_eco=<Economy.OFF: 0>, t_fan_leftright=<AirFlow.OFF: 0>, t_fan_mute=<Quiet.OFF: 0>, t_fan_power=<AirFlow.OFF: 0>, t_fan_speed=<FanSpeed.AUTO: 0>, t_ftkt_start=0, t_power=<Power.ON: 1>, t_run_mode=<DoubleFrequency.OFF: 0>, t_setmulti_value=None, t_sleep=<SleepMode.STOP: 0>, t_temp=81, t_temptype=<TemperatureUnit.FAHRENHEIT: 1>, t_temp_eight=<EightHeat.OFF: 0>, t_temp_heatcold=<FastColdHeat.OFF: 0>, t_work_mode=<AcWorkMode.COOL: 2>) Jul 15 07:07:20 hassio D0715 09:07:20.667 main.py:212] POST request from 172.17.8.7,#012Path: /local_lan/property/datapoint.json#012Headers:#012Host: 172.17.8.10#012Content-Length: 152#012Content-Type: application/json#012#012#012#012Body:#012{"enc":"wotDp78F9VIv5b/VIg0BMrxCcFAkiLbeZlDy/kyY1a8mSPdVtXXAhnU6oyebvqcZhmsuIGyQMEzv1vNAMlAlbQ==","sign":"/8wG8ojnNZDdpXupgbkohzB6ruH7McZYwIBahqMvQUU="}

I set again the temperature a little bit more high, to 26°C, and now the HA shows the temperature and the AC get it (the display shows 26)

image

Jul 15 07:11:27 hassio D0715 09:11:27.836 main.py:79] [KeepAlive] PUT 172.17.8.7/local_reg.json {"local_reg": {"ip": "172.17.8.10", "notify": 1, "port": 8888, "uri": "/local_lan"}} Jul 15 07:11:27 hassio D0715 09:11:27.969 main.py:117] [KeepAlive] Waiting for notification or timeout Jul 15 07:11:28 hassio D0715 09:11:28.036 main.py:195] GET Request from 172.17.8.7,#012Path: /local_lan/commands.json Jul 15 07:11:28 hassio D0715 09:11:28.039 query_handlers.py:122] Encrypting: {"seq_no": 99, "data": {"properties": [{"property": {"base_type": "integer", "name": "t_control_value", "value": 3474496, "id": "8d7PU3uX"}}]}} Jul 15 07:11:28 hassio D0715 09:11:28.044 query_handlers.py:117] Response:#012{"enc": "NirffVNvVq7DhixrZRGcx6LuF90sEbtjTSvxjE897WwRIbxDzLWZDrcY+zqpmjSay1UqvJPHCtCDalkpdQXT6mINZKJ2vFOBKNmVKIgC52+qP1wsfCdoziMGtyyNfHSkFcR4ruFZz+jfOJC3st8AH647xsmaNX3pxJknRoemAWcm5PZZp2w+qNffgbGNezcg", "sign": "V/kWym7loKWAyngFEnUDmVh6rUZ23RC6KBWq8IayrsI="} Jul 15 07:11:28 hassio D0715 09:11:28.050 aircon.py:60] Updated properties: AcProperties(f_electricity=0, f_e_arkgrille=0, f_e_incoiltemp=0, f_e_incom=0, f_e_indisplay=0, f_e_ineeprom=0, f_e_inele=0, f_e_infanmotor=0, f_e_inhumidity=0, f_e_inkeys=0, f_e_inlow=0, f_e_intemp=0, f_e_invzero=0, f_e_outcoiltemp=0, f_e_outeeprom=0, f_e_outgastemp=0, f_e_outmachine2=0, f_e_outmachine=0, f_e_outtemp=0, f_e_outtemplow=0, f_e_push=0, f_filterclean=0, f_humidity=0, f_power_display=0, f_temp_in=25.0, f_voltage=0, t_backlight=<Dimmer.ON: 0>, t_control_value=3474496, t_device_info=0, t_display_power=None, t_eco=<Economy.OFF: 0>, t_fan_leftright=<AirFlow.OFF: 0>, t_fan_mute=<Quiet.OFF: 0>, t_fan_power=<AirFlow.OFF: 0>, t_fan_speed=<FanSpeed.AUTO: 0>, t_ftkt_start=0, t_power=<Power.ON: 1>, t_run_mode=<DoubleFrequency.OFF: 0>, t_setmulti_value=None, t_sleep=<SleepMode.STOP: 0>, t_temp=81, t_temptype=<TemperatureUnit.FAHRENHEIT: 1>, t_temp_eight=<EightHeat.OFF: 0>, t_temp_heatcold=<FastColdHeat.OFF: 0>, t_work_mode=<AcWorkMode.COOL: 2>)

if I change it again it works

image

Jul 15 07:13:50 hassio D0715 09:13:50.523 main.py:79] [KeepAlive] PUT 172.17.8.7/local_reg.json {"local_reg": {"ip": "172.17.8.10", "notify": 1, "port": 8888, "uri": "/local_lan"}} Jul 15 07:13:50 hassio D0715 09:13:50.657 main.py:117] [KeepAlive] Waiting for notification or timeout Jul 15 07:13:50 hassio D0715 09:13:50.782 main.py:195] GET Request from 172.17.8.7,#012Path: /local_lan/commands.json Jul 15 07:13:50 hassio D0715 09:13:50.788 query_handlers.py:122] Encrypting: {"seq_no": 101, "data": {"properties": [{"property": {"base_type": "integer", "name": "t_control_value", "value": 3343424, "id": "LaXgB67x"}}]}} Jul 15 07:13:50 hassio D0715 09:13:50.791 query_handlers.py:117] Response:#012{"enc": "b4UXwsoX1bHKR3tJdGfgSfdy/NFpt+BKSYXvXX7J4yk3xoL2EX+DtcfXCsTQVFJhx0FK89KYbjE6+i56Hu4FjLInUpxeanF5gw5bi1GXQC+ttDrwz0YLWjJmYCBpaOL23u36C0s11Au7YhGKC6eEPyxCF+VnIR6ctmZVMwin8RceGSkTBAFPigc+hxGAoPw6", "sign": "cOn2maGwJ925bDTTS9ouDt05KW9F0wE3ABo6RmyfUn8="} Jul 15 07:13:50 hassio D0715 09:13:50.795 aircon.py:60] Updated properties: AcProperties(f_electricity=0, f_e_arkgrille=0, f_e_incoiltemp=0, f_e_incom=0, f_e_indisplay=0, f_e_ineeprom=0, f_e_inele=0, f_e_infanmotor=0, f_e_inhumidity=0, f_e_inkeys=0, f_e_inlow=0, f_e_intemp=0, f_e_invzero=0, f_e_outcoiltemp=0, f_e_outeeprom=0, f_e_outgastemp=0, f_e_outmachine2=0, f_e_outmachine=0, f_e_outtemp=0, f_e_outtemplow=0, f_e_push=0, f_filterclean=0, f_humidity=0, f_power_display=0, f_temp_in=25.0, f_voltage=0, t_backlight=<Dimmer.ON: 0>, t_control_value=3343424, t_device_info=0, t_display_power=None, t_eco=<Economy.OFF: 0>, t_fan_leftright=<AirFlow.OFF: 0>, t_fan_mute=<Quiet.OFF: 0>, t_fan_power=<AirFlow.OFF: 0>, t_fan_speed=<FanSpeed.AUTO: 0>, t_ftkt_start=0, t_power=<Power.ON: 1>, t_run_mode=<DoubleFrequency.OFF: 0>, t_setmulti_value=None, t_sleep=<SleepMode.STOP: 0>, t_temp=81, t_temptype=<TemperatureUnit.FAHRENHEIT: 1>, t_temp_eight=<EightHeat.OFF: 0>, t_temp_heatcold=<FastColdHeat.OFF: 0>, t_work_mode=<AcWorkMode.COOL: 2>)

It seems that just the first time I switch on the AC and I try to set the temperature it does not work. From the second time, everything is fine.

2) --------------------------------------------------------------------- If I change from DRY to FAN, the AC it works ( I can see the new work mode on the HiSmart Life app), but on HA does not refresh the status

image

ul 15 07:38:01 hassio I0715 09:38:01.951 mqtt_client.py:27] MQTT message Topic: 'cameretta/Cameretta/t_work_mode/command', Payload b'fan_only' Jul 15 07:38:04 hassio multipathd[677]: sda: add missing path Jul 15 07:38:04 hassio multipathd[677]: sda: failed to get udev uid: Invalid argument Jul 15 07:38:04 hassio multipathd[677]: sda: failed to get sysfs uid: Invalid argument Jul 15 07:38:04 hassio multipathd[677]: sda: failed to get sgio uid: No such file or directory Jul 15 07:38:05 hassio D0715 09:38:05.472 main.py:79] [KeepAlive] PUT 172.17.8.7/local_reg.json {"local_reg": {"ip": "172.17.8.10", "notify": 1, "port": 8888, "uri": "/local_lan"}} Jul 15 07:38:05 hassio D0715 09:38:05.720 main.py:117] [KeepAlive] Waiting for notification or timeout Jul 15 07:38:05 hassio D0715 09:38:05.762 main.py:195] GET Request from 172.17.8.7,#012Path: /local_lan/commands.json Jul 15 07:38:05 hassio D0715 09:38:05.765 query_handlers.py:122] Encrypting: {"seq_no": 216, "data": {"properties": [{"property": {"base_type": "integer", "name": "t_control_value", "value": 3080522, "id": "oOC9itzc"}}]}} Jul 15 07:38:05 hassio D0715 09:38:05.768 query_handlers.py:117] Response:#012{"enc": "ou3JqONDJjJPgFHEw0U5HG/WSsjj2Rc2P7Mi+LbDKynjOD5j01U//e13CvbewvZ1XOMeD6Xuoj9kKFaZAqQsq8frrCMzIS6MTPYusg4OjEEvbJZZTxLq8gzNKEpPFBZqoX6P7NyvekNHWbb1rtMGPanLLoN0sDPgBMhWdHCiy4mxz0veMtRR4QSbBIwU8yyS", "sign": "IY0xXzoOWBsoArTYTFcAAwP+oY7bai/hwuh+ZSz4sgE="} Jul 15 07:38:05 hassio D0715 09:38:05.772 aircon.py:60] Updated properties: AcProperties(f_electricity=0, f_e_arkgrille=0, f_e_incoiltemp=0, f_e_incom=0, f_e_indisplay=0, f_e_ineeprom=0, f_e_inele=0, f_e_infanmotor=0, f_e_inhumidity=0, f_e_inkeys=0, f_e_inlow=0, f_e_intemp=0, f_e_invzero=0, f_e_outcoiltemp=0, f_e_outeeprom=0, f_e_outgastemp=0, f_e_outmachine2=0, f_e_outmachine=0, f_e_outtemp=0, f_e_outtemplow=0, f_e_push=0, f_filterclean=0, f_humidity=0, f_power_display=0, f_temp_in=25.0, f_voltage=0, t_backlight=<Dimmer.ON: 0>, t_control_value=3080522, t_device_info=0, t_display_power=None, t_eco=<Economy.OFF: 0>, t_fan_leftright=<AirFlow.OFF: 0>, t_fan_mute=<Quiet.OFF: 0>, t_fan_power=<AirFlow.OFF: 0>, t_fan_speed=<FanSpeed.AUTO: 0>, t_ftkt_start=0, t_power=<Power.ON: 1>, t_run_mode=<DoubleFrequency.OFF: 0>, t_setmulti_value=None, t_sleep=<SleepMode.STOP: 0>, t_temp=81, t_temptype=<TemperatureUnit.FAHRENHEIT: 1>, t_temp_eight=<EightHeat.OFF: 0>, t_temp_heatcold=<FastColdHeat.OFF: 0>, t_work_mode=<AcWorkMode.DRY: 3>)

but if I change to COOL the status refresh immediately

image

Jul 15 07:34:16 hassio I0715 09:34:16.744 mqtt_client.py:27] MQTT message Topic: 'cameretta/Cameretta/t_work_mode/command', Payload b'cool' Jul 15 07:34:18 hassio multipathd[677]: sda: add missing path Jul 15 07:34:18 hassio multipathd[677]: sda: failed to get udev uid: Invalid argument Jul 15 07:34:18 hassio multipathd[677]: sda: failed to get sysfs uid: Invalid argument Jul 15 07:34:18 hassio multipathd[677]: sda: failed to get sgio uid: No such file or directory Jul 15 07:34:21 hassio D0715 09:34:21.642 main.py:79] [KeepAlive] PUT 172.17.8.7/local_reg.json {"local_reg": {"ip": "172.17.8.10", "notify": 1, "port": 8888, "uri": "/local_lan"}} Jul 15 07:34:21 hassio D0715 09:34:21.813 main.py:117] [KeepAlive] Waiting for notification or timeout Jul 15 07:34:21 hassio D0715 09:34:21.877 main.py:195] GET Request from 172.17.8.7,#012Path: /local_lan/commands.json Jul 15 07:34:21 hassio D0715 09:34:21.879 query_handlers.py:122] Encrypting: {"seq_no": 212, "data": {"properties": [{"property": {"base_type": "integer", "name": "t_control_value", "value": 3212618, "id": "tufOE6Bk"}}]}} Jul 15 07:34:21 hassio D0715 09:34:21.880 query_handlers.py:117] Response:#012{"enc": "TmLTgSqSWiCsxJ97O4B853oSMTXNDeNYj8OOpRngcUKFqs7nDr69L2fAE6NY/NrxVwX+3Y0V7fbqaf329/wERwplrXYWSnUJHHxTjxdF9BwUmXXcCuZE4Ns02Efd1Kp0KtQYZrd5Eztuu2T1Dza7+uzfFf9H+AzPaU0/bWxSdxdUXZtRwfQ0fwZwoPjjA5J/", "sign": "Lsq7ruDED3oikamNuRnxWGPSX03ldNBT2Hkm9+TzWvk="} Jul 15 07:34:21 hassio D0715 09:34:21.884 aircon.py:60] Updated properties: AcProperties(f_electricity=0, f_e_arkgrille=0, f_e_incoiltemp=0, f_e_incom=0, f_e_indisplay=0, f_e_ineeprom=0, f_e_inele=0, f_e_infanmotor=0, f_e_inhumidity=0, f_e_inkeys=0, f_e_inlow=0, f_e_intemp=0, f_e_invzero=0, f_e_outcoiltemp=0, f_e_outeeprom=0, f_e_outgastemp=0, f_e_outmachine2=0, f_e_outmachine=0, f_e_outtemp=0, f_e_outtemplow=0, f_e_push=0, f_filterclean=0, f_humidity=0, f_power_display=0, f_temp_in=27.0, f_voltage=0, t_backlight=<Dimmer.ON: 0>, t_control_value=3212618, t_device_info=0, t_display_power=None, t_eco=<Economy.OFF: 0>, t_fan_leftright=<AirFlow.OFF: 0>, t_fan_mute=<Quiet.OFF: 0>, t_fan_power=<AirFlow.OFF: 0>, t_fan_speed=<FanSpeed.AUTO: 0>, t_ftkt_start=0, t_power=<Power.ON: 1>, t_run_mode=<DoubleFrequency.OFF: 0>, t_setmulti_value=None, t_sleep=<SleepMode.STOP: 0>, t_temp=81, t_temptype=<TemperatureUnit.FAHRENHEIT: 1>, t_temp_eight=<EightHeat.OFF: 0>, t_temp_heatcold=<FastColdHeat.OFF: 0>, t_work_mode=<AcWorkMode.DRY: 3>) Jul 15 07:34:22 hassio D0715 09:34:22.340 main.py:212] POST request from 172.17.8.7,#012Path: /local_lan/property/datapoint.json?echo=true#012Headers:#012Host: 172.17.8.10#012Content-Length: 172#012Content-Type: application/json#012#012#012#012Body:#012{"enc":"2Vcl2JeL4gqWeSDXwC1ist8F4Wzlk9998sCTHtrFLlmrKGEGr3mt9ccHlESLBvxdCrvsNAALjp37fghcVtKHV4nhvzfP5Up2R5s3KLp8Z+Y=","sign":"D3IPGEBloPB9AKld/lUgB2lH1c2YGojXLE50TyhNS7s="} Jul 15 07:34:22 hassio I0715 09:34:22.342 query_handlers.py:135] Decrypted: {"seq_no":1257,"data":{"name":"t_control_value","value":3474753}} Jul 15 07:34:22 hassio D0715 09:34:22.344 query_handlers.py:117] Response:#012null Jul 15 07:34:22 hassio D0715 09:34:22.348 aircon.py:60] Updated properties: AcProperties(f_electricity=0, f_e_arkgrille=0, f_e_incoiltemp=0, f_e_incom=0, f_e_indisplay=0, f_e_ineeprom=0, f_e_inele=0, f_e_infanmotor=0, f_e_inhumidity=0, f_e_inkeys=0, f_e_inlow=0, f_e_intemp=0, f_e_invzero=0, f_e_outcoiltemp=0, f_e_outeeprom=0, f_e_outgastemp=0, f_e_outmachine2=0, f_e_outmachine=0, f_e_outtemp=0, f_e_outtemplow=0, f_e_push=0, f_filterclean=0, f_humidity=0, f_power_display=0, f_temp_in=27.0, f_voltage=0, t_backlight=<Dimmer.ON: 0>, t_control_value=3474753, t_device_info=0, t_display_power=None, t_eco=<Economy.OFF: 0>, t_fan_leftright=<AirFlow.OFF: 0>, t_fan_mute=<Quiet.OFF: 0>, t_fan_power=<AirFlow.OFF: 0>, t_fan_speed=<FanSpeed.AUTO: 0>, t_ftkt_start=0, t_power=<Power.ON: 1>, t_run_mode=<DoubleFrequency.OFF: 0>, t_setmulti_value=None, t_sleep=<SleepMode.STOP: 0>, t_temp=81, t_temptype=<TemperatureUnit.FAHRENHEIT: 1>, t_temp_eight=<EightHeat.OFF: 0>, t_temp_heatcold=<FastColdHeat.OFF: 0>, t_work_mode=<AcWorkMode.DRY: 3>) Jul 15 07:34:23 hassio D0715 09:34:23.469 main.py:212] POST request from 172.17.8.7,#012Path: /local_lan/property/datapoint.json?echo=true#012Headers:#012Host: 172.17.8.10#012Content-Length: 152#012Content-Type: application/json#012#012#012#012Body:#012{"enc":"g/9Q/blR4g91nOEhCkbTIJ8ai2Cbp3saLlpQrSEvWkvaYaNKfxrOci5m2Qsc9y6K6sDsHdetLuU3Ew4gckaB0g==","sign":"FqTSdR23zpKPf6YmeIlEHRjP5SLWBl2P30VKqPiNNs4="} Jul 15 07:34:23 hassio I0715 09:34:23.474 query_handlers.py:135] Decrypted: {"seq_no":1258,"data":{"name":"t_work_mode","value":2}} Jul 15 07:34:23 hassio D0715 09:34:23.477 query_handlers.py:117] Response:#012null Jul 15 07:34:23 hassio D0715 09:34:23.483 aircon.py:60] Updated properties: AcProperties(f_electricity=0, f_e_arkgrille=0, f_e_incoiltemp=0, f_e_incom=0, f_e_indisplay=0, f_e_ineeprom=0, f_e_inele=0, f_e_infanmotor=0, f_e_inhumidity=0, f_e_inkeys=0, f_e_inlow=0, f_e_intemp=0, f_e_invzero=0, f_e_outcoiltemp=0, f_e_outeeprom=0, f_e_outgastemp=0, f_e_outmachine2=0, f_e_outmachine=0, f_e_outtemp=0, f_e_outtemplow=0, f_e_push=0, f_filterclean=0, f_humidity=0, f_power_display=0, f_temp_in=27.0, f_voltage=0, t_backlight=<Dimmer.ON: 0>, t_control_value=3474753, t_device_info=0, t_display_power=None, t_eco=<Economy.OFF: 0>, t_fan_leftright=<AirFlow.OFF: 0>, t_fan_mute=<Quiet.OFF: 0>, t_fan_power=<AirFlow.OFF: 0>, t_fan_speed=<FanSpeed.AUTO: 0>, t_ftkt_start=0, t_power=<Power.ON: 1>, t_run_mode=<DoubleFrequency.OFF: 0>, t_setmulti_value=None, t_sleep=<SleepMode.STOP: 0>, t_temp=81, t_temptype=<TemperatureUnit.FAHRENHEIT: 1>, t_temp_eight=<EightHeat.OFF: 0>, t_temp_heatcold=<FastColdHeat.OFF: 0>, t_work_mode=<AcWorkMode.COOL: 2>)

the problems seems to be related only when I change from DRY to FAN

3) ------------------------------------

the button "auto" does not work

image

Jul 15 07:41:57 hassio D0715 09:41:57.118 main.py:79] [KeepAlive] PUT 172.17.8.7/local_reg.json {"local_reg": {"ip": "172.17.8.10", "notify": 0, "port": 8888, "uri": "/local_lan"}} Jul 15 07:41:57 hassio I0715 09:41:57.316 mqtt_client.py:27] MQTT message Topic: 'cameretta/Cameretta/t_work_mode/command', Payload b'auto' Jul 15 07:41:57 hassio D0715 09:41:57.355 main.py:117] [KeepAlive] Waiting for notification or timeout Jul 15 07:41:59 hassio multipathd[677]: sda: add missing path Jul 15 07:41:59 hassio multipathd[677]: sda: failed to get udev uid: Invalid argument Jul 15 07:41:59 hassio multipathd[677]: sda: failed to get sysfs uid: Invalid argument Jul 15 07:41:59 hassio multipathd[677]: sda: failed to get sgio uid: No such file or directory Jul 15 07:42:05 hassio multipathd[677]: sda: add missing path Jul 15 07:42:05 hassio multipathd[677]: sda: failed to get udev uid: Invalid argument Jul 15 07:42:05 hassio multipathd[677]: sda: failed to get sysfs uid: Invalid argument Jul 15 07:42:05 hassio multipathd[677]: sda: failed to get sgio uid: No such file or directory Jul 15 07:42:07 hassio D0715 09:42:07.359 main.py:79] [KeepAlive] PUT 172.17.8.7/local_reg.json {"local_reg": {"ip": "172.17.8.10", "notify": 1, "port": 8888, "uri": "/local_lan"}} Jul 15 07:42:07 hassio D0715 09:42:07.773 main.py:117] [KeepAlive] Waiting for notification or timeout Jul 15 07:42:07 hassio D0715 09:42:07.846 main.py:195] GET Request from 172.17.8.7,#012Path: /local_lan/commands.json Jul 15 07:42:07 hassio D0715 09:42:07.849 query_handlers.py:122] Encrypting: {"seq_no": 266, "data": {"properties": [{"property": {"base_type": "integer", "name": "t_control_value", "value": 3017034, "id": "cGpbbX5Q"}}]}} Jul 15 07:42:07 hassio D0715 09:42:07.853 query_handlers.py:117] Response:#012{"enc": "J3+/DPMDnztcF/HrJGy+HUrsynTdE0ECSHCd3AAzPW5DoRYyYHYXfkrYIlagWfUrDDNm3/DSSccHkSgD9kXcrfHp7ZUPaoh3mlcvOxcE+9UfE5qhFNAFxP29U7YFAPzq2ZMtF9WeSnn0kYxETFnt/Q0j4wZY3KLCUYkqYtDKgsFfZv9PKHLpSNtfHNRWcwKp", "sign": "9bk3YDFOORk3kFbVHCG4QxD8rNKbQ3IAgNHHJY1FLME="} Jul 15 07:42:07 hassio D0715 09:42:07.860 aircon.py:60] Updated properties: AcProperties(f_electricity=0, f_e_arkgrille=0, f_e_incoiltemp=0, f_e_incom=0, f_e_indisplay=0, f_e_ineeprom=0, f_e_inele=0, f_e_infanmotor=0, f_e_inhumidity=0, f_e_inkeys=0, f_e_inlow=0, f_e_intemp=0, f_e_invzero=0, f_e_outcoiltemp=0, f_e_outeeprom=0, f_e_outgastemp=0, f_e_outmachine2=0, f_e_outmachine=0, f_e_outtemp=0, f_e_outtemplow=0, f_e_push=0, f_filterclean=0, f_humidity=0, f_power_display=0, f_temp_in=25.0, f_voltage=0, t_backlight=<Dimmer.ON: 0>, t_control_value=3017034, t_device_info=0, t_display_power=None, t_eco=<Economy.OFF: 0>, t_fan_leftright=<AirFlow.OFF: 0>, t_fan_mute=<Quiet.OFF: 0>, t_fan_power=<AirFlow.OFF: 0>, t_fan_speed=<FanSpeed.AUTO: 0>, t_ftkt_start=0, t_power=<Power.ON: 1>, t_run_mode=<DoubleFrequency.OFF: 0>, t_setmulti_value=None, t_sleep=<SleepMode.STOP: 0>, t_temp=81, t_temptype=<TemperatureUnit.FAHRENHEIT: 1>, t_temp_eight=<EightHeat.OFF: 0>, t_temp_heatcold=<FastColdHeat.OFF: 0>, t_work_mode=<AcWorkMode.FAN: 0>)

4) ------------------------------------------------------

the switch button ON/OFF just switches the AC OFF. It does not switch it ON

image

Thank you so much for your support.

iw5edv commented 4 years ago

I did some tests and it worked well; how can I activate the script as a service?

with which interface? W4E1 or W4B1???

wifi75 commented 4 years ago

@karlkar hello after last upadate (git pull) service not work: see below: image

wifi75 commented 4 years ago

I need remove te --ip. now it is ok

iw5edv commented 4 years ago

I continued some tests with W4E1

`iw5edv@iw5edv-Ubuntu:~$ curl -ik 'http://localhost:8888/hisense/status' HTTP/1.0 200 OK Server: BaseHTTP/0.6 Python/3.7.4 Date: Wed, 15 Jul 2020 11:01:40 GMT Content-type: application/json

{"devices": [{"ip": "192.168.178.52", "props": {"f_electricity": 0, "f_e_arkgrille": 0, "f_e_incoiltemp": 0, "f_e_incom": 0, "f_e_indisplay": 0, "f_e_ineeprom": 0, "f_e_inele": 0, "f_e_infanmotor": 0, "f_e_inhumidity": 0, "f_e_inkeys": 0, "f_e_inlow": 0, "f_e_intemp": 0, "f_e_invzero": 0, "f_e_outcoiltemp": 0, "f_e_outeeprom": 0, "f_e_outgastemp": 0, "f_e_outmachine2": 0, "f_e_outmachine": 0, "f_e_outtemp": 0, "f_e_outtemplow": 0, "f_e_push": 0, "f_filterclean": 0, "f_humidity": 0, "f_power_display": 0, "f_temp_in": 25.0, "f_voltage": 0, "t_backlight": "ON", "t_control_value": 36832256, "t_device_info": 0, "t_display_power": null, "t_eco": "OFF", "t_fan_leftright": "OFF", "t_fan_mute": "OFF", "t_fan_power": "OFF", "t_fan_speed": "AUTO", "t_ftkt_start": 0, "t_power": "OFF", "t_run_mode": "OFF", "t_setmulti_value": null, "t_sleep": "STOP", "t_temp": 81, "t_temptype": "FAHRENHEIT", "t_temp_eight": "OFF", "t_temp_heatcold": "OFF", "t_work_mode": "COOL"}}]}i`

but in MQTT it does not send the status of t_temp t_fan_speed t_fan_power

On W4B1 works perfect

belladieg commented 4 years ago

W4E1

Da: iw5edv notifications@github.com Inviato: mercoledì 15 luglio 2020 12:15 A: deiger/AirCon AirCon@noreply.github.com Cc: belladieg belladieg@gmail.com; Comment comment@noreply.github.com Oggetto: Re: [deiger/AirCon] turn_on turn_off AC in Home Assistant and temperature issues (#26)

I did some tests and it worked well; how can I activate the script as a service?

with which interface? W4E1 or W4B1???

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/deiger/AirCon/issues/26#issuecomment-658681688 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AJCITHKCGCDH2G7LFG6NYHTR3V6RVANCNFSM4OIJP64A . https://github.com/notifications/beacon/AJCITHLDRS4FQZCHK2D3YZTR3V6RVA5CNFSM4OIJP64KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE5BK6WA.gif

karlkar commented 4 years ago

If you feel like wanna try something more experimental - checkout branch feature/async from my repo. From my experiments - works better than version from feature/devices - even with MQTT.

iw5edv commented 4 years ago

ok I try now

iw5edv commented 4 years ago

i try feature/async I get this error

Exception ignored in: <function ClientSession.__del__ at 0x7f06ff9be200> Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/aiohttp-4.0.0a1-py3.7-linux-x86_64.egg/aiohttp/client.py", line 269, in __del__ if not self.closed: File "/usr/local/lib/python3.7/site-packages/aiohttp-4.0.0a1-py3.7-linux-x86_64.egg/aiohttp/client.py", line 894, in closed return self._connector is None or self._connector.closed AttributeError: _connector Traceback (most recent call last): File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/iw5edv/AirCon/fork2/aircon/__main__.py", line 193, in <module> asyncio.run(run(parsed_args)) File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run return loop.run_until_complete(main) File "/usr/local/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete return future.result() File "/home/iw5edv/AirCon/fork2/aircon/__main__.py", line 169, in run notifier.start()) File "/home/iw5edv/AirCon/fork2/aircon/notifier.py", line 71, in start async with aiohttp.ClientSession(conn_timeout=5.0) as session: TypeError: __init__() got an unexpected keyword argument 'conn_timeout'

karlkar commented 4 years ago

Woopsie. Looks like I should specify aiohttp version. You're using 4.0.0a1. I am working with 3.6.2

iw5edv commented 4 years ago

ok :)

iw5edv commented 4 years ago

ALLELUIA!!!!!!! @karlkar the version bugfix/updating_state is work

send in MQTT the status of:

t_temp
t_fan_speed
t_fan_power 
iw5edv commented 4 years ago

you were really great

now it needs to be refined and then passed to the Homeassistant Team to integrate it.

CTraceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 566, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 534, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1735, in _run_once
    event_list = self._selector.select(timeout)
  File "/usr/local/lib/python3.7/selectors.py", line 468, in select
    fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/iw5edv/AirCon/fork3/aircon/__main__.py", line 193, in <module>
    asyncio.run(run(parsed_args))
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 46, in run
    _cancel_all_tasks(loop)
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 62, in _cancel_all_tasks
    tasks.gather(*to_cancel, loop=loop, return_exceptions=True))
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 566, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 534, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1735, in _run_once
    event_list = self._selector.select(timeout)
  File "/usr/local/lib/python3.7/selectors.py", line 468, in select
    fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt
Exception ignored in: <coroutine object Notifier.start at 0x7f3988a4ab00>
Traceback (most recent call last):
  File "/home/iw5edv/AirCon/fork3/aircon/notifier.py", line 95, in start
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 98, in __aexit__
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 218, in release
RuntimeError: Lock is not acquired.
E0716 16:56:14.137  base_events.py:1604] Task was destroyed but it is pending!
task: <Task pending coro=<Condition.wait() running at /usr/local/lib/python3.7/asyncio/locks.py:354> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f3988bbfdd0>()]> cb=[_release_waiter(<Future pendi...988bb6990>()]>)() at /usr/local/lib/python3.7/asyncio/tasks.py:392]>
karlkar commented 4 years ago

Yeah, it works, but still there is an issue with power on - you have to create a rest switch to power AC on. HASS team won't integrate it, as it is using mqtt - so for them this is good enough. I will create integration for HASS myself. It should be available in some time.

iw5edv commented 4 years ago

sure, to turn it on and off I created a switch and the automations are based on that, but I don't see the problem.

karlkar commented 4 years ago

How do you check if it is turned on or off? By parsing status request?

iw5edv commented 4 years ago
switch:    
  - platform: mqtt
    name: "Condizionatore Camera 2"
    state_topic: "hisense_ac/Camera/t_power/status"
    command_topic: "hisense_ac/Camera/t_power/command"
    qos: 1
    payload_on: "on"
    payload_off: "off"
    optimistic: false
    retain: false
iw5edv commented 4 years ago

but as a service it does not start

lug 16 17:46:25 iw5edv-Ubuntu systemd[1]: Stopped Hisense AC server FORK.
lug 16 17:46:25 iw5edv-Ubuntu systemd[1]: Started Hisense AC server FORK.
lug 16 17:46:25 iw5edv-Ubuntu systemd[1]: hisense.service: Main process exited, code=exited, status=1/F
lug 16 17:46:25 iw5edv-Ubuntu systemd[1]: hisense.service: Failed with result 'exit-code'.
lug 16 17:46:25 iw5edv-Ubuntu systemd[1]: hisense.service: Service hold-off time over, scheduling resta
lug 16 17:46:25 iw5edv-Ubuntu systemd[1]: hisense.service: Scheduled restart job, restart counter is at
lug 16 17:46:25 iw5edv-Ubuntu systemd[1]: Stopped Hisense AC server FORK.
lug 16 17:46:25 iw5edv-Ubuntu systemd[1]: hisense.service: Start request repeated too quickly.
lug 16 17:46:25 iw5edv-Ubuntu systemd[1]: hisense.service: Failed with result 'exit-code'.
lug 16 17:46:25 iw5edv-Ubuntu systemd[1]: Failed to start Hisense AC server FORK.
karlkar commented 4 years ago

I had the same issue - you have to either install required packages for root user, or set the service to run as user who has the packages installed. Thanks for sharing that switch.

wifi75 commented 4 years ago

ALLELUIA!!!!!!! @karlkar the version bugfix/updating_state is work

send in MQTT the status of:

t_temp
t_fan_speed
t_fan_power 

code in hassio it is the same?

wifi75 commented 4 years ago

@karlkar hello I update all folder Aircon than send command python3.7 setup.py install

now I have this error

image

why?

karlkar commented 4 years ago

It happens when script asks the device for the value of property that is not supported by the device. Just ignore it. I'll set the log level to lower.

wifi75 commented 4 years ago

ok ... i saw that you added in the HA slls configuration item topic hisense_ac / must be left right?

wifi75 commented 4 years ago

@karlkar

this is my test command line python3.7 -m aircon run -p 8890 --config config_studio.json --type ac --mqtt_host 192.168.1.52 --mqtt_user mqtt_user:mypass--mqtt_topic hisense_ac/hisense_studio2

then in Ha my configuration it is like this:

climate:
  - platform: mqtt
    name: "HiSense AC"
    current_temperature_topic: "hisense_ac/hisense_studio2/f_temp_in/status"
    fan_mode_command_topic: "hisense_ac/hisense_studio2/t_fan_speed/command"
    fan_mode_state_topic: "hisense_ac/hisense_studio2/t_fan_speed/status"
    fan_modes:
      - "auto"
      - "lower"
      - "low"
      - "medium"
      - "high"
      - "higher"
    max_temp: "30"
    min_temp: "16"
    mode_command_topic: "hisense_ac/hisense_studio2/t_work_mode/command"
    mode_state_topic: "hisense_ac/hisense_studio2/t_work_mode/status"
    modes:
      - "off"
      - "fan_only"
      - "heat"
      - "cool"
      - "dry"
      - "auto"
    swing_modes:
      - "on"
      - "off"
    power_command_topic: "hisense_ac/hisense_studio2/t_power/command"
    power_state_topic: "hisense_ac/hisense_studio2/t_power/status"
    precision: 1.0
    swing_mode_command_topic: "hisense_ac/hisense_studio2/t_fan_power/command"
    swing_mode_state_topic: "hisense_ac/hisense_studio2/t_fan_power/status"
    temperature_command_topic: "hisense_ac/hisense_studio2/t_temp/command"
    temperature_state_topic: "hisense_ac/hisense_studio2/t_temp/status"
    temperature_unit: "c"

I checked with mqtt explorer and I receive data ... but in hassio nothing image

why?

wifi75 commented 4 years ago

now there is this error

image

karlkar commented 4 years ago

@wifi75 By setting the mqtt_topic in command line you are setting the first part of the topic. If you don't set the topic then it is set to the default - hisense_ac. Then you have a device name - you can check it in config json file of the device. So it might be described as: <mqtt_topic>/<device_name>/<property>/<action>

iw5edv commented 4 years ago

@wifi75 use this command line python3.7 -m aircon run -p 8890 --config config_studio.json --type ac --mqtt_host 192.168.1.52 --mqtt_user mqtt_user:mypass and this hassio config

climate:
  - platform: mqtt
    name: "HiSense AC"
    current_temperature_topic: "hisense_ac/studio/f_temp_in/status"
    fan_mode_command_topic: "hisense_ac/studio/t_fan_speed/command"
    fan_mode_state_topic: "hisense_ac/studio/t_fan_speed/status"
    fan_modes:
      - "auto"
      - "lower"
      - "low"
      - "medium"
      - "high"
      - "higher"
    max_temp: "30"
    min_temp: "16"
    mode_command_topic: "hisense_ac/studio/t_work_mode/command"
    mode_state_topic: "hisense_ac/studio/t_work_mode/status"
    modes:
      - "off"
      - "fan_only"
      - "heat"
      - "cool"
      - "dry"
      - "auto"
    swing_modes:
      - "on"
      - "off"
    power_command_topic: "hisense_ac/studio/t_power/command"
    power_state_topic: "hisense_ac/studio/t_power/status"
    precision: 1.0
    swing_mode_command_topic: "hisense_ac/studio/t_fan_power/command"
    swing_mode_state_topic: "hisense_ac/studio/t_fan_power/status"
    temperature_command_topic: "hisense_ac/studio/t_temp/command"
    temperature_state_topic: "hisense_ac/studio/t_temp/status"
    temperature_unit: "c"

switch:    
  - platform: mqtt
    name: "HiSense AC"
    state_topic: "hisense_ac/studio/t_power/status"
    command_topic: "hisense_ac/studio/t_power/command"
    qos: 1
    payload_on: "on"
    payload_off: "off"
    optimistic: false
    retain: false

in case it doesn't work then maybe you need to change the 'studio' tag in 'Studio' because MQTT is case sensitive

wifi75 commented 4 years ago

@iw5edv I didn't understand where I have to insert the S