liaan / broadlink_ac_mqtt

Broadlink Air Conditioners to mqtt
MIT License
102 stars 44 forks source link

Critical error on monitor start #64

Closed fmobile999 closed 2 years ago

fmobile999 commented 3 years ago

Hi! I got error on monitor start:

2020-12-20 00:36:15,890,890 INFO     [monitor.py:321] Starting Monitor...
2020-12-20 00:36:15,950,950 CRITICAL [AcToMqtt.py:112] unsupported operand type(s) for +: 'NoneType' and 'int'
2020-12-20 00:36:15,951,951 CRITICAL [AcToMqtt.py:112] unsupported operand type(s) for +: 'NoneType' and 'int'
2020-12-20 00:36:15,952,952 CRITICAL [AcToMqtt.py:112] unsupported operand type(s) for +: 'NoneType' and 'int'
2020-12-20 00:36:15,952,952 CRITICAL [AcToMqtt.py:112] unsupported operand type(s) for +: 'NoneType' and 'int'
2020-12-20 00:36:15,953,953 CRITICAL [AcToMqtt.py:112] unsupported operand type(s) for +: 'NoneType' and 'int'
2020-12-20 00:36:15,953,953 CRITICAL [AcToMqtt.py:112] unsupported operand type(s) for +: 'NoneType' and 'int'

Apparently, the error occurs in the place AcToMqtt.py:92 - "self.last_update[key] + self.config["update_interval"]" due to missing self.last_update[key]

Same error occurs on docker version.

System Raspberry Pi 3B Linux MYHOME 5.10.1-v7+ #1383 SMP Fri Dec 18 19:02:15 GMT 2020 armv7l GNU/Linux PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)"

config:

service:
    daemon_mode: True
    update_interval: 10
    self_discovery: False
mqtt:
    host: localhost
    port: 1883
    client_id: acmqtt
    user: mqttuser
    passwd: password
    topic_prefix: /aircon
    auto_discovery_topic: homeassistant
    auto_discovery_topic_retain: False
    discovery: False
##Devices
devices:
- ip: 192.168.1.233
  mac: a043b2266cb4
  name: ballu
  port: 80

The question is - what am I doing wrong?

liaan commented 3 years ago

Can you give me link to the AC freedom app you using in the play store? It might be different .....

fmobile999 commented 3 years ago

https://play.google.com/store/apps/details?id=com.broadlink.acfreedom

liaan commented 3 years ago

Thanks .. ja.. that is normal one.

I'll do some more research ...

liaan commented 3 years ago

Can you do git pull for latest code and run monitor.py -T and paste the output please. its a test method that don't error check anything,.. hopefully can see some info...

fmobile999 commented 3 years ago
root@raspberrypi:~/broadlink_ac_mqtt# ./monitor.py -T
Sending Packet:
5aa5aa555aa5aa55000000000000000000000000000000000000000000000000efef00002a4e650082d8a043b0088cb800000000a1c30000453452e7f92eda958344930835ef9a6dfb692dc370b90443ac5cd63fbb53adfa08814ca7f8cf417100328e570c3b86c94d05708449a389e29ae1045436a05bdddc02c161af1325e87e19b0f7d1ce068d

('Z\xa5\xaaUZ\xa5\xaaU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\xcb\xff\xff*N\xe9\x03\x82\xd8\xa0C\xb0\x08\x8c\xb8\x00\x00\x00\x00\xaf\xbe\x00\x00', ('192.168.1.233', 80))
Authentication Failed to AC
setting something
17
Payload:bb00068000000f0001018fe00fa0000000002000100000
Checksum:5efd
Packet:1900bb00068000000f0001018fe00fa00000000020001000005efd0000000000
Sending Packet:
5aa5aa555aa5aa55000000000000000000000000000000000000000000000000c3d900002a4e6a0083d8a043b0088cb800000000c3c30000afd9beb4868bd615e84773508cf53c373eeb110a94b04757573cd5c41c8bd3ce

('Z\xa5\xaaUZ\xa5\xaaU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcc\xcb\xf9\xff*N\xee\x03\x83\xd8\xa0C\xb0\x08\x8c\xb8\x00\x00\x00\x00\xc3\xc3\x00\x00', ('192.168.1.233', 80))
setting something
24
Payload:bb00068000000f000101c7e00fa0000000002000100000
Checksum:26fd
Packet:1900bb00068000000f000101c7e00fa000000000200010000026fd0000000000
Sending Packet:
5aa5aa555aa5aa550000000000000000000000000000000000000000000000002bd900002a4e6a0084d8a043b0088cb800000000c3c30000b96522bcb5c38b37259f6e7179abfd79e230dcf8e93f814802bf203008c5892c

('Z\xa5\xaaUZ\xa5\xaaU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\xcb\xf9\xff*N\xee\x03\x84\xd8\xa0C\xb0\x08\x8c\xb8\x00\x00\x00\x00\xc3\xc3\x00\x00', ('192.168.1.233', 80))
None
liaan commented 3 years ago
root@raspberrypi:~/broadlink_ac_mqtt# ./monitor.py -T
Sending Packet:
5aa5aa555aa5aa55000000000000000000000000000000000000000000000000efef00002a4e650082d8a043b0088cb800000000a1c30000453452e7f92eda958344930835ef9a6dfb692dc370b90443ac5cd63fbb53adfa08814ca7f8cf417100328e570c3b86c94d05708449a389e29ae1045436a05bdddc02c161af1325e87e19b0f7d1ce068d

('Z\xa5\xaaUZ\xa5\xaaU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\xcb\xff\xff*N\xe9\x03\x82\xd8\xa0C\xb0\x08\x8c\xb8\x00\x00\x00\x00\xaf\xbe\x00\x00', ('192.168.1.233', 80))
Authentication Failed to AC
setting something
17
Payload:bb00068000000f0001018fe00fa0000000002000100000
Checksum:5efd
Packet:1900bb00068000000f0001018fe00fa00000000020001000005efd0000000000
Sending Packet:
5aa5aa555aa5aa55000000000000000000000000000000000000000000000000c3d900002a4e6a0083d8a043b0088cb800000000c3c30000afd9beb4868bd615e84773508cf53c373eeb110a94b04757573cd5c41c8bd3ce

('Z\xa5\xaaUZ\xa5\xaaU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcc\xcb\xf9\xff*N\xee\x03\x83\xd8\xa0C\xb0\x08\x8c\xb8\x00\x00\x00\x00\xc3\xc3\x00\x00', ('192.168.1.233', 80))
setting something
24
Payload:bb00068000000f000101c7e00fa0000000002000100000
Checksum:26fd
Packet:1900bb00068000000f000101c7e00fa000000000200010000026fd0000000000
Sending Packet:
5aa5aa555aa5aa550000000000000000000000000000000000000000000000002bd900002a4e6a0084d8a043b0088cb800000000c3c30000b96522bcb5c38b37259f6e7179abfd79e230dcf8e93f814802bf203008c5892c

('Z\xa5\xaaUZ\xa5\xaaU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\xcb\xf9\xff*N\xee\x03\x84\xd8\xa0C\xb0\x08\x8c\xb8\x00\x00\x00\x00\xc3\xc3\x00\x00', ('192.168.1.233', 80))
None

Thanks

I assume your aircon did not switch on ?

fmobile999 commented 3 years ago

aircon is on, heating mode

liaan commented 3 years ago

aircon is on, heating mode

if you switch it off, and then run script again .. does it switch on or beep or something?

fmobile999 commented 3 years ago

No reaction.

root@raspberrypi:~/broadlink_ac_mqtt# ./monitor.py -T
Sending Packet:
5aa5aa555aa5aa550000000000000000000000000000000000000000000000006aef00002a4e650026afa043b0088cb800000000a1c30000453452e7f92eda958344930835ef9a6dfb692dc370b90443ac5cd63fbb53adfa08814ca7f8cf417100328e570c3b86c94d05708449a389e29ae1045436a05bdddc02c161af1325e87e19b0f7d1ce068d

('Z\xa5\xaaUZ\xa5\xaaU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00.\xcb\xff\xff*N\xe9\x03&\xaf\xa0C\xb0\x08\x8c\xb8\x00\x00\x00\x00\xaf\xbe\x00\x00', ('192.168.1.233', 80))
Authentication Failed to AC
setting something
17
Payload:bb00068000000f0001018fe00fa0000000002000100000
Checksum:5efd
Packet:1900bb00068000000f0001018fe00fa00000000020001000005efd0000000000
Sending Packet:
5aa5aa555aa5aa550000000000000000000000000000000000000000000000003ed900002a4e6a0027afa043b0088cb800000000c3c30000afd9beb4868bd615e84773508cf53c373eeb110a94b04757573cd5c41c8bd3ce

("Z\xa5\xaaUZ\xa5\xaaU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00G\xcb\xf9\xff*N\xee\x03'\xaf\xa0C\xb0\x08\x8c\xb8\x00\x00\x00\x00\xc3\xc3\x00\x00", ('192.168.1.233', 80))
setting something
24
Payload:bb00068000000f000101c7e00fa0000000002000100000
Checksum:26fd
Packet:1900bb00068000000f000101c7e00fa000000000200010000026fd0000000000
Sending Packet:
5aa5aa555aa5aa55000000000000000000000000000000000000000000000000a6d800002a4e6a0028afa043b0088cb800000000c3c30000b96522bcb5c38b37259f6e7179abfd79e230dcf8e93f814802bf203008c5892c

('Z\xa5\xaaUZ\xa5\xaaU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00H\xcb\xf9\xff*N\xee\x03(\xaf\xa0C\xb0\x08\x8c\xb8\x00\x00\x00\x00\xc3\xc3\x00\x00', ('192.168.1.233', 80))
None
liaan commented 3 years ago

ok, thanks. I see the reply from the aircon looks the same in all cases.. I'll add some more testing protocols and let you know.. its now TV time here with FAM .. ;-)

fmobile999 commented 3 years ago

wish you a great weekend

LordDethman commented 3 years ago

Ok, I have tried but I can not for the life of me figure out how to run a Capture from my Android phone. Any instructions would be helpful.

LordDethman commented 3 years ago

I Cloned the latest version and now it will not run at all. Before I could at least run ./monitor -S and get a readout.

dethman@ac_to_mqtt:~/broadlink_ac_mqtt$ ./monitor.py -S Authentication Failed to AC Traceback (most recent call last): File "./monitor.py", line 387, in <module> start() File "./monitor.py", line 319, in start discover_and_dump_for_config(config) File "./monitor.py", line 35, in discover_and_dump_for_config devices = AC.discover() File "/home/dethman/broadlink_ac_mqtt/broadlink_ac_mqtt/AcToMqtt.py", line 47, in discover discovered_devices = broadlink.discover(timeout=5) File "/home/dethman/broadlink_ac_mqtt/broadlink_ac_mqtt/classes/broadlink/ac_db.py", line 116, in discover dev = gendevice(devtype, host, mac,name=name,cloud=cloud) File "/home/dethman/broadlink_ac_mqtt/broadlink_ac_mqtt/classes/broadlink/ac_db.py", line 19, in gendevice return ac_db(host=host, mac=mac,name=name, cloud=cloud,devtype= devtype,update_interval = 0) TypeError: __init__() should return None

dethman@ac_to_mqtt:~/broadlink_ac_mqtt$ ./monitor.py -T Authentication Failed to AC Authentication Failed to AC Authentication Failed to AC Authentication Failed to AC Authentication Failed to AC

Dont know if this will help at all. I am still trying to figure out how to PCAP from my phone directly to the AC Units. I think I am going to have to hardwire my laptop to the network, AD-HOC my phone to my laptop and then Wireshark from my laptop. Will post more info I I get it working.

LordDethman commented 3 years ago

Internet.zip No Internet Try to Pair.zip

OK I finally figured out how to PCAP on my Android. First file is with Internet and me interacting with one of the units.

The second file is without Internet however the app doe snot exactly work correctly. I sees the Units online but they all show "OFF" and I cant interact with them while having no Internet. I tried to pair one without internet but it would not work.

Twards the end of the No Internet PCAP I turned Internet back on and paired repaired on of the units just incase that helps you.

liaan commented 3 years ago

Ja, sorry, removed all the debugging i added to get things i broke working again.... Thanks for files, will look at when office again.

Im wondering if not maybe wifi setup issue..... is your wifi setup for peer to peer communication? (Its normally disabled on most wifi’s?


From: LordDethman notifications@github.com Sent: Saturday, 13 February 2021 21:32 To: liaan/broadlink_ac_mqtt broadlink_ac_mqtt@noreply.github.com Cc: Karman de Lange liaan@vpx.co.za; Comment comment@noreply.github.com Subject: Re: [liaan/broadlink_ac_mqtt] Critical error on monitor start (#64)

Internet.ziphttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fliaan%2Fbroadlink_ac_mqtt%2Ffiles%2F5976300%2FInternet.zip&data=04%7C01%7C%7C2e5dbf281a7a4d1d695908d8d056230f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637488415655803728%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=mjvYmc6kC4XPqFempiGW%2BGosep%2FOfLulerf8bizIY6o%3D&reserved=0 No Internet Try to Pair.ziphttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fliaan%2Fbroadlink_ac_mqtt%2Ffiles%2F5976309%2FNo.Internet.Try.to.Pair.zip&data=04%7C01%7C%7C2e5dbf281a7a4d1d695908d8d056230f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637488415655803728%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=NHvVLCgZxJkPnChO%2BqcXSc60HpVrn7Dw%2B1oCeicfVu4%3D&reserved=0

OK I finally figured out how to PCAP on my Android. First file is with Internet and me interacting with one of the units.

The second file is without Internet however the app doe snot exactly work correctly. I sees the Units online but they all show "OFF" and I cant interact with them while having no Internet. I tried to pair one without internet but it would not work.

Twards the end of the No Internet PCAP I turned Internet back on and paired repaired on of the units just incase that helps you.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fliaan%2Fbroadlink_ac_mqtt%2Fissues%2F64%23issuecomment-778666924&data=04%7C01%7C%7C2e5dbf281a7a4d1d695908d8d056230f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637488415655813683%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=PfVuKvXi2%2BhoikQVcsXTTz2lxWbgxexU1pUY4OICSvU%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAGTCXZDGRBJ4BRUE65ZSJDS63HVZANCNFSM4VC7E53Q&data=04%7C01%7C%7C2e5dbf281a7a4d1d695908d8d056230f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637488415655813683%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KeYMUIV%2FEmylSn3neFFKPS4g02zuaOUjmd5TQ9LrorQ%3D&reserved=0.

LordDethman commented 3 years ago

I will see what I can figure out on the wifi. Right now the server hosting my Home Assistant and Unifi Controller is offline. These winter storms here in Texas are kicking our asses. My power is unreliable at best so may be a few days before I can get anything checked.

liaan commented 3 years ago

I will see what I can figure out on the wifi. Right now the server hosting my Home Assistant and Unifi Controller is offline. These winter storms here in Texas are kicking our asses. My power is unreliable at best so may be a few days before I can get anything checked.

HAHA

I read in the news of the South Africans that left SA to get away from our "Load shedding" (rolling black outs) , just to get slammed with it in Texas now ;-)

LordDethman commented 3 years ago

I don't see anything in my Unifi Configuration that should be effecting the connection from my VMs to the Air Conditioners. I wish there was more I could do to help. I am not very good at debugging PCAP Logs.

loony82361 commented 3 years ago

Good afternoon, I have a similar problem with this integration. Air conditioner AUX ASW-H07B4 / LK-700R1DI. Most often, during script launch, the error "unsupported operand type (s) for +: 'NoneType' and 'int'" is displayed. Sometimes this does not happen and the air conditioner is controlled, but there is no feedback, you set the mode and after a while in the Home Assistant interface it is turned off again, although in fact it is not. I want to add that in the AC Freedom application I could not set up the air conditioner, I did not see it there, although it successfully connects to my Mikrotik. My config and logs look like this:

`service: daemon_mode: True update_interval: 10 self_discovery: False

mqtt: host: 192.168.1.9 port: 1885 client_id: ac_to_mqtt user: mqtt passwd: mqtt topic_prefix: /aircon auto_discovery_topic: homeassistant auto_discovery_topic_retain: False discovery: False

Devices

devices:

LordDethman commented 3 years ago

Good afternoon, I have a similar problem with this integration. Air conditioner AUX ASW-H07B4 / LK-700R1DI. Most often, during script launch, the error "unsupported operand type (s) for +: 'NoneType' and 'int'" is displayed. Sometimes this does not happen and the air conditioner is controlled, but there is no feedback, you set the mode and after a while in the Home Assistant interface it is turned off again, although in fact it is not. I want to add that in the AC Freedom application I could not set up the air conditioner, I did not see it there, although it successfully connects to my Mikrotik. My config and logs look like this:

`service: daemon_mode: True update_interval: 10 self_discovery: False

mqtt: host: 192.168.1.9 port: 1885 client_id: ac_to_mqtt user: mqtt passwd: mqtt topic_prefix: /aircon auto_discovery_topic: homeassistant auto_discovery_topic_retain: False discovery: False

Devices

devices:

  • ip: 192.168.1.20 mac: 34ea34dcd717 name: aux port: 80 ` out.log

Hmm I am also using a MikroTik Router. I wonder if this is a MikroTik issue?

loony82361 commented 3 years ago

Hmm I am also using a MikroTik Router. I wonder if this is a MikroTik issue?

I solved my problem, it was really about Mikrotik. In the WiFi settings, I set Multicast Helper: full, Frequency Mode: Superchannel and selected the country. After these manipulations, everything worked correctly.

liaan commented 3 years ago

Hmm I am also using a MikroTik Router. I wonder if this is a MikroTik issue?

I solved my problem, it was really about Mikrotik. In the WiFi settings, I set Multicast Helper: full, Frequency Mode: Superchannel and selected the country. After these manipulations, everything worked correctly.

Interesting. The multicast helper might be the reason, but that should only affect discovery, not the auth part .. I will try do some research

I also run mikrotik, so can do some testing.

LordDethman commented 3 years ago

Hmm I am also using a MikroTik Router. I wonder if this is a MikroTik issue?

I solved my problem, it was really about Mikrotik. In the WiFi settings, I set Multicast Helper: full, Frequency Mode: Superchannel and selected the country. After these manipulations, everything worked correctly.

Interesting. The multicast helper might be the reason, but that should only affect discovery, not the auth part .. I will try do some research

I also run mikrotik, so can do some testing.

Hmm. Now I will have to dig deeper. I use Microtia for my router but UniFi for my WiFi. Would love to get this working.

LordDethman commented 3 years ago

I know it has been a while. Has anyone had a change to look into this issue? On older versions ./monitor.py -s would at least discover the devices. Now I just get "Authentication Failed to AC". Is there anything I can do to help figure this out. I may require some step by step instruction but I am more than willing to help if I can.

liaan commented 3 years ago

@LordDethman , it should still be able to discover, are you not getting anything outputted with -s ?

Basicly how it works is: The program does a "auth" packet to the aircon using the mac address of that was either configured or discovered. if its not able to talk to the aircon (wifi setup, etc) then you will get auth failure, or the crash, depending on version your running.

Best way to test what going on is use the mobile app ACFreedom on the same wifi as your berry. if the app cannot work, then this program won't work either. If the app works , then we having other issues.

liaan commented 3 years ago

try using -S (capital S) option, it does not check if the process is already running, so should be more reliable.

LordDethman commented 3 years ago

This is what I get. Sorry I can copy and paste out of my VM I am testing with. Let me know if that helps or you would like to me try something else.

image

LordDethman commented 3 years ago

@LordDethman , it should still be able to discover, are you not getting anything outputted with -s ?

Basicly how it works is: The program does a "auth" packet to the aircon using the mac address of that was either configured or discovered. if its not able to talk to the aircon (wifi setup, etc) then you will get auth failure, or the crash, depending on version your running.

Best way to test what going on is use the mobile app ACFreedom on the same wifi as your berry. if the app cannot work, then this program won't work either. If the app works , then we having other issues.

Hmm not that it should matter but I am running broadlink_to_mqtt on a VM. I am running a 10.0.0.0/22 Subnet all of my Servers are on the 10.0.1.X Range, all my switches and other network gear are on 10.0.0.X Range, and all my Wifi Devices are on the DHCP 10.0.2.X Range. I have an RPi I can setup if I need to. My HA Instance is on the Server Range 10.0.1.X Range.

I am running Home Assistant on an HA Blue Device but it is physically hardwired not Wireless. I also have 4x SSIDs that I broadcast (Normal Net, Normal Net 2.4G, IOT Net, and IOT Net 2.4G). I have had issue with the Tuya Devices were during Internet failures I had to switch my phone to the IOT 2.4G network for the app to work locally.

I am running UNBT devices for all my WiFi so maybe something there is not bridging correctly.

LordDethman commented 3 years ago

out.log Please let me know if this helps anything. I got my Pi3 up and running and put it on the same SSID and DHCP Subnet as the AC Units. I am still getting the "Authentication Failed to AC" error. I am not sure what else I can try to make this work.

Since it is setup on my Pi I was able to actually attach the log file here. Could these newer USB Wifi Modules have a different password set in them?

Anyway let me know if there is something else you would like me to try.

Thanks

liaan commented 3 years ago

Lets start with basics, Have you been able to get the ACfreedom app to work?

LordDethman commented 3 years ago

Lets start with basics, Have you been able to get the ACfreedom app to work?

Yes, the ACFreedom App work like a charm. However, only if I am connected to the internet. I have been unable to get it to work locally without internet access like I can with my Tuya, or Shelly Apps.

liaan commented 3 years ago

Lets start with basics, Have you been able to get the ACfreedom app to work?

Yes, the ACFreedom App work like a charm. However, only if I am connected to the internet. I have been unable to get it to work locally without internet access like I can with my Tuya, or Shelly Apps.

Ok, if the acfreedom app wont work on lan, then this script wont either, it uses exact same method to talk to aircons on the local lan.

Can you pleas give me the exact model / make of the aircon/wifi dongle thingy you trying to talk to (can't find it now) ? maybe can find some info on internat about it

LordDethman commented 3 years ago

https://www.auxusa.com/index.php?route=product/product&path=1&product_id=65

This is the AC units I have.

https://www.auxusa.com/index.php?route=product/product&path=2&product_id=74

And this is the WiFi Dongle.

I will do some more troubleshooting on my end over the weekend. I know that when I first started trying to get this going it was able to discover the ACs at least.

Now I don't even get that. I can't think of anything that has changed on my WiFi network but maybe something did.

Unless Ubnt pushed some kind of firmware that is messing me up.

I will report back once I have trouble shit a bit more. I have a few older 1st gen UAPs on the shelf. I might dust them off and configure then so that my phone and one if the ACs is on their own dedicated wifi with nothing else.

liaan commented 3 years ago

@LordDethman .. Not sure about your timezone, but will you be able to chat on discord at some point?

LordDethman commented 3 years ago

@LordDethman .. Not sure about your timezone, but will you be able to chat on discord at some point?

Possibly, though I am super busy during the week. Pretty much no time until Saturday afternoons, and Sundays.

I am Central Time (Texas)

liaan commented 3 years ago

ok, no prob .. someone else is also having same issue.. running openwrt , AC freedom app not wokring as well

busy trying to help them, maybe one will be able to resovle this issue and figure out why not working

liaan commented 3 years ago

@LordDethman .. Not sure about your timezone, but will you be able to chat on discord at some point?

Possibly, though I am super busy during the week. Pretty much no time until Saturday afternoons, and Sundays.

I am Central Time (Texas)

What router your running again , also openwrt? im' not so cunfused between everyone setups ....

LordDethman commented 3 years ago

@LordDethman .. Not sure about your timezone, but will you be able to chat on discord at some point?

Possibly, though I am super busy during the week. Pretty much no time until Saturday afternoons, and Sundays.

I am Central Time (Texas)

What router your running again , also openwrt? im' not so cunfused between everyone setups ....

I have Mikrotik Router, and Ubnt APs.

LordDethman commented 3 years ago

OK, so I seem to have found a solution. Though it is strange. Per this other thread https://github.com/liaan/broadlink_ac_mqtt/issues/76

If I reset the WiFi on the unit and only go through the setup far enough for it to connect to WiFi then stop where it askes for a name. At that point it works with HomeAssistant.

However, the temperature values and in °C but the HomeAssistant Interface shows °F. Of course the other problem is that so far I cant seem to connect it to HomeAssistant and still use the AC Freedom App.

Screenshot 2021-07-22 201430

LordDethman commented 3 years ago

So sort of fixed the problem. I gave up auto discover and added temperature_unit: C to the MQTT config. This fixed it on Home Assistant and in Alexa. Both work perfectly now. However, every time I update the temperature the ACs display switches back to °C. This is something I can deal with though it is a little annoying lol.

fmobile999 commented 3 years ago

Hi! It's cool and work on Ballu BSUI-18HN8 now. Thank you very much!!! In my case temperature unit in HA show as C and value is correct. If I can help with debugging or other, you welcome.

LordDethman commented 3 years ago

Hi! It's cool and work on Ballu BSUI-18HN8 now. Thank you very much!!! In my case temperature unit in HA show as C and value is correct. If I can help with debugging or other, you welcome.

I had to edit the files where is build the "MQTT Device" and add a line for "temperature_unit":"C". One I did that Home assistant sees the °C and automagically converts to °F. This is in the AcToMqtt.py file.

LordDethman commented 3 years ago

Take a look at the below picture. I also had to update a few of the items because apparently HA updated their MQTT HVAC component and changed some of the verbiage. I have 7 units and have now been able to get them all working.

Screenshot 2021-07-25 221537