Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for new Controller AI #88

Open
dwot opened this issue Dec 3, 2024 · 12 comments
Open

Support for new Controller AI #88

dwot opened this issue Dec 3, 2024 · 12 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@dwot
Copy link

dwot commented Dec 3, 2024

Is your feature request related to a problem? Please describe.
Recently acquired the new Controller AI. I've been using the homeassistant-acinfinity addon to graph and monitor my temp, humidity and vpd in the tent. The new controller returns API results slightly differently than the previous models. The temperature, temperatureF, humidity on the deviceInfo object reflect the outside temperature read from the Controller AI's onboard sensor rather than the remote sensor probe located inside the grow tent. The sensor probe data is now found in a sensors array.

"sensors": [
{
"sensorType": 0,
"sensorUnit": 0,
"sensorPrecision": 3,
"sensorTrend": 1,
"accessPort": 1,
"sensorData": 6880,
"sensorOrigin": 0
},
{
"sensorType": 2,
"sensorUnit": 0,
"sensorPrecision": 3,
"sensorTrend": 2,
"accessPort": 1,
"sensorData": 5610,
"sensorOrigin": 0
},
{
"sensorType": 3,
"sensorUnit": 0,
"sensorPrecision": 3,
"sensorTrend": 1,
"accessPort": 1,
"sensorData": 77,
"sensorOrigin": 0
},
{
"sensorType": 4,
"sensorUnit": 0,
"sensorPrecision": 3,
"sensorTrend": 1,
"accessPort": 7,
"sensorData": 7040,
"sensorOrigin": 0
},
{
"sensorType": 6,
"sensorUnit": 0,
"sensorPrecision": 3,
"sensorTrend": 1,
"accessPort": 7,
"sensorData": 4700,
"sensorOrigin": 0
},
{
"sensorType": 7,
"sensorUnit": 0,
"sensorPrecision": 3,
"sensorTrend": 0,
"accessPort": 7,
"sensorData": 134,
"sensorOrigin": 0
}
],

From what I've inferred the sensorTypes are as follows:

0 - Inside Temp
2 - Inside Humidity
3 - Inside VPD
4 - Outside Temp
6 - Outside Humidity
7 - Outside VPD

It seems a bit odd to me that they return accessPort of 7 for the onBoard (outside) sensor and 0 for the remote probe (inside) sensor, but oddities and undocumented APIs go together.

I'm not sure how deep any other differences may go as I'm typically only interested in reading the sensor data for my needs. From what I've seen, to extend functionality to the Controller AI it would take modelling and mapping in the new sensor array data to home assistant sensors. I'm not particularly familiar with home assistant add on development or I'd try to find my way around crafting a pull request. Thank you again for all your time and work and your consideration of this issue. I can understand if it's not something on any sort of immediate horizon if you don't have the new controller available, but wanted to raise the issue and provide what details I've found (I maintain a simple scraper to text file app written in go to overlay these values on my grow stream).

Thanks!

@dalinicus
Copy link
Owner

Thanks for the heads up. I do have an AI controller on order, but haven't received it yet. Once I do my plan was to make sure the integration was compatible. Hopefully I can look into this issue soon.

but oddities and undocumented APIs go together.

aint that the truth lol

@dalinicus dalinicus added bug Something isn't working enhancement New feature or request labels Dec 5, 2024
@netleader
Copy link

Any news on the AI implementation? I'm facing the same problem.

@dalinicus
Copy link
Owner

dalinicus commented Dec 26, 2024

Still waiting on my AI controller. Should arrive early January. Made the mistake of including multiple items in the same pre-order, which pushed back my controller's ship date until they're all ready.

@dalinicus dalinicus mentioned this issue Jan 1, 2025
Closed
@jordanthomas
Copy link

From what I can gather sensorType 0 is temp in fahrenheit and sensorType 1 is temp in celcius. One or the other will be present in sensors array, depending on account settings.

@dalinicus
Copy link
Owner

Fyi. Just got the email that my AI controller has shipped 🥳

@Myseka
Copy link

Myseka commented Jan 19, 2025

Let me know if you need any info on AI controller, It kinda works but some things are a bit off(my humidity for one)

@gbomacfly
Copy link

Let me know if you need any info on AI controller, It kinda works but some things are a bit off(my humidity for one)

In my case, only the external values are shown, but not the internal probe.

@Myseka
Copy link

Myseka commented Jan 19, 2025 via email

@jeffcybulski
Copy link

All of the devices show up on the ports, but none of them can be managed. Each port shows every attribute (although I do not see Max Light Level for grow lights...).

@dalinicus Are you using Wireshark or tcpdump to reverse engineer their API? It's fortunate they've not put it behind SSL yet...

@dalinicus
Copy link
Owner

dalinicus commented Jan 20, 2025

Fortunate is a weird way to describe a glaring security flaw that puts all our data at risk lol. Luckily its mostly integers for device values and not sensitive data.

Yeah I'm using traffic sniffing between the phone app and the API. Even if they enabled TLS, I have my emulator setup with proxy certs to man-in-the-middle attack myself, so it wouldn't change much unless they take other actions to encrypt their traffic outside of TLS.

Lets hope they implement the former eventually but not the latter.

@Myseka
Copy link

Myseka commented Jan 20, 2025

Hopefully they just document it anyway, and add some non ropc oauth flows. Would just make their ecosystem more valuable.

@maziggy
Copy link
Contributor

maziggy commented Jan 22, 2025

Ready for takeoff :)

Image

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants