Remote sensor local api question
Opened this issue · 8 comments
I'm looking to get a Venstar sensor (ACC-TSENWIFIMini) and want to keep it from talking to the "cloud". Does anyone know if the Venstar wifi sensors have a local api, similar to the thermostats?
Personally I would want to use HomeAssistant to manage the sensor values and update the thermostats myself as my IOT devices are not able to connect to the internet instead of relying on Venstar Skyport.
Thanks for any info!
I don't have one of the wifi sensors, mine is a wired remote sensor. If it just talks directly to the venstar, in theory it wouldn't be an issue. But maybe someone who owns one would know? I thought I heard someone else say once they did make remote non-wired ones that report into the main thermostat unit, perhaps these are those?
Those sensors don't talk to the cloud at all, they only broadcast/multicast their data to anything on the same network (VLAN) as the Wi-Fi SSID they connect to – which needs to include your thermostat. Once the thermostat has the data, you can get it with the thermostat's /query/sensors
endpoint (or this python module).
A while back I began to reverse engineer the protocol to try sending data from existing temperature sensors in a format the thermostat would understand. I was only able to nail down part of the protocol, so I decided to just use Venstar's sensors. I contacted Venstar about the protocol they use for the sensors and they would not release any information about it.
The sensors broadcast their data to the local network (255.255.255.255) and multicast to the all hosts group (224.0.0.1) on UDP port 5001. There is only one message and it includes everything about the sensors – MAC address, name, sensor id, sensor type, temperature, battery, and firmware version. Temperature is in degrees celsius at half degree steps, ranging from -40°C (0x00) to 87.5°C (0xFF). Temperature increases at a rate no faster than 1.5°/update and decreases at 0.5°/update. Updates are sent every minute for mini Wi-Fi sensors set to "remote", every two minutes for the original Wi-Fi sensors set to "remote", and every 15 seconds for "supply" and "return". I can provide my breakdown of the message format, if you're interesting in trying to decode the update messages.
If all you want to do is get the Venstar sensor data in Home Assistant, I have a working component for Home Assistant (that I never got around to writing tests/docs for) which includes sensors and I believe @garbled1 is working on updating the official component, possibly to include support for sensors.
To follow up, yes, I'm currently working on getting the remote sensors pulled into official HA. Given that doug just confirmed these are the same as what he has, once my venstar_sensor PR is merged, HA will support them. (I will add support for the batteries in a future PR, don't want to muck with the existing one)
Oh cool! Thanks for the info. I was under the impression that you had to use Skyport to "pair" a sensor to a thermostat, but maybe that is just a convenience thing for if you are using Skyport.
I'll get one ordered and would be happy to test the integration out.
A while back I began to reverse engineer the protocol to try sending data from existing temperature sensors in a format the thermostat would understand. I was only able to nail down part of the protocol,
That's too bad. I wondered how hard it would be to make an ESPHome device that would tell my Venstar the outdoor temperature.
Completely off topic, but can you connect to skyport to update the API/firmware on your device, and then disconnect from it? My base units have never spoken to the cloud.. but.. now I want these sensors...
@doug-hoffman Would you be willing to start a new thread with your protocol dumps? I'm halfway decent at reverse engineering these things.. I'm curious how hard it would be.
Given it's a UDB broadcast, sounds like it wouldn't be ESPHome, but just raw arduino code to spam onto the wire.. but still in the realm of ESP-able.
make an ESPHome device that would tell my Venstar the outdoor temperature.
If you intended on doing so for purposes other than display, don't bother. At least on the color touch, it won't let you use the Wi-Fi sensors set to "outdoor" for control purposes (like heat pump or aux heat lockout).
can you connect to skyport to update the API/firmware on your device, and then disconnect from it?
That shouldn't be a problem. On the color touch, you can load them on an SD card with the desktop app and avoid the cloud entirely. Not familiar with other models.
Would you be willing to start a new thread with your protocol dumps?
Here: #34