New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

Derya Toprak

deryat12

@toprak-d · Joined November 2025

Newcomer

Otomasyon mühendisi · ilaç

Topics
1
Replies
16
Points
0
Newcomer10 points to Member

Forum Replies Created

Viewing 15 posts – 1 through 15 (of 16 total)

Translated from Türkçe by AI ·

Be careful, the Wi-Fi and Ethernet MAC of the Pi are different. If the Pi’s connect over Wi-Fi, you will see the wlan0 MAC in the DHCP list.

♥ 0

Translated from Türkçe by AI ·

Running nmap on the corporate network can give you headaches, the IT team doesn’t really like it.

♥ 0

Translated from Türkçe by AI ·

The button idea is good, we also put it inside the panel cover, so it can’t be pressed without opening the cover.

♥ 2

Translated from Türkçe by AI ·

If you accept automatically, anyone within range can pair, so be careful. Bluetooth passes through walls even when the panel is locked.

♥ 1

Uno’nun USB tarafını ana işlemci değil, yanındaki ATmega16U2 yönetiyor ve o sadece seri port gibi davranıyor. 16U2’yi yeniden programlayıp klavye yapanlar var ama zahmetli. Biz ilaç tarafında etiket yazıcısına benzer bir şey yaptık, şöyle kurdum:

Doğrudan USB’si olan bir kart lazım. Leonardo veya Pro Micro (ATmega32u4) Keyboard.h ile klavye olur. Ben ESP32-S3’ü tercih ederim: hem Wi-Fi’si var hem yerel USB’si, tek kart hem Hermetry’ye MQTT ile bağlanıyor hem klavye oluyor. Arduino-ESP32 core’unda USBHIDKeyboard var.

Hermetry tarafında kartın profiline Commands sekmesinden dozaj.yaz diye bir komut ekle, tek parametre: deger (Number, min-max aralığını gir ki saçma bir değer hiç gitmesin). Tier’ı Privileged yap, “High impact” işaretle; gönderen onaylamak zorunda kalır ve kayıt audit log’a düşer.

Kart tarafı kabaca:

void komutGeldi(int id, float deger) {
  if (deger < 0.2 || deger > 3.0) { cevap(id, false); return; }
  char s[12];
  dtostrf(deger, 0, 2, s);
  Keyboard.print(s);
  Keyboard.write(KEY_RETURN);
  cevap(id, true);           // v1/rpc/res/{id} {"ok": true}
}

En büyük risk odak: klavye yazdığı yere yazar. Operatör o sırada başka bir pencerede ise değer oraya gider. Biz komuttan önce programın penceresini öne getiren bir kısayol (Alt+Tab değil, programın kendi kısayolu) yazdırdık, sonra alana Tab ile gittik.

Accepted solution♥ 9

Ayşe’nin sorusu birinci sorun, kodunuz da ikinci. İkisini de geçen yıl aynı kurulumda yaşadım.

1. Gerilim: RFM95 3.3 V çipi, SPI pinleri 5 V’a toleranslı değil. Mega’nın MOSI, SCK, NSS ve RESET çıkışları 5 V. Modül bir süre “çalışıyor gibi” yapıyor, sonra kilitleniyor. Araya bir seviye dönüştürücü koyun (74LVC245 ya da en azından MOSI/SCK/NSS’de dirençli bölücü). Modül hasar görmüş olabilir, yenisiyle deneyin. Daha basiti 3.3 V çalışan bir kart.

2. onReceive bir kesmeden çağrılıyor. İçinde Serial.print, String birleştirme ve hele MQTT publish yaparsanız kesme çok uzun sürer, Ethernet shield de SPI’yi kullandığı için LoRa ile aynı hatta çakışıyorlar. Kesmede sadece bayrak kaldırın, işi loop()’ta yapın:

volatile int rxSize = 0;
void onReceive(int size) { rxSize = size; }

void loop() {
  if (rxSize) {
    char buf[64]; int n = 0;
    while (LoRa.available() && n < 63) buf[n++] = (char)LoRa.read();
    buf[n] = 0; rxSize = 0;
    gonderHermetry(buf);
    LoRa.receive();          // tekrar alma moduna al
  }
  mqtt.loop();
}

Ethernet shield ile RFM95’in CS pinleri ayrı olsun, birini seçerken öbürü HIGH kalsın.

Accepted solution♥ 5

Translated from Türkçe by AI ·

A relay would work too, but for two switchings a day a MOSFET is quieter and cleaner. My suggestion:A logic-level N-channel MOSFET (like IRLZ44N), low-side wiring. The positive of the lamps goes directly to 12V, the negative to the MOSFET’s drain, and the source to the battery (negative). Put a 100 Ω series resistor from the Pi’s GPIO to the gate, and a 10k pull-down between gate and source. Without the pull-down the lamps will flicker while the Pi boots. At 4 A the IRLZ44N runs comfortably without a heatsink. Don’t forget to join the Pi’s negative with the battery’s negative.For scheduling, use the Rules card in Hermetry:

  • When: Sunrise or sunset, sunset, offset -15 minutes
  • Then: Send command, device Pi, command light.set, parameter on: true
  • A second rule: sunrise, on: false

You need to add the command to the Commands catalog of the device profile. The site’s location must also be entered, otherwise the card won’t save: the location of the nearest asset on the device is used. Details: Rules card: triggers.On the Pi side, subscribe to the topic v1/rpc/req/+, drive the pin when light.set arrives, and reply via v1/rpc/res/<id>. That way the seasonal worry goes away too.

Accepted solution♥ 3

Translated from Türkçe by AI ·

At 2 km Zigbee won’t work then, it struggles to cover even a few hundred meters in open areas. You’d need a repeater in between, and the battery will be a headache too.

♥ 0

Çok net oldu, teşekkürler Esra Hanım. Vanayı Opening’e bağladım, SP için set point kartı koydum, Kp’yi ekrandan kaldırdım. Komutu ilk başta Privileged yapmıştım, panodan “This command cannot be sent from a board” hatası aldım, Basic’e çektik ama kartı sadece vardiya şefleri görsün diye ayrı bir panoya koyduk.

♥ 1
Viewing 15 posts – 1 through 15 (of 16 total)