Carrier/Bryant Infinitive Integration

Thanks for helping with this - I really appreciate it. When I ran the git command, I got the following error.

fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

Any ideas?

Thanks @mww012 I could definitely use the help. The PI seems to get hung up a few times a day… I have the log in a .txt file, but I can’t seem to upload it here. What’s the best way to get it to you?

Well that sounds like a fun error. Not 100% sure what’s going on there but here’s my recommendation. Delete the entire infinitive custom component. .git folder and all. Then clone my repo again. On the off chance that something weird happened to the component this should reset it.

Also, since my last reply I’ve gone ahead and merged the ha_0.92 branch into the master so you shouldn’t have to mess with the “git checkout…” stuff. On the off chance I’ve done something dumb with the master branch, ha_0.92 still exists. Also, you’ll notice a ha_0.96 branch. That’s up for testing if you’re up for it. You’ll need to be running 0.96 obviously but it’s working pretty well in my setup.

Just to sum up…

  1. Delete the infinitive custom component. Don’t for get the .git fold as well as the .gitignore file.
  2. Run “git clone https://github.com/mww012/ha_customcomponents.git .” that should pull down the repo and if you’re good with 0.95 then go ahead and test.
  3. If you want to run 0.96 then make sure and run “git checkout ha_0.96” after you clone the repo.

Let us know how it goes.

All,

I pushed the 0.96 changes up to my github repo tonight. Give them a shot and let me know if you guys run into any issues or if there’s any functionality that isn’t working properly. One thing to note, on previous versions if you moved from heat/cool to auto or vice versa, you would have to reboot HA for the UI to properly do its thing. I figured out what I was doing wrong and now the UI behaves itself no matter how you jump between HVAC modes (kinda proud of myself on that one).

Here’s a quick how-to in case anybody needs it…

  1. Clone the repo if you haven’t done so already.
  2. Run “git checkout ha_0.96” to use the branch built for 0.96.
  3. Upgrade HA if you you’re running 0.95 or earlier.
  4. Throw the entry in your configuration.yaml if it’s not there.
  5. Boot up HA

If there’s no sensitive info in it you could always throw it up on pastebin and shoot me a link.

I just took a snapshot and upgraded based on your last message (my hassio on Raspberry Pi with an SD card got corrupted week before last so now I’m running HassOS on VirtualBox…much better). So far so good, I’ll let you know if I see any issues.

I was worried about that exact thing with my RPi 3. When they announced they were sun setting python 3.5 I figured now was as good a time as any to put in the effort to rebuild. I went with Home Assistant in a docker image but orchestrated by rancher rather than HassIO. We’ve been pushing harder into docker orchestration at work so I figured this was a time to get my hands dirty with that.

Thanks for giving it a shot. Hopefully the growing pains won’t be too rough.

@mww012 I’ve never used pastebin before. I’ll check it out. In the meantime is there anything in particular I should be looking for? The file is massive - 122 MB txt file from what looks to be about 18 hours worth of logging data. Thanks again for your help.

Oh dang. That’s huge. We may need to go another route. If you have google drive, Dropbox, etc you can usually generate a public like to a file. If it’s text you should be able to put it in a zip file. Text normally compresses a ton. Should knock that file size down. If you can do that and then post a link here I’ll download it.

@mww012 Thanks for the help. I resolved the “fatal: not a git repository…” issue and have both of my HVAC systems controlled by HA. Each system is connected to its own rs-485 and both rs-485s are connected to one Pi running two instances of Infinitive. I’m watching for errors, but as of now - success. Thanks again.

Thanks @mww012. Here is a link to the file:

I did a search on the word “error” and it comes up over 250 times… Thanks again for your help.

I’m getting the following in the log for both of the climate.infinitive entities. Any ideas?

Update for climate.infinitive_2 fails
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 221, in async_update_ha_state
await self.async_device_update()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 380, in async_device_update
await self.hass.async_add_executor_job(self.update)
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/infinitive/climate.py”, line 258, in update
self._hvac_mode = self._status[‘mode’]
KeyError: ‘mode’

Awesome! Glad to hear it’s working. If anything comes up let me know and I’ll help where I can.

Edit:
I just saw your last message. I’ve been getting that every once in a while on mine. I haven’t been able to pin down the exact issue but it looks as though the json response from infinitive doesn’t give back the ‘mode’ attribute for some reason. I haven’t been able to catch it in action but I don’t notice it causing any functional issues. Are you seeing any problems from it?

@mww012 At this point, I can’t see that it is causing operational issues - just several recurring log entries. Both of my systems are on “Cool” right now. In the past (before implementing your component), I have typically switched from heat to cool and vice versa by pressing the appropriate button on the tstats - I haven’t used the combined heat/cool mode. I wonder if it matters if I switch to that combined mode followed by a HA restart?

@Tj_Davis, from the picture of your tstat you posted in the original thread, it looks like you were running in the combined heat/cool mode. How are you running your three systems and are you seeing the above error? Thanks!

Yeah. That’s obnoxious. I haven’t had it a lot. Just a few times a day. We can dig into it if you like.

Inverse Regex matches will be your best friend here. Basically used it to grab every line that didn’t contain “infinitive” and slimmed it down to 1667 lines. That’s something actually manageable. Here’s where we should focus:

Jul 21 19:08:13 raspberrypi kernel: [ 3618.398181] brcmfmac: brcmf_do_escan: error (-110)
Jul 21 19:08:13 raspberrypi kernel: [ 3618.398189] brcmfmac: brcmf_cfg80211_scan: scan error (-110)
Jul 21 19:09:13 raspberrypi kernel: [ 3678.397580] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
Jul 21 19:09:13 raspberrypi kernel: [ 3678.398142] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle

These lines show up and repeat over and over. Broadcom makes the wireless card in the RPi’s and this looks to be an issue in the driver. Every so often a wireless card will go off-channel and scan for other access points so that it can keep an idea of what else is around it. It looks like something in the driver is falling apart when this happens. It’s not happening every time it scans or you’d never be able to keep a connection as this happens at least multiple times a minute(can’t recall exactly how often it scans). The scans are normally incredible quick, like 15ms kind of quick. When it breaks it looks like the wireless card doesn’t properly go back to its normal state and so you can’t push traffic onto the network. A reboot starts it over and you’re good until this happens again.

At this point I’d make sure you’re up to date on your software. If you’re on raspbian you can run “sudo apt update” and pull a new list of available updates. Once that’s done run “sudo apt upgrade” to actually download and install the upgrades. Try that first and see if the issue comes back. If it does we can look at manually updating your driver but that’s not a ton of fun.

@mww012 I ran the commands last last night and installed over 90 updates on the Pi. Unfortunately it’s hung up again, so it looks like the issue is still there. Looks like it’s time to update the driver… any help would be appreciated!

Before we fight the driver mess let’s look at one more thing. Take a look at the link below. If we’re lucky that’ll be an easy fix.
https://dontpressthat.wordpress.com/2017/11/03/prevent-raspberry-pi-dropping-wifi/

Thanks @mww012. The power save mode was set to on. I turned it off and added the code to make “off” the default. Hopefully this does the trick. Thanks!

This change seems to have fixed my issue. Thanks @mww012!

I was going to hold a bit longer on the 0.96 update, but let me know if you want another test subject.

I’m having some issues with the 0.96 migration. Here’s the error I get:

2019-07-28 12:47:54 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform infinitive
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/infinitive/climate.py", line 95, in setup_platform
    add_entities([InfinitiveDevice(inf_device, name, temp_min_spread)])
  File "/config/custom_components/infinitive/climate.py", line 130, in __init__
    self.update()
  File "/config/custom_components/infinitive/climate.py", line 269, in update
    self._fan_mode = FAN_MODE_MAP[self._status['fanMode']]
KeyError: 'med'

Any thoughts?

Edit; I should specify that I’m on 0.96.5