Carrier/Bryant Infinitive Integration

Hi
Still having issue. Have pyinfinitive on other server and can connect and see web page. Great…
Changed climate platform to point to infinitive server an am getting the following errors:
2019-08-13 20:19:47 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-08-13 20:19:48 INFO (MainThread) [homeassistant.components.climate] Setting up climate.infinitive
2019-08-13 20:19:51 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 149, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), 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 258, in update
self._hvac_mode = self._status[‘mode’]
KeyError: ‘mode’

Any ideas how I can fix? Or what is causing this?

hmm…did you use the Will1604’s Infinitive Repo? He forked the acd/infinitive repository and did a lot of work to clean up the API. That’s the version my pyinfinitive module is expecting. What looks like is happening is that the API isn’t passing back the ‘mode’ attribute.

Does the platform ever finish setting up or does it die there?

change Logger to the following and thing look like the are working. Still waiting to wire rs-485 ti HVAC.

logger:
default: critical
logs:
custom_components.infinitive: debug
custom_components.infinitive.climate: debug

Now getting:
2019-08-15 16:43:56 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-08-15 16:43:57 DEBUG (SyncWorker_14) [custom_components.infinitive.climate] importing pyinfinitive
2019-08-15 16:43:57 INFO (SyncWorker_14) [custom_components.infinitive.climate] Adding Infinitive device
2019-08-15 16:43:57 INFO (SyncWorker_14) [custom_components.infinitive.climate] Config Domain: infinitive
2019-08-15 16:43:57 INFO (SyncWorker_14) [custom_components.infinitive.climate] Config Host: 192.168.69.18
2019-08-15 16:43:57 INFO (SyncWorker_14) [custom_components.infinitive.climate] Config Port: 8080
2019-08-15 16:43:57 INFO (SyncWorker_14) [custom_components.infinitive.climate] Config Name: Infinitive
2019-08-15 16:43:57 INFO (SyncWorker_14) [custom_components.infinitive.climate] Config Device id: <pyinfinitive.pyinfinitive.infinitive_device object at 0x7f890d8ea090>
2019-08-15 16:43:57 INFO (SyncWorker_14) [custom_components.infinitive.climate] Config Temp units: °F
2019-08-15 16:43:57 INFO (SyncWorker_14) [custom_components.infinitive.climate] Config Temp spread: 2
2019-08-15 16:43:57 DEBUG (SyncWorker_14) [custom_components.infinitive.climate] Initializing infinitive class instance

Which I believe is normal.

Still does not show climate.infinitive. Assume that it needs connection to HVAC,

is a independent server necessary? Tried of HA server running Hassio but the RS-475 adapter never lite up like to does on independent one. Running both on Proxmox.
Thanks for all your help
5310

I can’t really speak to if am independent server is necessary. I don’t see why it would be though.

Honestly, I think we need to get infinitive completely up and going before you try to bring it into home assistant. There’s just too many unknowns going about it another way.

Hi:
Not a good day. Wired the RS-485 adapter to A and B terminals of Infinitive HAVC. Connected terminal A to the [data+] and B to [data-]. Turned on HVAC and then started Infinitive software on VM Debian Linux instance where the USB is was connected. HVAC reported ‘System Malfunction’ and nothing worked. What could I have don’t wrong? What should I do next? How should the USB be wired? I wired what I thought was straight through Vs crossover.

Removed the connected wire and USB then reset HVAC. Thankfully, the HAVC is now back to working normally, I hope.

I look forward to anyone help. Thanks

Well that’s not good. Hmm…I can send you how I’m set up. That’ll give you something To compare to.

Green goes to A, yellow goes to B. That’s all you have to worry about.

Thanks for the reply. I think this is what happened:

“Be aware of RS485 adapters may use RS232 lines to drive the transceiver mode. If this is true, disconnecting the software on the PC may drive the RS485 chip to transmit mode and stop all communication on the bus. If this happens an error will show on the thermostat, but will go away if you remove the RS485 adapter from the bus.”

I @#$%$ my pants when it happened. At least I now know why. But still don’t have a total understanding on the steps to start it up. The issue maybe caused because I running a VM [proxmox] and the USB is a pass-thru to the instance running pyinfinitive. Go to build it on a Pi 3 and eliminate the later. Any other suggestions?

Haven’t seen that issue but glad you’ve made some progress. I accidentally blew a fuse on the board when I was setting mine up because I wasn’t being careful. I bridged the bus power to one of the rx/tx lines. Thermostat lost all power. I completely understand the $@^|> your pants moment.

Hi
Now I concerned that the PC running pyinfinitive reboots it caused a ‘System Malfunction’ and shutdown the HVAC. Have you experience this? Is there a work around?

It’s not something I’ve seen. I have rebooted my Pi many times and haven’t seen an issue. I’m not sure what a workaround would be.

When I set mine up, one of my units started showing system malfunction then the thermostat power died. I had the repair guys come out and the line was shorting out due to a bare area on one of the wires and it eventually threw the fuse. May not be the case for you but worth looking at.

Hey all

Just wanted to give you guys a heads up. I just merged the ha_0.96 branch into the master so now the standard master branch should work with an HA version of 0.96 or higher.

Hi
Still trying to get this working. I have the webpage working but can’t seem to get anything working in HA.

Here’s what I have configured in HA.

climate:

  • platform: infinitive
    host: ‘192.168.69.18’
    port: 8080

Is there anything else I need to get to have a thermostat show up in HA or is it only for use by automations? Would really like to see some working yaml and lovelace files.
Thanks.

1 Like

That’s it. The yaml config is super simple and your snippet looks right. As soon as the component loads properly HA should put the thermostat in the UI.

Do you get any errors in the logs? Also, have you turned up debug logging for the component? Does the infinitive webpage show all the proper stats and is it able to control the system?

Sorry for the barrage of questions. Just trying to piece together what the actual issue is.

Hi:
I’ve been work on building an ‘addon’ for HASSIO users so that you can run the ‘infinitive’ backend program from the same equipment.

You can find the addon at github.com/5310h/ha_infinitive. Since I run Home Assistant on Proxmox I have not tested it on a Raspberry Pi or ARM device.

To install the addon, copy ha_infinitive to your Home Assistant addon directory. Then go to HASSIO, ADDONS and you should see it listed. If not, try refreshing the page using the icon on the top right. After running ‘install’, set your options (httpport and serial) locations and start the addon. Refresh the log area and you should see communications with your Carrier Infinity HVAC, assuming you have an USB RS485 wired correctly.

Please post feedback if someone tests it on a PI or is having issues.

Thanks.
5310

@5310 Just to clarify, this would start an Infinitive service within the Hassio environment, correct? I have Infinitive running outside of Hassio on my Pi3+ (in Raspbian) but I have been wanting to access the full Infinitive web interface via HA so I’m wondering if this may allow for that. Have you tried using an iframe to access the full Infinitive interface through the web via your Hassio instance? Or are you just running everything locally?

Correct. Runs as an Add-on. That why I developed it. Webui is accessible from ha up with the port you define. Like 8081

Never tried iframe but it should also work too.

Like I stated. Never tried on pi. Please give it a try.

Add-on installed, Infinitive is running and accessible at local HA ip:8081. However, it wasn’t clear to me where it shows up in the UI - just installing and starting the addon doesn’t create a menu item like many addons do. I was hoping that there would be an icon from which I could access the full Infinitive interface, but I’m only able to access by going to my local HA ip:8081 in the browser. I added it to an iframe but the issue I’m having with accessing insecure content (Infinitive) through a secure URL (HA over the web via HTTPS) still persists:

angular-websocket.min.js:1 Mixed Content: The page at 'myURL' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://myURL:443/api/ws'. This request has been blocked; this endpoint must be available over WSS.

Did I miss something with the addon? For me, since I still can’t access the full Infinitive interface via HTTPS, I’m probably gonna stick with @mww012’s integration.

Hi
Maybe I missed something. I thought the ‘infinitive service’ needed to be running in order to use @mww012 integration? I didn’t want to add another Linux instance in order for it to run. But now I see an issue if your HA device isn’t the one connected via USB to your Carrier Hvac.

No, you’re right, Infinitive has to be running for @mww012 integration to work. I run Infinitive and Raspian on the same Pi without issue and that Pi is connected to my HVAC. To run your add-on, I stopped the Infinitive service and commented out the necessary lines from my config. Then, I followed your instructions. I use Nginx proxy manager to forward the port for Infinitive.