thompsonplc
@lthompson · Mayıs 2025 tarihinde katıldı
Automation engineer · pharma · 14 years in the field
- Konular
- 7
- Yanıtlar
- 65
- Puan
- 0
Oluşturulan forum yanıtları
Tyler, please don’t, eight 120 ohm resistors in parallel load the line to 15 ohm and nothing will talk.
Owen: at 9600 baud a bit lasts about 104 µs. On 30 m of cable a reflection goes up and back in well under a microsecond, so it has died out long before the receiver samples. Termination is about long cables and high baud rates, and you are nowhere near that. That’s David’s answer too.
What you’re missing is biasing. Between frames nobody drives the line, and an unbiased line floats near 0 V differential, so noise looks like start bits. That gives exactly the random, different-meter-each-time errors you see. Many cheap USB dongles have no bias resistors. Put them at the master end: about 680 ohm from A (+) to 5 V and 680 ohm from B (-) to GND. If you later add 120 ohm termination at both ends, bias is no longer optional at all.
Also, in this order:
- Use twisted pair, and run a third wire as signal ground/common. Speaker cable has neither the twist nor the impedance.
- Daisy-chain, no star. Short stubs at each meter.
- In pymodbus, a response timeout of 1 s and one retry, and a short pause between meters.
On the Hermetry side, if a poll fails, send nothing for that meter in that round instead of a 0 or the old value. Then the chart has a small gap rather than a fake reading.
And whoever uses the board needs the permission to run widget commands, or the Switch just says no. Caught a colleague out at work.
Yapay zekâ tarafından English dilinden çevrildi ·
Mantıklı. O zaman geçiş anahtarları olsun.
Makes sense. Passkeys it is then.
Yapay zekâ tarafından English dilinden çevrildi ·
Sahibimiz geçen ay “Her üye için iki adımlı doğrulamayı zorunlu kıl” seçeneğini açtı. E-posta bağlantısı insanların bunu atlatmasını sağlıyor mu, yoksa bağlantıya tıkladıktan sonra da ikinci faktöre ihtiyaçları oluyor mu?
Our owner switched on “Require two-step verification for every member” last month. Does the e-mail link get people around that, or do they still need the second factor after clicking it?
Yapay zekâ tarafından English dilinden çevrildi ·
Önce donanım. Bir optokuplör kullanın: köprü doğrultucu (ya da LED’in üzerine ters bağlı diyotlu bir PC817), 1 kΩ seri direnç, çıkışa 10 µF kondansatör; böylece AC dalgalanma saniyede 50 darbe olarak görünmez. Transistör tarafını INPUT_PULLUP ile D5’e bağlayın; zil çalarken pin LOW olur. Kodda debounce uygulayın, düşen kenarda ring: 1 gönderin, 2 saniye sessiz kaldığında ring: 0 gönderin.Sonra alarm kuralını atlardım. Alarmın bir yaşam döngüsü vardır (açık, onaylandı, temizlendi) ve her kurye için alarmlar birikir. Bir Kurallar kartı kuralı daha uygun olur:
When: A value changes, device "intercom-d1", value "ring", becomes 1
Then: Tell people [x] Members
Message: "Someone is at the street door"
Üyeler bildirimi zilde alır; ayarladıkları yerde push ile (uygulama ya da push açık bir tarayıcı) ve Profilim > Sohbet uygulamaları altında bağladıkları her sohbet uygulamasında alırlar. Yani yöneticiniz platformu bağladıktan sonra her kişi kendi hesabını bağlar ve uygulama olsun olmasın telefonunuzdaki bildirim budur. Kurallar kartı alıcıları hiçbir zaman e-posta ya da SMS almaz; SMS için Bildir bloğu ve telefon numaralarıyla bir akışa ihtiyacınız olur.Bilmeniz gereken bir şey: aynı kişiye giden aynı bildirim 10 dakikalık bekleme süresiyle tutulur. Kapı zili için çoğunlukla yeterli, ama iki kurye 10 dakika içinde gelirse ikincisi sonradakinin yanında yalnızca “(+1)” olarak görünür. Ayrıntılar: Notifications from rules and flows.
Hardware first. Use an optocoupler: bridge rectifier (or a PC817 with a reverse diode across the LED), 1 kΩ series resistor, 10 µF across the output so the AC ripple doesn’t show up as 50 pulses a second. Transistor side to D5 with INPUT_PULLUP, so the pin goes LOW while it rings. Debounce in code, send ring: 1 on the falling edge, and ring: 0 when it’s quiet again for 2 s.
Then I’d skip the alarm rule. An alarm has a lifecycle (open, acknowledge, clear) and you’d have alarms piling up for every courier. A Rules card rule fits better:
When: A value changes, device "intercom-d1", value "ring", becomes 1
Then: Tell people [x] Members
Message: "Someone is at the street door"
Members get it in the bell, by push where they’ve set it up (the app, or a browser with push on), and in every chat app they linked under My Profile > Chat apps. So once your admin connects the platform each person links their own account and that’s your phone ping, app or not. Rules card recipients never get e-mail or SMS, for SMS you’d need a flow with a Notify block and phone numbers.
One thing to know: the same notice to the same person is held back for a 10-minute cooldown. Fine for a doorbell mostly, but if two couriers come within 10 minutes the second one only shows up as “(+1)” on the next one. Details: Notifications from rules and flows.
Yapay zekâ tarafından English dilinden çevrildi ·
Bir tabloda satır tıklaması, tıklanan satırla pano parametrelerini ayarlama ve yanındaki grafik satırı takip ediyor. Beş dakika. İyi.
Row click on a table, Set board parameters with the clicked row, and the chart beside it follows the row. Five minutes. Good.
Yapay zekâ tarafından English dilinden çevrildi ·
Bir grup bir izni elinden alabilir mi? Cihazları ve alarmları görmesi gereken ama hiçbir şeyi asla onaylamaması gereken Kullanıcılarımız var.
Can a group take a permission away? We have Users who should see devices and alarms but never acknowledge anything.
Add a revision block too, the second version always comes.
Yapay zekâ tarafından English dilinden çevrildi ·
Bu kontrol için her org içinde bir dummy User tutun, rol değişikliklerinden sonra buna tekrar ihtiyaç duyacaksınız.
Keep a dummy User in each org for that check, you’ll want it again after role changes.
Yapay zekâ tarafından English dilinden çevrildi ·
Firmware konusunda: Hermetry hiçbir zaman firmware imzalamaz; imajları kendi derlemenizde siz imzalarsınız ve yalnızca genel anahtarı kaydedersiniz. Bunu yapın ve S3 üzerinde secure boot ile flash şifrelemesini etkinleştirin; kutu tarafını bu kapsar.
On firmware: Hermetry never signs firmware, you sign images in your own build and register only the public key. Do that, and turn on secure boot plus flash encryption on the S3, that covers the box side.
Yapay zekâ tarafından English dilinden çevrildi ·
Buldum. Gelişmiş bölümünde pompa ID’lerini anahtarlarımızla eşleşecek şekilde değiştirdim ve 11 sembolden 9’u kendiliğinden bağlandı. Diğer ikisi kapalı durumu 1 olarak bildiren vanalar; bunları bir ifadeyle ters çevirdim.
Found it. Changed the pump ids under Advanced so they match our keys and 9 of 11 symbols connected on their own. The other two are valves that report closed as 1, I inverted those with an expression.
Yapay zekâ tarafından English dilinden çevrildi ·
Bu sabah küçük bir basınç artırma istasyonu çizdim. Sembolleri ve boruları yerleştirmek çok hızlıydı. Beni şaşırtan şey: tasarımcının hiçbir yerinde bir pompanın hangi cihaz değerini gösterdiğini belirleyecek bir alan yok. Ben mi göremiyorum?
Drew a small booster station this morning. Placing symbols and pipes went fast. What threw me: there is no field anywhere in the designer to say which device value a pump shows. Am I blind?
Yapay zekâ tarafından English dilinden çevrildi ·
Brian haklı, ayrıca kuruluş ön ekini de eksik bırakmışsın. Geçen yıl bir soğutma odası için hemen hemen aynı şeyi kurdum.1. API Keys (Developer menu) > New API Key. Module permissions altında yalnızca telemetri için salt okunur yetki ver, başka bir şey verme. Bir IP izin listesini ofisin adresine ayarla ve son kullanma tarihini not al; varsayılan 90 gün, en fazla bir yıl. Takvimine bir hatırlatıcı koy, bizimki bir Cumartesi günü süresi doldu.2. Tüm yönetim yolları tenant altında bulunur:
GET https://<host>/tenant/<tenantId>/api/telemetry/latest?kind=iot_device&entityId=<deviceId>&keys=level_pct
Authorization: Bearer sk_live_...
Yanıt şuna benzer: {“latest”: {“level_pct”: {“ts”: …, “value”: 91.2}}}. Aynı okumada iki kez buzzer çalmamak için ts değerini bir önceki ile karşılaştır.3. 429 durumunu ele al ve Retry-After saniye kadar bekle. Yaklaşık 30 sn’de bir sorgula, tank 5 saniyede dolmaz.Anlık olmasını istersen diğer yol: Pi’yi kendisi bir cihaz yap, tanktaki bir kural level_pct 90’ın üzerine çıktığında ona komut göndersin ve Pi kendi cihaz token’ıyla GET /api/v1/rpc üzerinde beklesin. Daha fazla hareketli parça, polling yok. Bir buzzer için API key’i tercih ederim. Kurallar için REST API basics sayfasına bak.
Brian’s right, and you’re also missing the organisation prefix. I set up nearly the same thing for a chiller room last year.
1. API Keys (Developer menu) > New API Key. Under Module permissions give it read-only telemetry, nothing else. Set an IP allowlist to the office’s address, and note the expiry, default is 90 days, a year at most. Put a reminder in the calendar, ours expired on a Saturday.
2. Every management path sits under the tenant:
GET https://<host>/tenant/<tenantId>/api/telemetry/latest?kind=iot_device&entityId=<deviceId>&keys=level_pct
Authorization: Bearer sk_live_...
Answer looks like {“latest”: {“level_pct”: {“ts”: …, “value”: 91.2}}}. Compare the ts with the previous one so you don’t buzz twice on the same reading.
3. Handle 429 and wait the Retry-After seconds. Poll every 30 s or so, the tank doesn’t fill in 5.
The other route, if you want it instant: make the Pi a device itself, have a rule on the tank send it a command when level_pct rises above 90, and let the Pi wait on GET /api/v1/rpc with its own device token. More moving parts, no polling. For a buzzer I’d take the API key. Conventions are on REST API basics.
Yapay zekâ tarafından English dilinden çevrildi ·
Önce çip olmadan, loopback ile SPI’yi tek başına test edin. MCP3008’i çıkarın, MOSI (GPIO10, pin 19) ile MISO (GPIO9, pin 21) arasına bir jumper kablo takın ve şunu çalıştırın:
wget https://raw.githubusercontent.com/raspberrypi/linux/rpi-6.6.y/tools/spi/spidev_test.c
gcc -o spidev_test spidev_test.c
./spidev_test -D /dev/spidev0.0 -v -p "HELLO"
RX, TX ile aynı baytları gösteriyorsa Pi tarafı sorunsuz demektir. RX tamamen 00 veya FF ise SPI gerçekten çalışmıyor demektir.Ama bence sorun kodunuzda: spi.open(0, 1) çip seçimi olarak CE1’i kullanır; bu da pin 26’daki GPIO7’dir. Çoğu MCP3008 eğitiminde CS, CE0’a, yani pin 24’teki GPIO8’e bağlanır. CS’iniz pin 24’e gidiyorsa çip hiç seçilmez, çıkışı havada kalır ve ona dokunduğunuzda 0 ile ara sıra 1023 görürsünüz. Ya kabloyu pin 26’ya taşıyın ya da kodu spi.open(0, 0) olarak değiştirin. Bunun tam aynı karışıklığını işte bir test tezgahında yaşadım.Kanal 1’in de aynı değeri vermesi ipucu: seçilmemiş bir çip her kanalda aynı anlamsız değeri üretir.
Test SPI on its own first with a loopback, no chip. Pull the MCP3008 out, put a jumper from MOSI (GPIO10, pin 19) to MISO (GPIO9, pin 21) and run:
wget https://raw.githubusercontent.com/raspberrypi/linux/rpi-6.6.y/tools/spi/spidev_test.c
gcc -o spidev_test spidev_test.c
./spidev_test -D /dev/spidev0.0 -v -p "HELLO"
If RX shows the same bytes as TX, the Pi side is fine. If RX is all 00 or FF, SPI isn’t really running.
My bet though is in your code: spi.open(0, 1) uses chip select CE1, which is GPIO7 on pin 26. Most MCP3008 tutorials wire CS to CE0, GPIO8 on pin 24. If your CS goes to pin 24, the chip is never selected, its output floats, and you get 0 with the odd 1023 when you touch it. Either move the wire to pin 26 or change the code to spi.open(0, 0). I’ve done this exact mixup on a bench at work.
Your channel 1 reading the same is the giveaway: an unselected chip gives the same junk on every channel.
BLE positioning gets you 2-3 m on a good day. For half a metre you’re looking at UWB.

