Uno web sunucusundaki vaka sayacı sürekli takılıyor; ERP'miz vardiya toplamlarına ihtiyaç duyuyor
Yapay zekâ tarafından English dilinden çevrildi ·
Tesis müdürü olarak bunu bana anlatıldığı şekliyle aktarayım. Paketleme hattı 3’te, vaka saymak için bir foto-göz kullanan ve Ethernet kalkanı (W5100) takılı bir Arduino Uno var. Bir taşeron bunu küçük bir web sunucusu olarak kurdu; ERP’nin içe aktarma işi her vardiyanın sonunda üretimi kaydetmek için http://10.20.3.41/count adresini çağırıyor.Bu ay iki kez Uno yanıt vermeyi kesti ve bir vardiyanın rakamını kaybettik; insanlar paletleri elle saymak zorunda kaldı. Ayrıca operasyon ekibi, sayımın hattın sıcaklıklarıyla birlikte Hermetry panomuzda canlı görünmesini istiyor; şu anda böyle değil.Sorum, web sunucusunu düzeltmek mi yoksa bunu farklı yapmak mı gerektiği. Sayının yaşadığı tek bir yere sahip olmayı tercih ederim.
Plant manager, so I’ll describe this the way it was explained to me. Packing line 3 has an Arduino Uno with an Ethernet shield (W5100) and a photo-eye counting cases. A contractor set it up as a little web server, and our ERP’s import job calls http://10.20.3.41/count at the end of each shift to book production.
Twice this month the Uno stopped answering and we lost a shift’s figure, people had to count pallets. Also the ops team wants the count live on our Hermetry board with the line’s temperatures, which right now it isn’t.
My question is whether to fix the web server or do this differently. I’d rather have one place the number lives.
Yapay zekâ tarafından English dilinden çevrildi ·
W5100 yalnızca 4 soket sunar ve yaygın web sunucusu örnek kodları bunları her zaman kapatmaz. Bir barkod okuyucu ya da iki web tarayıcısı ona eriştiğinde soketler tükenir. Düzeltilebilir, ama yine de kırılgan kalacak.
The W5100 has only 4 sockets and the usual web server sketches don’t always close them. A scanner or two browsers hitting it and it runs out. Fixable, but it’ll stay fragile.
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 ·
Vardiya başına bir toplam, vardiyalar 06:00, 14:00 ve 22:00’de değişiyor. ERP, ağımızın içindeki bir sunucuda ve BT ekibi onu internete açmayı kabul etmiyor; bu zaten ayrı bir mücadeleydi.
One total per shift, shifts change at 06:00, 14:00 and 22:00. The ERP is on a server inside our network and IT won’t open it to the internet, that was already a fight.
Yapay zekâ tarafından English dilinden çevrildi ·
O zaman işi tersine çevirin, böylece hiç kimse Uno’yu çağırmak zorunda kalmasın. Uno sayacını Hermetry’ye gönderir, ERP ise vardiya toplamını Hermetry’den çeker. Ağınıza gelen trafik kapalı kalır.Uno: çalışan toplamı (Uno üzerinde asla sıfırlamayın) her dakika, belirteciyle birlikte cihazın HTTP API’sine gönderin. W5100 TLS desteklemez; bu yüzden ya önüne TLS destekleyen küçük bir kart koyun ya da en basit yol olarak Uno’yu Ethernet’li bir ESP32 ile değiştirip HTTPS üzerinden gönderin. Gövde sadece {"cases_total": 184233} olacak.ERP tarafı: telemetri için Read only ön ayarına sahip bir API anahtarı, ERP sunucusunun adresine izin verilmiş olarak. Saat 06:05, 14:05 ve 22:05’te içe aktarma işi vardiya boyunca artışı ister:
GET /tenant/{tenantId}/api/telemetry/series?kind=iot_device&entityId={line3}
&keys=cases_total&from={shift_start_ms}&to={shift_end_ms}&bucket=1h&agg=increase
8 saatlik değerleri toplayın. increase sayacı doğru işler; cihazın aralarda 10 dakika çevrimdışı kalması sorun değildir, toplam sonradan yakalanır. Panoda aynı anahtarla increase kullanan bir grafik, operasyon ekibine saatlik canlı vaka sayısını verir.Sizin durumunuzda bir flow’dan ERP’ye push yapmaktan kaçınmanızı öneririm: HTTP istek bloğu özel adresleri reddeder, dolayısıyla 10.x adresine zaten ulaşamaz. Çekme (pull) yöntemi BT ekibini memnun eder. Referans: The history API.
Then flip it around so nobody calls the Uno at all. The Uno posts its counter to Hermetry, and the ERP pulls the shift total from Hermetry. Inbound to your network stays closed.
Uno: send the running total (never reset it on the Uno) every minute to the device HTTP API with its token. A W5100 can’t do TLS, so either put a small TLS-capable board in front or, simplest, swap the Uno for an ESP32 with Ethernet and post over HTTPS. The body is just {"cases_total": 184233}.
ERP side: an API key with the Read only preset for telemetry, allowlisted to the ERP server’s address. At 06:05, 14:05 and 22:05 the import job asks for the increase over the shift:
GET /tenant/{tenantId}/api/telemetry/series?kind=iot_device&entityId={line3}
&keys=cases_total&from={shift_start_ms}&to={shift_end_ms}&bucket=1h&agg=increase
Add up the 8 hourly values. increase handles the counter properly and you don’t care if the device was offline for 10 minutes in between, the total catches up. On the board, the same key on a chart with increase gives ops the live cases per hour.
I’d avoid pushing from a flow to the ERP in your case: the HTTP request block refuses private addresses, so it can’t reach 10.x anyway. The pull keeps IT happy. Reference: The history API.
Yapay zekâ tarafından English dilinden çevrildi ·
Yüklenici geçen hafta Uno’yu aynı fotoğraf gözlü bir ESP32-ETH kartıyla değiştirdi. ERP işi artık saatlik artışları çekiyor ve ilk tam haftada sayım, el sayımıyla 2 kasa içinde eşleşti. Tek sorun, sayıyı önce tırnak içinde metin olarak göndermeleriydi; bu yüzden son değer olarak göründü ama hiçbir grafiğe yansımadı. Sayıyı sayı olarak göndermek sorunu çözdü.
Contractor swapped the Uno for an ESP32-ETH board last week, same photo-eye. The ERP job now pulls the hourly increases, and the first full week matched the hand count within 2 cases. One snag: they first sent the count as text in quotes, so it showed as a latest value but nothing charted. Sending a number fixed it.
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.
- Bu konuyu yanıtlamak için giriş yapmış olmalısınız.
Sohbete katılın
Soru sormak ve yanıtlamak, yararlı gönderileri beğenmek ve sorununuzu çözen yanıtı işaretlemek için oturum açın. Her katkı puan ve seviye kazandırır.

