si_tyler
@twilson · Mart 2026 tarihinde katıldı
System integrator · energy · 15 years in the field
- Konular
- 3
- Yanıtlar
- 20
- Puan
- 0
Oluşturulan forum yanıtları
Yapay zekâ tarafından English dilinden çevrildi ·
Tam da kaçınmaya çalıştığım konu VPN. Güvenlik ekipleri ağlarına yapılan her tünel bağlantısını 3 aylık incelemesi olan yeni bir proje olarak görüyor.
A VPN is exactly the conversation I’m trying to avoid. Their security team treats any tunnel into their network as a new project with a 3 month review.
+1 to Grace. We lost a week on a site job because of a PCB antenna inside a steel cabinet.
Also those slow clients eat airtime for everyone on that AP. A frame at 1 Mbps occupies the channel for a long time.
Yapay zekâ tarafından English dilinden çevrildi ·
En kolay çözüm: betiği yeniden başlatma. Restart=always ayarlı bir systemd servisi olarak çalıştır, portu bir kez aç ve hiç kapatma.
Easiest fix: don’t restart the script. Run it as a systemd service with Restart=always, open the port once and never close it.
Yapay zekâ tarafından English dilinden çevrildi ·
Sorun adaptördeymiş. Sistem Bilgisi, markasız USB-C dongle’ım üzerinden hiçbir şey göstermedi; güç beslemeli bir hub üzerinden bağlayınca “USBasp” görünüyor ve avrdude onu buluyor. Dün sahada dört kartı programladım; tsmith’in dediği gibi, yeni aldığım yedek karta tam olarak -B 32 gerekti. Diğerlerinde fuse ayarları zaten yapılmıştı. Linux dizüstü bilgisayarım artık atölyede kalıyor.
Adapter it was. System Information showed nothing through my no-name USB-C dongle; through a powered hub it shows “USBasp” and avrdude finds it. Flashed four boards in the field yesterday, the brand-new spare board needed -B 32 exactly like tsmith said. Fuses were already set on the others. Linux laptop stays in the workshop now.
For the sensor: an FSR strip under the mattress works but needs calibrating per mattress and drifts as the foam ages. Load cells under two legs are more reliable and don’t care about bedding. Avoid PIR, it can’t tell “in bed” from “standing next to the bed”.
Yapay zekâ tarafından English dilinden çevrildi ·
İyi yakalamışsınız. Sunucu adresini derlemede değil, bir yapılandırma dosyasında tutmak faydalı olur; böylece bir sonraki tesis sabit kodlanmış bir sunucu adresini kopyalamaz.
Good catch. Worth putting the host in a config file instead of the build, so the next plant doesn’t copy a hardcoded host.
Yapay zekâ tarafından English dilinden çevrildi ·
Arduino IDE’nin avrdude aracında da aynı hata.
Same error with the Arduino IDE’s avrdude.
On the device: take 5 readings a second apart and send the median, not one sample. Kills most of the hand-in-the-way readings before they leave the board.
0xE2 is a response timeout. Same baud and parity on both meters?
Fitted the DW from the tube, port is back and the meters reappeared as children within a minute. Both TVS diodes measured short, replaced those too. You were right about the package table at the end, I’d only looked at the one on page 1.
Yapay zekâ tarafından English dilinden çevrildi ·
İnverterler için SunSpec Modbus haritalarını destekleyip desteklemediklerine bakın; bu, her model için ayrı bir register haritası yazma zahmetinden kurtarır.
For the inverters check if they do SunSpec Modbus maps, saves you writing a register map per model.
Yapay zekâ tarafından English dilinden çevrildi ·
Ölçeklendirme için ham mA değerini gönderebilirsiniz; Hermetry’nin root akışındaki bir Scale bloğu 4-20 değerini 0-10 bar’a çevirir. Böylece aralığı daha sonra Pi’ye dokunmadan düzeltebilirsiniz.
And for the scaling you can send the raw mA and let a Scale block in Hermetry’s root flow turn 4-20 into 0-10 bar, then you can fix the range later without touching the Pi.
Yapay zekâ tarafından English dilinden çevrildi ·
Kevin haklı, ama bu işin yarısı. Bir rüzgar sahasında aynı sorunla karşılaştık.Hermetry’nin MQTT sürümü 3.1.1 ve clean session değeri false olan bir CONNECT, temiz oturum olarak işleniyor. Çevrimdışıyken bir cihaz için kalıcı olarak gönderilmiş komutlar dışında hiçbir şey kuyruğa alınmıyor. Dolayısıyla telemetri için her iki yönde de devam ettirilecek bir oturum durumu yok.Hermetry’nin verdiği garanti gelen yön için geçerli: PUBACK, mesaj kendi tarafında güvenle kuyruğa alındıktan sonra gönderiliyor. Kuyruğa alınamazsa PUBACK gelmez, oturum kapanır ve istemcinin yeniden bağlandıktan sonra tekrar göndermesi bekleniyor. Aynı cihaz, anahtar ve zaman damgasına sahip yinelenen mesajlar bir kez saklanıyor, bu yüzden yeniden gönderim güvenli.Dolayısıyla tampon sizin sorumluluğunuzda ve izlenecek desen şu:
- Her okumayı, kendi ts değeri ms cinsinden olacak şekilde yerel bir depoya yazın (biz bir SQLite dosyası kullanıyoruz).
- Depodan yayınlayın ve bir satırı yalnızca PUBACK’i geldiğinde silin.
- Yeniden bağlandıktan sonra: abone olun, paylaşılan öznitelikleri isteyin, ardından canlı veriden önce birikmiş verileri gönderin.
Birikmiş verileri, doğru zamanlarda görünmesi için {ts, values} dizileri halinde gönderin. Profilde, tüm kayıtları bir dakikadan eski olan mesajlar için ayrı bir Saniyede yeniden oynatılan mesaj sınırı var, bu yüzden uzun bir birikim bir süre içinde boşalır. Hepsi aynı anda görünmezse panik yapmayın.Onay bölümü için MQTT sayfası bir kez okunmaya değer.
Kevin’s right, and that’s half of it. We hit the same thing on a wind site.
Hermetry’s MQTT is 3.1.1 and a CONNECT with clean session false is served as clean. Nothing is queued for a device while it’s offline, apart from commands that were sent as persistent. So no session state to resume, in either direction for telemetry.
What Hermetry does promise is on the way in: the PUBACK goes out only after the message is safely queued on their side. If it can’t be queued you get no PUBACK and the session closes, and the client is expected to resend after reconnecting. Duplicates of the same device, key and timestamp are stored once, so resending is safe.
So the buffer is yours, and the pattern is:
- Write every reading to a local store (we use a SQLite file) with its own ts in ms.
- Publish from the store, delete a row only when its PUBACK arrives.
- After reconnect: subscribe, ask for shared attributes, then send the backlog before live data.
Send the backlog as arrays of {ts, values} so it lands at the right times. The profile has a separate Replay messages per second limit for messages whose records are all older than a minute, so a long backlog drains over a while. Don’t panic when it doesn’t all appear at once.
The MQTT page has the acknowledgement section, worth reading once.
Built one of these with my kid a couple of years ago and made both mistakes.
Angle: combine the two sensors with a complementary filter. The gyro is good short-term, the accelerometer long-term:
// fixed 200 Hz loop from a hardware timer, dt = 0.005
float accAngle = atan2f(ax, az) * RAD_TO_DEG;
angle = 0.98f * (angle + gy * dt) + 0.02f * accAngle;
Use a fixed loop rate from a timer, not millis() differences in a busy loop, and keep MQTT out of that loop entirely. Wilson’s DMP route works too, it just ties you to that chip’s library.
PID: start with P only and raise it until the robot oscillates around upright, then add D until the oscillation dies down, then a small I for drift. And add the motors’ deadband to the output, gear motors don’t move below a few percent duty.
Data: collect samples in the fast loop, decimate to 20 Hz, and send one message per second as an array of records with their own timestamps:
[
{"ts": 1767600000000, "values": {"bal.angle": 0.42, "bal.out": 12.5, "bal.speed": 3.1}},
{"ts": 1767600000050, "values": {"bal.angle": 0.38, "bal.out": 11.9, "bal.speed": 3.0}},
...
]
That is 1 message a second with 20 x 3 = 60 data points, inside the per-device defaults (10 messages a second, 200 points a second and 6,000 a minute). Your plan has an organisation-wide data points per minute limit too, so check Usage if other devices are busy. The ESP32 needs NTP time for ts, otherwise leave ts out. A chart over the last 24 hours shows every raw point, so the tuning curves stay sharp. Payload forms: MQTT topics and payload reference.

