atxbyea / samsungrac

Home Assistant Climate Device for controlling (not only) Samsung AC
60 stars 18 forks source link

Integration Read MIM-H03, But Send New Commands to MIM-H03. #74

Open lawrencelnm opened 1 year ago

lawrencelnm commented 1 year ago

My old MIM-H02 stopped working when I upgraded HA to 2023.6. I went and bought a MIM-H03, which fortunately was compatible with my Air Con.

What was unfortunate was that I am now faced with another problem, with not being able to get it to work with HA via this integration.

I've been tweaking my config via trial and error, and managed to get HA to see the air con finally using the following configs via Samsungrac V5.1. I can see the state and temperature of my air con, and they change immediately when I change the air con via the air con build in controller.

However for whatever reason, I cannot control the air con from HA via this integration. Every command I send via the HA UI seems to be ignored, and nothing happens. There are no obvious errors in the logs.

Anyone that can help me ?

climate:
  - platform: climate_ip
    config_file: 'mim-h03_heatpump.yaml'
    name: ‘Air Conditioner’
    ip_address: xx.xx.xx.xx
    device_id: 032001000
    token: xxxxxxxxxxxx
    cert: 'ac14k_m.pem'
    debug: true
jay0xy commented 1 year ago

Are you sure you have the correct device Id?

Also, try putting your device id in single quotes and restarting HA

device_id: '032001000'

I recall having the same issue as you in the past and it was related to an incorrect device id. I have MIM-H03 too with the same device ID in single quotes, but, I think the device id can differ from unit to unit

lawrencelnm commented 1 year ago

Are you sure you have the correct device Id?

Also, try putting your device id in single quotes and restarting HA

device_id: '032001000'

I recall having the same issue as you in the past and it was related to an incorrect device id. I have MIM-H03 too with the same device ID in single quotes, but, I think the device id can differ from unit to unit

Thanks for helping out. I can't remember if I tried with single quotes, but I may give that a go this weekend - I have tried many combinations, that I'm forgetting what I've tried before. It's good to know it works with Single quote.

Do you know how to retrieve the device id, if it's not default to 032001000 ? I haven't been able to find this online.

lawrencelnm commented 1 year ago

The below was the result returned from the AC when I obtained my token. I am guessing the device ID is either '0' or '032001000' ?

{"Devices":[{"ConfigurationLink":{"href":"/devices/0/configuration"},"InformationLink":{"href":"/devices/0/information"},"Operation":{"dhwPower":"Off","power":"Off","ventilationPower":"Off"},"Temperatures":[{"desired":0,"id":"0","increment":1,"unit":"Celsius"}],"description":"DisableTempIncrement","id":"0","name":"Wifi-kit","resources":["Alarms","Operation","Temperatures","Information","Configuration"],"type":"Air_Conditioner","uuid":"C097276E-xxxx-xxxx-xxxx-xxxxxxxxx"},{"Alarms":[{"alarmType":"Device","code":"0","id":"0","triggeredTime":"2023-07-16T20:12:25"}],"ConfigurationLink":{"href":"/devices/032001000/configuration"},"InformationLink":{"href":"/devices/032001000/information"},"Mode":{"modes":["Opmode_Heat"],"options":["Volume_100"],"supportedModes":["Opmode_Auto","Opmode_Cool","Opmode_Dry","Opmode_Fan","Opmode_Heat"]},"Operation":{"power":"Off"},"Temperatures":[{"current":11,"desired":23,"id":"0","increment":1,"maximum":30,"minimum":16,"name":"INDOOR","unit":"Celsius"}],"Wind":{"direction":"Off","speedLevel":4,"supportedWindModes":["0","4","3","2","Off"]},"description":"DUCT","id":"032001000","name":"32:01:00","resources":["Operation","Wind","Mode","Temperatures","Information","Configuration","Alarms"],"type":"Air_Conditioner","uuid":"ea9de288-xxxx-xxxx-xxxx-xxxxxxxxx"}]}

jay0xy commented 1 year ago

Looks similiar to mine. Device id is the long string of numbers 0320 etc. Try single quotes as suggested.

jay0xy commented 1 year ago

Hey how'd it'd go? Also can I ask a favour? Since a couple of days ago my MIM H03 is offline in SmartThings and can't be controlled locally over Port 8080, even though it's on Wifi and pingable. I feel like it's something on Samsung server side causing the behaviour When I hard reset and go through first time setup it connects back to smartthings perfectly fine but stays offline in SmartThings. Attempts to get the device token locally don't work, even though port 8080 is open its just not responding to get requests You having any issues with your Wifi kit like this? Thanks

lawrencelnm commented 1 year ago

Hey how'd it'd go? Also can I ask a favour? Since a couple of days ago my MIM H03 is offline in SmartThings and can't be controlled locally over Port 8080, even though it's on Wifi and pingable. I feel like it's something on Samsung server side causing the behaviour When I hard reset and go through first time setup it connects back to smartthings perfectly fine but stays offline in SmartThings. Attempts to get the device token locally don't work, even though port 8080 is open its just not responding to get requests You having any issues with your Wifi kit like this? Thanks

Unfortunately no luck. I've used both single quotes and no quotes, on V5.1 of the integration. The below is the error I see.

2023-08-06 21:06:57.409 INFO (SyncWorker_15) [custom_components.climate_ip.climate] Getter updated with value: {'Alarms': [{'alarmType': 'Device', 'code': '0', 'id': '0', 'triggeredTime': '2023-08-06T21:06:23'}], 'ConfigurationLink': {'href': '/devices/032001000/configuration'}, 'InformationLink': {'href': '/devices/032001000/information'}, 'Mode': {'modes': ['Opmode_Heat'], 'options': ['Volume_100'], 'supportedModes': ['Opmode_Auto', 'Opmode_Cool', 'Opmode_Dry', 'Opmode_Fan', 'Opmode_Heat']}, 'Operation': {'power': 'Off'}, 'Temperatures': [{'current': 10, 'desired': 23, 'id': '0', 'increment': 1, 'maximum': 30, 'minimum': 16, 'name': 'INDOOR', 'unit': 'Celsius'}], 'Wind': {'direction': 'Off', 'speedLevel': 4, 'supportedWindModes': ['0', '4', '3', '2', 'Off']}, 'description': 'DUCT', 'id': '032001000', 'name': '32:01:00', 'resources': ['Operation', 'Wind', 'Mode', 'Temperatures', 'Information', 'Configuration', 'Alarms'], 'type': 'Air_Conditioner', 'uuid': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'} 2023-08-06 21:06:57.410 INFO (SyncWorker_15) [custom_components.climate_ip.climate] Error: update_state

I've now rolled back to MIM-H02, on Home Assistant 2023.6, running V4.0 of the integration.

Sorry I can't test SmartThings for MIM-H03 as I already moved back to MIM-H02.

What I did notice was that my AC does not come online in SmartThings when on MIM-H03. This was back when I first posted this (in July).

lucadjc commented 1 year ago

Hey how'd it'd go? Also can I ask a favour? Since a couple of days ago my MIM H03 is offline in SmartThings and can't be controlled locally over Port 8080, even though it's on Wifi and pingable. I feel like it's something on Samsung server side causing the behaviour When I hard reset and go through first time setup it connects back to smartthings perfectly fine but stays offline in SmartThings. Attempts to get the device token locally don't work, even though port 8080 is open its just not responding to get requests You having any issues with your Wifi kit like this? Thanks

Unfortunately no luck. I've used both single quotes and no quotes, on V5.1 of the integration. The below is the error I see.

2023-08-06 21:06:57.409 INFO (SyncWorker_15) [custom_components.climate_ip.climate] Getter updated with value: {'Alarms': [{'alarmType': 'Device', 'code': '0', 'id': '0', 'triggeredTime': '2023-08-06T21:06:23'}], 'ConfigurationLink': {'href': '/devices/032001000/configuration'}, 'InformationLink': {'href': '/devices/032001000/information'}, 'Mode': {'modes': ['Opmode_Heat'], 'options': ['Volume_100'], 'supportedModes': ['Opmode_Auto', 'Opmode_Cool', 'Opmode_Dry', 'Opmode_Fan', 'Opmode_Heat']}, 'Operation': {'power': 'Off'}, 'Temperatures': [{'current': 10, 'desired': 23, 'id': '0', 'increment': 1, 'maximum': 30, 'minimum': 16, 'name': 'INDOOR', 'unit': 'Celsius'}], 'Wind': {'direction': 'Off', 'speedLevel': 4, 'supportedWindModes': ['0', '4', '3', '2', 'Off']}, 'description': 'DUCT', 'id': '032001000', 'name': '32:01:00', 'resources': ['Operation', 'Wind', 'Mode', 'Temperatures', 'Information', 'Configuration', 'Alarms'], 'type': 'Air_Conditioner', 'uuid': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'} 2023-08-06 21:06:57.410 INFO (SyncWorker_15) [custom_components.climate_ip.climate] Error: update_state

I've now rolled back to MIM-H02, on Home Assistant 2023.6, running V4.0 of the integration.

Sorry I can't test SmartThings for MIM-H03 as I already moved back to MIM-H02.

What I did notice was that my AC does not come online in SmartThings when on MIM-H03. This was back when I first posted this (in July).

sometimes it happens to me too in that case I turn off the power line and restart it, it works (or restart the wifi router).