brooksdata
@megan_b40 · Eylül 2025 tarihinde katıldı
Data analyst · water and wastewater
- Konular
- 2
- Yanıtlar
- 47
- Puan
- 0
Oluşturulan forum yanıtları
Yapay zekâ tarafından English dilinden çevrildi ·
MOSI ve MISO, SPI’nin iki veri hattıdır. Bence sizin kartınızda DO, MOSI’ye karşılık geliyor? Yani veri çıkışı.
MOSI and MISO are the two data lines of SPI. I think DO is MOSI on yours? Data out.
Yapay zekâ tarafından English dilinden çevrildi ·
Veri uzmanı soruyor: Yani kartta kasıtlı olarak boş pedler mi var?
Data person asking: so the board has empty pads on purpose?
Yapay zekâ tarafından English dilinden çevrildi ·
Bunun neredeyse aynısını birkaç küçük pompa istasyonunda çalıştırıyoruz, o yüzden bu konuda birkaç şey paylaşayım.Kesintileriniz göz önüne alındığında ortadaki Pi iyi bir tercih. Ağ geçidi olarak çalışmasını sağlayın: Hermetry’de “Bu cihaz bir ağ geçididir” olarak işaretlenmiş tek bir cihaz olsun ve Pi her odayı ilk bildirdiğinde o oda bir alt cihaz olarak eklensin. Node-RED, Mosquitto’dan oda mesajlarını toplasın, internet kesikken bunları bir dosyada ya da küçük bir SQLite tablosunda tutsun, sonra kendi zaman damgalarıyla gönderin:
topic v1/gw/telemetry
{"Room 4": [{"ts": 1793000000000, "values": {"temperature": 22.1, "humidity": 51, "door_open": 0}},
{"ts": 1793000300000, "values": {"temperature": 22.0, "humidity": 51, "door_open": 1}}]}
Herhangi bir veriye ts eklemeden önce Pi’nin doğru saate sahip olduğundan emin olun (açılıştan sonra NTP). Büyük bir birikim biraz daha yavaş boşalır, çünkü tekrar oynatmalar profilde kendi hız sınırına sahiptir; bu normaldir.Şofben kontrolü aynı Pi üzerinden yapılabilir. Alt bir cihaza gönderilen komut, ağ geçidine v1/gw/rpc üzerinden ulaşır; dolayısıyla Node-RED bunu dinleyip doğru odaya iletir. Ya da şofben kontrolcüsünü Hermetry’ye doğrudan bağlanan kendi cihazı yapabilirsiniz. Şofben için doğrudan bağlantıyı tercih ederim, daha az hareketli parça olur.Ağ geçidi konuları Devices behind a gateway sayfasında açıklanmıştır.
We run nearly this at a few small pump stations, so a couple of things from that.
The Pi in the middle is a good call because of your outages. Have it act as a gateway: one device in Hermetry marked “This device is a gateway”, and each room becomes a child device the first time the Pi reports it. Node-RED collects the room messages from Mosquitto, keeps them in a file or a small SQLite table while the internet is down, and then sends them on with their own timestamps:
topic v1/gw/telemetry
{"Room 4": [{"ts": 1793000000000, "values": {"temperature": 22.1, "humidity": 51, "door_open": 0}},
{"ts": 1793000300000, "values": {"temperature": 22.0, "humidity": 51, "door_open": 1}}]}
Make sure the Pi has the right time (NTP after boot) before you put a ts on anything. A big backlog drains a bit slower because replays have their own rate limit on the profile, that’s normal.
Geyser switching can go through the same Pi. A command sent to a child device comes down to its gateway on v1/gw/rpc, so Node-RED subscribes to that and passes it on to the right room. Or make the geyser controller its own device that connects to Hermetry directly. For a geyser I’d go direct, fewer moving parts.
Gateway topics are described in Devices behind a gateway.
Yapay zekâ tarafından English dilinden çevrildi ·
Bu, cihaz tarafı için; komutları bekliyor. Bence cihaz token’ı yerine bir API anahtarı kullanman gerekiyor. Bir süre önce python requests ile buna benzer bir şey yapmıştım ama yolu hatırlamıyorum.
That one is for the device side, it waits for commands. I think you need an API key instead of the device token, I did something like this with python requests a while ago but I don’t remember the path.
Yapay zekâ tarafından English dilinden çevrildi ·
Güzel. Bahar ve sonbahardaki saat değişimi etrafında 22:00 vardiyasını izleyin, zaman damgalarımız UTC ve bir keresinde 7 saatlik kayma yaşadık.
Nice. Watch the 22:00 shift around the clock change in spring and autumn, our timestamps are UTC and we got a 7 hour shift once.
Yapay zekâ tarafından English dilinden çevrildi ·
Grove yalnızca bir konnektör standardıdır; Grove-dişi jumper kablolarıyla bağlayabilir (ya da bir kabloyu ikiye kesebilirsiniz). Bunun gibi bir sınıf kitini ESP32’lerde denedim.Dijital ve analog modüller:
yellow SIG (ana sinyal: dijital veya analog çıkış)
white NC veya ikinci sinyal (çoğu tekil modülde kullanılmaz)
red VCC
black GND
I2C modüllerinde yellow = SCL, white = SDA kullanılır.Modül başına kontrol edilmesi gereken şey voltajdır. Işık sensörü (v1.2) ve ses sensörü analogdur ve 3.3 V ile sorunsuz çalışır; çıkışları 3.3 V’un altında kalır, bu yüzden doğrudan ESP32 ADC1 pinlerine (GPIO32-39) bağlanabilirler. ADC2, Wi-Fi açıkken çalışmaz. DHT11 modülü de kısa bir kabloyla 3.3 V’ta çalışır. Grove röle bobini 5 V’tur: DevKit üzerinde USB ile VIN pininden, yani 5 V pininden besleyin; girişi 3.3 V sinyalle sorunsuz çalışır.Çıkışı bir ESP32 pinine giden hiçbir modüle 5 V vermeyin, ESP32 5 V toleranslı değildir.Ses sensörü ham ses değil, bir zarf (envelope) verir. Her 50 ms’de bir örnekleyin ve bir dakikalık maksimum ve ortalama değeri gönderin, ör. {"temperature": 21, "light": 1830, "noise_avg": 312, "noise_max": 744}; böylece yanından geçen bir forklift bir tepe olarak görünür.
Grove is just a connector convention, wire it with Grove-to-female-jumper cables (or cut one cable in half). Did a classroom kit like this on ESP32s.
Digital and analog modules:
yellow SIG (the main signal: digital or analog out)
white NC or second signal (unused on most single modules)
red VCC
black GND
I2C modules use yellow = SCL, white = SDA.
Voltage is the part to check per module. The light sensor (v1.2) and loudness sensor are analog and run fine at 3.3 V, their output stays below 3.3 V, so straight into ESP32 ADC1 pins (GPIO32-39; ADC2 doesn’t work while Wi-Fi is on). The DHT11 module works at 3.3 V too, with a short cable. The Grove relay coil is 5 V: power it from the 5 V pin (VIN on the DevKit with USB), its input is happy with a 3.3 V signal.
Don’t feed any module 5 V if its output goes into an ESP32 pin, the ESP32 isn’t 5 V tolerant.
The loudness sensor gives an envelope, not audio. Sample it every 50 ms and send the max and average for the minute, e.g. {"temperature": 21, "light": 1830, "noise_avg": 312, "noise_max": 744}, so a forklift going past shows up as a peak.
Yapay zekâ tarafından English dilinden çevrildi ·
ERP tam olarak neye ihtiyaç duyuyor, vardiya başına tek bir toplam mı yoksa çalışan bir sayım mı?
What does the ERP need exactly, one total per shift or a running count?
Yapay zekâ tarafından English dilinden çevrildi ·
Okumaların yanında bir hata sayacı göndermek faydalı olur, modbus.crc_errors veya benzeri. Sahalarımızda bu sayacın artması, gevşek bir A/B kablosunun ilk işareti olmuştu.
Worth sending an error counter next to the readings, modbus.crc_errors or similar. On our sites that counter going up was always the first sign of a loose A/B wire.
Yapay zekâ tarafından English dilinden çevrildi ·
Çözülmedi; ESP32, I2C’yi GPIO matrisi üzerinden neredeyse herhangi bir pine yönlendirebilir. Tarayıcının çalışması kablolamanın doğru olduğunu kanıtlar.Olan şu: sht4.begin() ve ina219.begin() parametresiz çağrıldığında kütüphane içinde yeniden Wire.begin() çağrılıyor ve parametresiz Wire.begin() veriyolunu varsayılan 21 ve 22 pinlerine geri alıyor. Bu, I2C’yi sensörlerinizden uzaklaştırıp RS-485 alıcı-vericinize taşıyor; ikinci belirtiyi de bu açıklıyor.Kütüphanelere zaten başlattığınız veriyolunu verin:
Wire.begin(32, 33);
Wire.setClock(100000);
if (!sht4.begin(&Wire)) Serial.println("SHT40 not found");
if (!ina219.begin(&Wire)) Serial.println("INA219 not found");
Adafruit kütüphanelerinin çoğu TwoWire* alır. Almayan bir kütüphane varsa sensörler için Wire1 kullanın ve Wire‘a dokunmayın.Pin seçimi hakkında: 34 ile 39 yalnızca giriştir, bu yüzden asla SDA veya SCL olarak kullanmayın. Mümkünse 0, 2, 12 ve 15 numaralı strapping pinlerinden uzak durun; 12 üzerindeki bir pull-up kartın açılmasını engelleyebilir.
Not fixed, the ESP32 can route I2C to almost any pin through its GPIO matrix. The scanner working proves your wiring is fine.
What happens is that sht4.begin() and ina219.begin() with no arguments call Wire.begin() again inside the library, and a bare Wire.begin() puts the bus back on the default pins 21 and 22. That moves I2C away from your sensors and onto your RS-485 transceiver, which explains the second symptom too.
Give the libraries the bus you already started:
Wire.begin(32, 33);
Wire.setClock(100000);
if (!sht4.begin(&Wire)) Serial.println("SHT40 not found");
if (!ina219.begin(&Wire)) Serial.println("INA219 not found");
Most of the Adafruit libraries take a TwoWire*. If one does not, use Wire1 for the sensors and leave Wire alone.
On pin choice: 34 to 39 are input only, so never SDA or SCL. And stay off the strapping pins 0, 2, 12 and 15 if you can, a pull-up on 12 can stop the board from booting.
Yapay zekâ tarafından English dilinden çevrildi ·
Bluetooth’u kapattınız mı? Pi 3’te varsayılan olarak iyi UART, Bluetooth’a yönlendirilir.
Did you turn Bluetooth off? On the Pi 3 the good UART goes to Bluetooth by default.
Yapay zekâ tarafından English dilinden çevrildi ·
Su işletmesinde veri tarafındayım, dolayısıyla bu tartışmayı panoları isteyen kişilerden de görüyorum. Tesislerimiz tam olarak bu ayrımla çalışıyor ve yıllardır sorunsuz sürüyor.PLC kontrolü yapar: ağ çalışsa da çalışmasa da I/O’yu birkaç milisaniyede bir tarar, girişleri ve çıkışları 24 V saha kablolamasına ve gürültülü pano ortamlarına göre tasarlanmıştır, sertifikalı güvenlik seçenekleri vardır ve gece vardiyasındaki teknisyen merdiven mantığını açıp bir pompanın neden çalışmadığını görebilir. ESP32 mantığı yürütebilir, ancak tüm bunları kendiniz geliştirip sertifikalandırmanız ve ardından 15 yıl boyunca desteklemeniz gerekir.Hermetry izleme ve denetim işlevi görür: geçmiş veriler, alarmlar, paneller, operatörlerin komut göndermesi. Hermetry’nin kendi hazır su çözümü bile bunu böyle tutar: pompa istasyonlarının otomatik başlatma ve durdurma işlemi istasyonun kontrolcüsünde kalır, bulut yalnızca manuel modu değiştirir ve komut üzerine pompaları çalıştırır. Bakınız: Water site. İnternet kesilirse bir bulut kuralı bir konveyörü durduramaz.ESP32’lerin mantıklı olduğu yer: PLC’nin sahip olmadığı ek sensörler, örneğin motordaki titreşim, pano sıcaklıkları, enerji sayaçları. Ucuzdurlar, risk taşımazlar ve doğrudan Hermetry’ye giderler.Kevin, maliyet sorusunu sayılarla yanıtlamak gerekiyor: bir hatta bir saatlik duruş süresi ile bir S7-1200’ün fiyatı.
I’m on the data side at a water operator, so I see this argument from the people who want dashboards. Our sites run exactly this split and it’s held up for years.
The PLC does control: it scans I/O every few milliseconds whether the network is up or not, its inputs and outputs are made for 24 V field wiring and noisy cabinets, it has certified safety options, and the night-shift technician can open the ladder logic and see why a pump didn’t start. An ESP32 can do the logic, but you’d be building and certifying all of that yourself, then supporting it for 15 years.
Hermetry does monitoring and supervision: history, alarms, dashboards, operators sending a command. Even Hermetry’s own ready-made water solution keeps it that way, the pump stations’ automatic start and stop stays in the station’s controller and the cloud only switches manual mode and pumps on command. See Water site. If the internet drops, a cloud rule can’t stop a conveyor.
Where ESP32s do make sense: extra sensors the PLC doesn’t have, like vibration on a motor, temperatures in a cabinet, energy meters. Cheap, no risk, and they go straight to Hermetry.
Kevin, the cost question is the one to answer with numbers: one hour of downtime on a line versus the price of an S7-1200.
Yapay zekâ tarafından English dilinden çevrildi ·
Düzeltildi! printf sürümü çalışıyor, yedi .up anahtarının tamamı görünüyor ve raw değeri güncellenmeyi durdurdu. Sonunda Ciaran’ın fikrini benimsedim, çünkü operasyon ekibi daha fazla site ekleyecek; artık her site tek bir up anahtarı ve bir kuralı olan bir alt öğe. Pump 6 dün gece gerçek bir kesinti yaşadı ve alarm beklendiği gibi 5 minutes sonra açıldı.
Fixed! printf version works, all seven .up keys show up and raw stopped updating. Went with Ciaran’s idea in the end because ops will add more sites, so now each site is a child with a single up key and one rule. Pump 6 had a real outage last night and the alarm opened after 5 minutes like it should.
Yapay zekâ tarafından English dilinden çevrildi ·
Çalışıyor, ham değer her dakika güncelleniyor. Demek ki sorun tırnak kullanımında. Bash tırnakları beni hep kafamda karıştırıyor.
It runs, raw updates every minute. So it’s the quoting. I always get confused by bash quotes.
Yapay zekâ tarafından English dilinden çevrildi ·
Rev B geri döndü: her 4 mm’de dikişli üst döküm, tüm katmanlarda anten yasak bölgeleri temizlendi, antenler karşılıklı köşelere yerleştirildi. İlk konum sabitlenme süresi yaklaşık 3 dakikadan 35 saniyeye düştü ve aynı test noktasında LoRa SNR değeri 6 dB iyileşti. Veri tarafındaki biri için grafik karşılaştırması çok tatmin ediciydi.
Rev B is back: stitched top pour every 4 mm, antenna keep-outs cleared on all layers, antennas on opposite corners. Time to first fix went from about 3 minutes to 35 s, and LoRa SNR at the same test spot improved by 6 dB. The chart comparison was very satisfying for a data person.
Yapay zekâ tarafından English dilinden çevrildi ·
Plastik kutu. Yine de iyi bir fikir.
Plastic box. Good thought though.

