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 ·
Log sekmesi çok fazla tahmin yürütmeyi ortadan kaldırıyor. +1
The Log tab saves so much guessing. +1
Yapay zekâ tarafından English dilinden çevrildi ·
Aynı deneyim, aynı satıcıdan aldığım iki I2C modülü de 0x3F çıktı.
Same experience, two of my backpacks from the same seller were 0x3F.
Yapay zekâ tarafından English dilinden çevrildi ·
David’in hoparlörüyle aynı fizik, evet. RF darbesi ADC’nin giriş katı (ya da hattaki herhangi bir yarı iletken eklem) tarafından doğrultulur ve bu, darbenin süresince bir DC ofseti olarak görünür. 217 Hz’deki 2G tarzı darbeler en kötüsüdür, ama LTE yukarı bağlantı darbeleri de aynısını yapar. İş yerinde baktığım bir pano tam olarak senin durumundaydı, yalnızca yüklemeler sırasında pikler.Bizde neyin çözdüğü, en ucuzdan başlayarak:
- Anteni panonun dışına çıkarın. Panonun çatısına kısa kablolu bir anten. Çelik bir kutunun içinde yönlendirici, 30 cm uzaklıktaki kablolamanıza bağırıyor.
- 4-20 mA hattı için ekranlı bükümlü çift; ekran yalnızca kontrolör tarafında topraklansın.
- ADC pininin hemen yanına 1 k ve 100 nF’lik bir RC filtresi, ayrıca RF için pine yakın bir 100 pF kondansatör. Seviyeniz milisaniyeler içinde değişmez, bunu karşılayabilirsiniz.
- Sinyal çiftinin kontrolöre girdiği yere takılan bir klips tipi ferrit.
- Yönlendiricide LTE’ye kilitleme ve 2G’ye geri dönmeme ayarı varsa, onu kullanın.
İlk ikisinden sonra piklerimiz bizde kayboldu. Eski pikler geçmişinizde kalır; bu seviyeye bir alarm kuran biri varsa, alarmı tetikleyip tetiklemediklerini kontrol edin. Yüksek seviye kuralında art arda 2 veya 3 okuma gerektiren bir debounce, kalan tekil pikleri gizler.
Same physics as David’s speaker, yes. The RF burst gets rectified by the input stage of the ADC (or any semiconductor junction on the line), and that shows up as a DC offset for the length of the burst. 2G-style bursts at 217 Hz are the worst, but LTE uplink bursts do it too. A cabinet I look after at work had exactly your picture, spikes during uploads only.
What fixed ours, cheapest first:
- Get the antenna out of the cabinet. A short-cable antenna on the cabinet roof. Inside a steel box the router is shouting at your wiring from 30 cm.
- Shielded twisted pair for the 4-20 mA run, shield grounded at the controller end only.
- An RC filter right at the ADC pin, 1 k and 100 nF, plus a 100 pF cap close to the pin for the RF itself. Your level doesn’t change in milliseconds, you can afford it.
- A clip-on ferrite on the signal pair where it enters the controller.
- If the router has a setting to lock it to LTE and not fall back to 2G, use it.
After the first two the spikes were gone for us. Old spikes stay in your history, so if anyone set an alarm on that level, check whether they were tripping it. A readings-in-a-row debounce of 2 or 3 on the high-level rule hides any single leftover.
Yapay zekâ tarafından English dilinden çevrildi ·
Profildeki Custom topics bunun için değil mi? v1/ dışındaki herhangi bir konuyu kabul eden bir ayar olduğunu hatırlıyorum.
Isn’t that what Custom topics on the profile are for? I remember a setting that accepts any topic outside v1/.
Yapay zekâ tarafından English dilinden çevrildi ·
Her iki uçta da sonlandırma ve polarizasyon (bias) var mı?
Do you have termination and bias on either end?
Yapay zekâ tarafından English dilinden çevrildi ·
Yani asıl ilk adım bir veri seti. Hermetry’de zaten haftalarca okuma verin var, sadece etiketlere ihtiyacın var: temizlik ekibinin giriş/çıkış saatleri yeterli olur.
So the real first step is a dataset. You already have weeks of readings in Hermetry, you just need labels: housekeeping’s check-in/check-out times would do.
Yapay zekâ tarafından English dilinden çevrildi ·
Bizimkini Personnel tracking hazır çözümüyle yaptık, oda düzeyi için Safe’e ihtiyacımız olmadı.
We did ours with the Personnel tracking ready solution, didn’t need Safe for room-level.
Yapay zekâ tarafından English dilinden çevrildi ·
Hermetry tarafında, battery_v değerinin sayı olarak gönderildiğini kontrol edin. Daha önce “11.9V” metni olarak gittiğini gördüm ve o zaman hiçbir şey çalışmıyor.
On the Hermetry side, check battery_v is sent as a number. I’ve seen it go out as “11.9V” text before and then nothing works.
Yapay zekâ tarafından English dilinden çevrildi ·
Sorun tam olarak bu, ilk kurulumumda da aynı şeyi yapmıştım. I2C pinleri fiziksel pin 3 (BCM GPIO2, SDA) ve fiziksel pin 5 (BCM GPIO3, SCL). Sen SDA’yı aslında SCL olan GPIO3’e, SCL’yi ise fiziksel pin 29 olan ve hiç I2C olmayan GPIO5’e bağlamışsın. Bu yüzden veriyolunda yanıt veren bir cihaz yok ve boş tablo görüyorsun. Sensörlerin büyük ihtimalle sağlam.SDA’yı fiziksel pin 3’e, SCL’yi fiziksel pin 5’e taşı; o zaman BME280 için 0x77 (ya da SDO jumper’ına bağlı olarak 0x76) ve VEML7700 için 0x10 görmelisin. Pi’nin bu iki pinde zaten 1.8 kΩ pull-up dirençleri var ve breakout kartları da kendi dirençlerini ekliyor, o yüzden fazlasını ekleme.Okuma ve gönderme kısmı da kısa. Ben Adafruit CircuitPython sürücülerini ve paho’yu kullanıyorum:
import json, time, board, adafruit_bme280.basic as bme, adafruit_veml7700
import paho.mqtt.client as mqtt
i2c = board.I2C()
env = bme.Adafruit_BME280_I2C(i2c, address=0x77)
lux = adafruit_veml7700.VEML7700(i2c)
c = mqtt.Client(client_id="lab-env-01")
c.username_pw_set(TOKEN) # token as username, no password
c.tls_set()
c.connect(BROKER_HOST, 8883, 60)
c.loop_start()
while True:
msg = {"temp_c": round(env.temperature, 2), "rh": round(env.humidity, 1),
"pressure_hpa": round(env.pressure, 1), "lux": round(lux.lux, 1)}
c.publish("v1/telemetry", json.dumps(msg), qos=1)
time.sleep(30)
Düz bir nesne, bu yüzden Hermetry 30 saniyelik okumalar için alındığı zamanı damgalar, bu yeterli. Zaman damgası eklemek istersen payload kuralları burada: MQTT topics and payload reference.
That’s the problem, I did exactly the same thing on my first build. The I2C pins are physical pin 3 (that’s BCM GPIO2, SDA) and physical pin 5 (BCM GPIO3, SCL). You have SDA on GPIO3, which is actually SCL, and SCL on GPIO5, which is physical pin 29 and not I2C at all. So the bus has no device answering and you get the empty grid. The sensors are almost certainly fine.
Move SDA to physical pin 3 and SCL to physical pin 5, then you should see 0x77 (or 0x76, depends on the SDO jumper) for the BME280 and 0x10 for the VEML7700. The Pi has 1.8 kΩ pull-ups on those two pins already, and the breakouts add their own, so don’t add more.
Then reading and sending is short. I use the Adafruit CircuitPython drivers plus paho:
import json, time, board, adafruit_bme280.basic as bme, adafruit_veml7700
import paho.mqtt.client as mqtt
i2c = board.I2C()
env = bme.Adafruit_BME280_I2C(i2c, address=0x77)
lux = adafruit_veml7700.VEML7700(i2c)
c = mqtt.Client(client_id="lab-env-01")
c.username_pw_set(TOKEN) # token as username, no password
c.tls_set()
c.connect(BROKER_HOST, 8883, 60)
c.loop_start()
while True:
msg = {"temp_c": round(env.temperature, 2), "rh": round(env.humidity, 1),
"pressure_hpa": round(env.pressure, 1), "lux": round(lux.lux, 1)}
c.publish("v1/telemetry", json.dumps(msg), qos=1)
time.sleep(30)
Flat object, so Hermetry stamps it with the receive time, fine for 30 s readings. Payload rules are here if you want to add timestamps later: MQTT topics and payload reference.
Yapay zekâ tarafından English dilinden çevrildi ·
Ha, iyi ki biri beni düzeltti. “Pi’nin bakış açısından” ifadesini hatırlayacağım.
Ha, good that someone corrected me. I’ll remember “from the Pi’s view”.
Yapay zekâ tarafından English dilinden çevrildi ·
WiFiManager, bağlanamazsa portala yeniden geri döner, bu kısım çözülmüş durumda.Kimlik bilgisi konusunda, tek bir ortak token yanlıştan da kötüdür. Hermetry cihaz başına tek oturuma izin verir, dolayısıyla tek token paylaşan 30 kart birbirinin oturumunu sürekli düşürür. Bunun yerine profilin provisioning özelliğini kullanın. Aynı firmware’i profilin provisioning anahtarı ve sırrıyla yükleyin; her kart ilk açılışta kendi kimlik bilgisini ister:
// first boot only, after Wi-Fi is up
// MQTT connect: username "provision", empty password, TLS
subscribe("v1/provision/res");
publish("v1/provision/req",
"{"deviceName":"logger-" + chipId + "","
""provisionDeviceKey":"pk_...","provisionDeviceSecret":"ps_..."}");
// answer: {"status":"SUCCESS","credentialsType":"ACCESS_TOKEN","credentialsValue":"..."}
// store credentialsValue in NVS, reconnect with it, never provision again
Profilin Provisioning sekmesinde bir strateji seçersiniz. Yeni cihaz oluşturmaya izin ver seçilirse, her yeni kart karantinaya düşer ve bir yönetici etkinleştirene kadar verileri atılır. Yalnızca önceden provizyonlanmış cihazlar seçilirse, 30 kartınız için logger-<chipId> adlarını önceden oluşturursunuz ve sızan bir anahtar yabancı cihaz ekleyemez. 30 birim için önceden oluşturmanızı öneririm. Hermetry mevcut bir ad için kimlik bilgisini yeniden vermez, bu yüzden token’ı NVS’de güvende tutun. Ayrıntılar için Cihaz ekleme ve sahiplenme sayfasına bakın.
WiFiManager falls back to the portal again if it can’t join, that part’s handled.
For the credential, one shared token is worse than wrong. Hermetry allows one session per device, so 30 boards on one token keep throwing each other off. Use the profile’s provisioning instead. You flash the same firmware with the profile’s provisioning key and secret, and each board asks for its own credential on first start:
// first boot only, after Wi-Fi is up
// MQTT connect: username "provision", empty password, TLS
subscribe("v1/provision/res");
publish("v1/provision/req",
"{"deviceName":"logger-" + chipId + "","
""provisionDeviceKey":"pk_...","provisionDeviceSecret":"ps_..."}");
// answer: {"status":"SUCCESS","credentialsType":"ACCESS_TOKEN","credentialsValue":"..."}
// store credentialsValue in NVS, reconnect with it, never provision again
On the profile’s Provisioning tab you pick a strategy. With Allow creating new devices, each new board lands in quarantine and its data is dropped until an admin activates it. With Only pre-provisioned devices you create logger-<chipId> names beforehand from your 30 boards, and a leaked key can’t add strangers. For 30 units I’d pre-create them. Hermetry never re-issues a credential for an existing name, so keep the token safe in NVS. Details on Adding and claiming devices.
Yapay zekâ tarafından English dilinden çevrildi ·
Daniel haklı. Geçen yıl bir pompa istasyonundaki Pi’de tam olarak bunu yaşadım. eth0’ı yapılandıran iki şey var: dhcpcd önyüklemede başlıyor, DHCP sunucusu bulamayınca porta 169.254 link-local adresi ve rotalar veriyor, ardından ifup kendi adresini ve varsayılan rotasını eklemeye çalışıyor. Rota zaten var olduğu için çekirdek “File exists” yanıtını veriyor ve ifup pes ediyor. Önyüklemede hangisinin yarışı kazanmasına bağlı olarak ağ geçidiniz çıkabiliyor ya da çıkamıyor.Birini seçin. Bullseye’da bu dhcpcd demek. /etc/network/interfaces dosyasından eth0 bloğunu kaldırın (dosyada yalnızca source satırı kalsın) ve statik ayarı /etc/dhcpcd.conf dosyasına koyun:
interface eth0
static ip_address=10.40.2.20/24
static routers=10.40.2.1
static domain_name_servers=10.40.2.1
noipv4ll
Ardından yeniden başlatmadan temizleyin:
sudo ip addr flush dev eth0
sudo systemctl restart dhcpcd
ip addr show eth0
noipv4ll 169.254 adresini durdurur. Daha sonra Bookworm’a geçerseniz dhcpcd kaldırılmış olur ve aynısını nmcli ile yaparsınız, bunu not edin.
Daniel has it. I hit exactly this on a pumping station Pi last year. Two things are configuring eth0: dhcpcd starts at boot, finds no DHCP server and gives the port a 169.254 link-local address plus routes, and then ifup tries to add its own address and default route. The route is already there, so the kernel answers “File exists” and ifup gives up. Depending on which one wins the race at boot, your gateway gets out or not.
Pick one. On Bullseye that means dhcpcd. Remove the eth0 block from /etc/network/interfaces (leave the file with only the source line) and put the static setup in /etc/dhcpcd.conf:
interface eth0
static ip_address=10.40.2.20/24
static routers=10.40.2.1
static domain_name_servers=10.40.2.1
noipv4ll
Then clean up without a reboot:
sudo ip addr flush dev eth0
sudo systemctl restart dhcpcd
ip addr show eth0
noipv4ll stops the 169.254 address. If you move to Bookworm later, dhcpcd is gone and you do the same with nmcli, so keep a note of that.
Yapay zekâ tarafından English dilinden çevrildi ·
Bu ikisi de sizin sorununuz; geçen yıl pille çalışan su sayacı etiketlerinde aynı çifti kullanmıştım.Akım: UART çevre biriminin etkin olması HF saatini açık tutuyor; bu tek başına etkinken yüzlerce uA, boştayken onlarca uA demek. Sürüm derlemesinde CONFIG_SERIAL=n ve CONFIG_LOG=n ayarlayın (ya da CONFIG_PM_DEVICE ayarlayıp UART’ı askıya alın). Ayrıca DC/DC’yi etkinleştirin (CONFIG_BOARD_ENABLE_DCDC=y, kartınızda indüktörün takılı olması gerekir) ve kullanılmayan GPIO’ların boşta kalmadığından emin olun. Bu sayede bizde akım yaklaşık 35 uA’dan 3 uA’ya düştü.Çevrimiçi durumu: alt cihazlar için Hermetry, çevrimiçi durumu ağ geçidinin v1/gw/connect ve v1/gw/disconnect mesajlarından alır; dolayısıyla ağ geçidiniz etiketlerin kaybolduğunu bildiriyor. 60 sn reklam aralığı ve 60 sn zaman aşımıyla, tek bir kaçırılan reklam bağlantı kopması anlamına gelir. Ağ geçidinin bağlantı kopma mesajını göndermeden önce 5 kaçırılmış reklamı beklemesini sağlayın.Alarm için, Cihaz çevrimdışı kuralının Şu süre sonra aç değerini kısa bir boşluğun kimseyi çağırmaması için 900 saniye gibi bir değere ayarlayın. Alt cihaz durumunun nasıl çalıştığı hakkında daha fazla bilgi: Gateways and devices behind a gateway.
Both of those are your problems, I had the same pair on battery water meter tags last year.
Current: the UART peripheral being enabled keeps the HF clock up, that alone is hundreds of uA when active and tens when idle. Set CONFIG_SERIAL=n and CONFIG_LOG=n in the release build (or CONFIG_PM_DEVICE and suspend the UART). Also enable the DC/DC (CONFIG_BOARD_ENABLE_DCDC=y, needs the inductor fitted on your board), and make sure unused GPIOs aren’t floating. That got us from about 35 uA to 3.
Online status: for child devices Hermetry takes the online state from the gateway’s v1/gw/connect and v1/gw/disconnect messages, so your gateway is telling it the tags are gone. With 60 s advertising and a 60 s timeout, one missed advert means a disconnect. Make the gateway wait for 5 missed adverts before sending disconnect.
For the alarm, set the Device offline rule’s Open after to something like 900 seconds so a short gap doesn’t page anyone. More on how child status works: Gateways and devices behind a gateway.
Yapay zekâ tarafından English dilinden çevrildi ·
Ayrıca toplu gönderimleri makul tutun; varsayılan değer cihaz başına saniyede 10 mesajdır. Tek seferde büyük bir birikim gönderilirse mesajlar düşürülür.
And keep the batches reasonable, the default is 10 messages a second per device. A big backlog in one go gets dropped.
Yapay zekâ tarafından English dilinden çevrildi ·
Veri tarafından bakınca: hangisini seçerseniz seçin, gateway’in yoklama yaptığı anda ts değerini işlemesini sağlayın; böylece gateway’de Wi-Fi kesintisinden sonra gelen gecikmeli yüklemeler doğru zamana yerleşir.
From the data side: whatever you choose, have the gateway stamp ts when it polls, then late uploads after a Wi-Fi drop at the gateway land at the right time.

