Tempcontrol добавление своих датчиков DS18B20 бесплатно без регистрации и смс
Сайт tempcontrol.ru не пашет 2 месяц, всем насрать даже тех поддержка номер которой был вытащен из гугла сказала пишите на support@visteh.ru там этим генеральный директор занимается может быть он вам ответит.
я охерел от такого при цене этой дерьмо коробки в 15000р должна быть и поддержка нормальная а не эта шляпа. Вообщем всем кто потерял датчики или хочет добавить новые описываю способ бесплатного добавления чтоб не платить хитрожопым из tempcontrol
Вот такой процессор там
root [ ~ ]# cat /proc/cpuinfo
Processor : ARM926EJ-S rev 4 (v5l)
BogoMIPS : 133.01
Features : swp half thumb fastmult vfp edsp java
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant : 0x0
CPU part : 0x926
CPU revision : 4
Hardware : tc3250 board with the LPC3250 Microcontroller
Revision : 0000
Serial : 0000000000000000
Вот лог прогрузки dmesg
root [ ~ ]# dmesg Linux version 2.6.39.2-g7fda40b (yakor@amd64) (gcc version 4.6.3 (Gentoo 4.6.3 p1.3, pie-0.5.1) ) #32 PREEMPT Wed Jun 20 14:11:15 MSK 2012 CPU: ARM926EJ-S [41069264] revision 4 (ARMv5TEJ), cr=00053177 CPU: VIVT data cache, VIVT instruction cache Machine: tc3250 board with the LPC3250 Microcontroller Memory policy: ECC disabled, Data cache writeback On node 0 totalpages: 16384 free_area_init_node: node 0, pgdat c0294da4, node_mem_map c02a4000 Normal zone: 128 pages used for memmap Normal zone: 0 pages reserved Normal zone: 16256 pages, LIFO batch:3 pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 pcpu-alloc: [0] 0 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 Kernel command line: console=ttyS0,115200 ubi.mtd=3 ubi.mtd=5 ubi.mtd=6 root=ubi1:rootfs rootfstype=ubifs ethaddr=02:74:66:fa:99:40 PID hash table entries: 256 (order: -2, 1024 bytes) Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Memory: 64MB = 64MB total Memory: 62216k/62216k available, 3320k reserved, 0K highmem Virtual kernel memory layout: vector : 0xffff0000 — 0xffff1000 ( 4 kB) fixmap : 0xfff00000 — 0xfffe0000 ( 896 kB) DMA : 0xffc00000 — 0xffe00000 ( 2 MB) vmalloc : 0xc4800000 — 0xf0000000 ( 696 MB) lowmem : 0xc0000000 — 0xc4000000 ( 64 MB) modules : 0xbf000000 — 0xc0000000 ( 16 MB) .init : 0xc0008000 — 0xc0023000 ( 108 kB) .text : 0xc0023000 — 0xc027c000 (2404 kB) .data : 0xc027c000 — 0xc0295440 ( 102 kB) Preemptable hierarchical RCU implementation. RCU-based detection of stalled CPUs is disabled. Verbose stalled-CPUs detection is disabled. NR_IRQS:96 Console: colour dummy device 80x30 Calibrating delay loop... 133.01 BogoMIPS (lpj=665088) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok NET: Registered protocol family 16 LPC32XX unique ID: 0005b6dd75701b6e591c8cb710831800 bio: create slab <bio-0> at 0 Switching to clocksource lpc32xx_clksrc Switched to NOHz mode on CPU #0 NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 2048 (order: 2, 16384 bytes) TCP bind hash table entries: 2048 (order: 1, 8192 bytes) TCP: Hash tables configured (established 2048 bind 2048) TCP reno registered UDP hash table entries: 256 (order: 0, 4096 bytes) UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) NET: Registered protocol family 1 NetWinder Floating Point Emulator V0.97 (double precision) msgmni has been set to 121 io scheduler noop registered (default) Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled serial8250.0: ttyS0 at MMIO 0x40090000 (irq = 9) is a 16550A console [ttyS0] enabled serial8250.0: ttyS1 at MMIO 0x40080000 (irq = 7) is a U6_16550A serial8250.0: ttyS2 at MMIO 0x40088000 (irq = 8) is a 16550A serial8250.0: ttyS3 at MMIO 0x40098000 (irq = 10) is a 16550A lpc32xx_hsuart.0: ttyTX0 at MMIO 0x40014000 (irq = 26) is a lpc32xx_hsuart lpc32xx_hsuart.0: ttyTX1 at MMIO 0x4001c000 (irq = 24) is a lpc32xx_hsuart brd: module loaded NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit) Bad block table found at page 131008, version 0x01 Bad block table found at page 130944, version 0x01 nand_read_bbt: Bad block at 0x000000000000 nand_read_bbt: Bad block at 0x000006520000 nand_read_bbt: Bad block at 0x00000a260000 nand_read_bbt: Bad block at 0x00000ea80000 nand_read_bbt: Bad block at 0x00000f8c0000 Creating 7 MTD partitions on «lpc32xx-nand»: 0x000000000000-0x000000020000 : «boot» 0x000000020000-0x000000180000 : «uboot» 0x000000180000-0x000000580000 : «safe-kernel» 0x000000580000-0x000003780000 : «safe-rootfs» 0x000003780000-0x000003b80000 : «kernel» 0x000003b80000-0x000006d80000 : «rootfs» 0x000006d80000-0x000010000000 : «work» UBI: attaching mtd3 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 129024 bytes UBI: smallest flash I/O unit: 2048 UBI: sub-page size: 512 UBI: VID header offset: 512 (aligned 512) UBI: data offset: 2048 UBI: max. sequence number: 2 UBI: attached mtd3 to ubi0 UBI: MTD device name: «safe-rootfs» UBI: MTD device size: 50 MiB UBI: number of good PEBs: 400 UBI: number of bad PEBs: 0 UBI: number of corrupted PEBs: 0 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 1 UBI: available PEBs: 0 UBI: total number of reserved PEBs: 400 UBI: number of PEBs reserved for bad PEB handling: 4 UBI: max/mean erase counter: 1/0 UBI: image sequence number: 1424920104 UBI: background thread «ubi_bgt0d» started, PID 270 UBI: attaching mtd5 to ubi1 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 129024 bytes UBI: smallest flash I/O unit: 2048 UBI: sub-page size: 512 UBI: VID header offset: 512 (aligned 512) UBI: data offset: 2048 UBI: max. sequence number: 269 UBI: attached mtd5 to ubi1 UBI: MTD device name: «rootfs» UBI: MTD device size: 50 MiB UBI: number of good PEBs: 399 UBI: number of bad PEBs: 1 UBI: number of corrupted PEBs: 0 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 1 UBI: available PEBs: 0 UBI: total number of reserved PEBs: 399 UBI: number of PEBs reserved for bad PEB handling: 3 UBI: max/mean erase counter: 3/0 UBI: image sequence number: 438166388 UBI: background thread «ubi_bgt1d» started, PID 273 UBI: attaching mtd6 to ubi2 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 129024 bytes UBI: smallest flash I/O unit: 2048 UBI: sub-page size: 512 UBI: VID header offset: 512 (aligned 512) UBI: data offset: 2048 UBI: max. sequence number: 88 UBI: attached mtd6 to ubi2 UBI: MTD device name: «work» UBI: MTD device size: 146 MiB UBI: number of good PEBs: 1165 UBI: number of bad PEBs: 7 UBI: number of corrupted PEBs: 0 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 1 UBI: available PEBs: 0 UBI: total number of reserved PEBs: 1165 UBI: number of PEBs reserved for bad PEB handling: 11 UBI: max/mean erase counter: 2/1 UBI: image sequence number: 1323325530 UBI: background thread «ubi_bgt2d» started, PID 276 lpc_mii_bus: probed eth0: using RMII interface eth0: LPC mac at 0x31060000 irq 29 eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=0:00, irq=-1) rtc-lpc32xx rtc-lpc32xx: rtc core: registered rtc-lpc32xx as rtc0 PNX4008-WDT: PNX4008 Watchdog Timer: heartbeat 19 sec cpuidle: using governor ladder cpuidle: using governor menu Registered led device: 1-wire_port2 Registered led device: 1-wire_port1 Registered led device: 1-wire_port4 Registered led device: 1-wire_port3 Registered led device: power Registered led device: nand-io TCP cubic registered NET: Registered protocol family 17 VFP support v0.3: implementor 41 architecture 1 part 10 variant 9 rev 1 rtc-lpc32xx rtc-lpc32xx: setting system clock to 1970-01-01 00:00:08 UTC (8) UBIFS: recovery needed UBIFS: recovery completed UBIFS: mounted UBI device 1, volume 0, name «rootfs» UBIFS: file system size: 49029120 bytes (47880 KiB, 46 MiB, 380 LEBs) UBIFS: journal size: 6580224 bytes (6426 KiB, 6 MiB, 51 LEBs) UBIFS: media format: w4/r0 (latest is w4/r0) UBIFS: default compressor: lzo UBIFS: reserved for root: 0 bytes (0 KiB) VFS: Mounted root (ubifs filesystem) on device 0:10. Freeing init memory: 108K UBIFS: recovery needed UBIFS: recovery completed UBIFS: mounted UBI device 2, volume 0, name «work» UBIFS: file system size: 140507136 bytes (137214 KiB, 133 MiB, 1089 LEBs) UBIFS: journal size: 9033728 bytes (8822 KiB, 8 MiB, 71 LEBs) UBIFS: media format: w4/r0 (latest is w4/r0) UBIFS: default compressor: lzo UBIFS: reserved for root: 0 bytes (0 KiB)
Берете список датчиков из панели или из консоли
далее берем ардуино и пишем код который будет брать ваш новый датчик ds18b20 и изменять его id на тот что есть в вашей коробке и отправлять его коробке
/* * Example-Code that emulates a DS18B20 * * Tested with: * — https://github.com/PaulStoffregen/OneWire —> DS18x20-Example, atmega328@16MHz as Slave * — DS9490R-Master, atmega328@16MHz and teensy3.2@96MHz as Slave */ #include «OneWireHub.h» #include «DS18B20.h» // Digital Thermometer, 12bit #include <OneWire.h> OneWire ds(11); // on pin 10 (a 4.7K resistor is necessary) constexpr uint8_t pin_led { 13 }; constexpr uint8_t pin_onewire { 12 }; float celsius, fahrenheit; auto hub = OneWireHub(pin_onewire); auto ds18b20 = DS18B20(0x28, 0xA0, 0x36, 0x14, 0x03, 0x00, 0x00); // DS18B20: 9-12bit, -55 — +85 degC //28A0361403000088 auto ds18s20 = DS18B20(0x10, 0x00, 0x00, 0xA2, 0x18, 0xDA, 0x00); // DS18S20: 9 bit, -55 — +85 degC auto ds1822 = DS18B20(0x22, 0x00, 0x00, 0x22, 0x18, 0xDA, 0x00); // DS1822: 9-12bit, -55 — +125 degC bool blinking(void); void setup() { Serial.begin(9600); Serial.println(«OneWire-Hub DS18B20 Temperature-Sensor»); Serial.flush(); pinMode(pin_led, OUTPUT); // Setup OneWire hub.attach(ds18b20); // hub.attach(ds18s20); // hub.attach(ds1822); ds18b20.setTemperature(int8_t(85)); }; void loop() { // following function must be called periodically hub.poll(); // this part is just for debugging (USE_SERIAL_DEBUG in OneWire.h must be enabled for output) if (hub.hasError()) hub.printError(); // Blink triggers the state-change if (blinking()) { // Set temp static float temperature = celsius; //temperature += 0.1; if (temperature > 30.0) temperature = 20.0; ds18b20.setTemperature(celsius); //ds18s20.setTemperature(temperature); //ds1822.setTemperature(temperature); Serial.println(celsius); //————————————————————————— byte i; byte present = 0; byte type_s; byte data[12]; //byte addr[8]; //28 FF 7 DD 61 15 1 C6 unsigned char addr[8] = {0x28, 0xFF, 0x07, 0xDD, 0x61, 0x15, 0x01, 0xC6}; //float celsius, fahrenheit; ds.reset(); ds.select(addr); ds.write(0x44, 1); // start conversion, with parasite power on at the end present = ds.reset(); ds.select(addr); ds.write(0xBE); // Read Scratchpad for ( i = 0; i < 9; i++) { // we need 9 bytes data[i] = ds.read(); //Serial.print(data[i], HEX); // Serial.print(» «); } int16_t raw = (data[1] << 8) | data[0]; if (type_s) { raw = raw << 3; // 9 bit resolution default if (data[7] == 0x10) { // «count remain» gives full 12 bit resolution raw = (raw & 0xFFF0) + 12 — data[6]; } } else { byte cfg = (data[4] & 0x60); // at lower res, the low bits are undefined, so let’s zero them if (cfg == 0x00) raw = raw & ~7; // 9 bit resolution, 93.75 ms else if (cfg == 0x20) raw = raw & ~3; // 10 bit res, 187.5 ms else if (cfg == 0x40) raw = raw & ~1; // 11 bit res, 375 ms //// default is 12 bit resolution, 750 ms conversion time } celsius = (float)raw / 16.0; //fahrenheit = celsius * 1.8 + 32.0; Serial.print(» Temperature = «); Serial.print(celsius); Serial.print(» Celsius, «); //Serial.print(fahrenheit); //Serial.println(» Fahrenheit»); //————————————————————————— } } bool blinking(void) { constexpr uint32_t interval = 1000; // interval at which to blink (milliseconds) static uint32_t nextMillis = millis(); // will store next time LED will updated if (millis() > nextMillis) { nextMillis += interval; // save the next time you blinked the LED static uint8_t ledState = LOW; // ledState used to set the LED if (ledState == LOW) ledState = HIGH; else ledState = LOW; digitalWrite(pin_led, ledState); return 1; } return 0; }
Пин 12 это выход на разьем в коробку, пин 11 это дата пин вашего нового датчика ds18b20, так же не забываем подтягивать новый датчик резистором на 4,7ком на шину +5В
После этого заходим в консоль коробки и проверяем как она видит ваш датчик
root [ ~ ]# tempcontrol
Found sensors:
0: 28 A0 36 14 03 00 00 88
RomCode: 28A0361403000088 Port: 0 Order :0 Time: 1496909700 Temp: 335
RomCode: 28A0361403000088 Port: 0 Order :0 Time: 1496909702 Temp: 335
RomCode: 28A0361403000088 Port: 0 Order :0 Time: 1496909703 Temp: 340
RomCode: 28A0361403000088 Port: 0 Order :0 Time: 1496909704 Temp: 340
RomCode: 28A0361403000088 Port: 0 Order :0 Time: 1496909705 Temp: 335