orgua / OneWireHub

OneWire slave device emulator
GNU General Public License v3.0
343 stars 86 forks source link

ZONT controller #103

Open mifrith opened 2 years ago

mifrith commented 2 years ago

Hello! I have a ZONT H2000 + controller (https://zont-online.ru/internet-magazin/termostaty/zont-h-2000-plus) and an Arduino Uno. The controller itself sees the simulated sensors, but does not see the temperature on them and periodically loses connection with them. The sensors that I'm trying to emulate are 18B20, he sees physical sensors perfectly, even ordered from Aliexpress. There is no access to the controller logs, so I cannot say what the controller sees. If someone came across such a controller, please help. Thanks!

GoshaGreen commented 2 years ago

Have the same issue with ZONT H1, but using esp8266 as an emulator for 18B20 sensor ZONT has k-line interface, which can be used for debug, you can connect to it using k-line adapter and get logs (ZONT does not work with simple transistor-based adapter due to high communication speed)

GoshaGreen commented 2 years ago

@mifrith I got logic-analyzer trace for communication between ZONT and oneWireHub @ esp8266. It looks like ZONT send reset command just after "0x4E: // WRITE SCRATCHPAD", and wait for "present" impulse. But after recieving "WRITE SCRATCHPAD", there is crc8 calculation. And oneWireHub miss present request from ZONT. As a result, ZONT think that esp is not work correct. I've added "hub->checkReset();" in DS18B20::duty() function(), src/DS18B20.cpp:35, after "hub->recv" and before "crc8" commands. ZONT can detect oneWireHub now. I also tried to use fast table-based version of crc8, and it gives nothing, it looks like it is not fast enought. Suggested solution is a dirty workaround for detecting the problem

image

malehovich commented 9 months ago

Have the same issue with ZONT H1, but using esp8266 as an emulator for 18B20 sensor ZONT has k-line interface, which can be used for debug, you can connect to it using k-line adapter and get logs (ZONT does not work with simple transistor-based adapter due to high communication speed)

Подскажите по какой схеме вы подключали esp к Zont. У меня ни в какую не хочет видеть эмуляцию ds18d20. При этом китайские датчики работают отлично.

GoshaGreen commented 9 months ago

@malehovich , Nothing extraordinary, standard connection, standard code, based on the examples. Recommend to follow one-wire HW guidelines, such as placing digital wires away from power cables or using coaxial cable for wires longer than 20 cm, etc. Zont is also very sensitive to time delays. Even one missed package trigger a lost sensor error Described in my previous message workaround with presence impulse is 100% necessarly. Otherwise Zont will never get connection, the calculation of crc checksumm requeres too much time I used ESP8266, and due to timing sensitivity of Zont I abandoned the project - it is not possible to use WiFi http communication and one-wire-hub at the same project