Translated from Türkçe by AI ·
We experienced exactly this in our hotel, a building with 140 rooms. I agree with Oğuz Bey: there is no separate standard, it is an architecture issue.What we did: the IoT VLAN was kept closed to the internet. We put a Raspberry Pi 4 with two legs on that VLAN. One leg is on the IoT network, where it listens to the local Mosquitto. The other leg is on the management network, and it is only allowed outbound TCP 8883. We had IT write a single rule: “from this IP to the Hermetry broker host, 8883 outbound”. No inbound port is open.The Pi is defined in Hermetry as a single device and marked “This device is a gateway”. It sends the room sensors’ data under its own name using v1/gw/* topics, and Hermetry creates each sensor as a child device itself on its first report. The room sensors need no identity in Hermetry.
PUBLISH v1/gw/connect
{"device": "oda-214-klima", "type": "oda-sensoru"}
PUBLISH v1/gw/telemetry
{"oda-214-klima": {"values": {"temperature": 22.4, "humidity": 51}},
"oda-214-kapi": {"values": {"door_open": 0}}}
If Hermetry has a profile with the same name as the type field, it uses that profile, so all room sensors’ alarm rules are in one profile. The default limit is 500 children per gateway, which is more than enough for us. Each child device is also counted separately, so choose your plan accordingly.If needed, you can also send commands and shared attributes to child devices. The Pi receives them via v1/gw/rpc and v1/gw/attributes and forwards them to the room device. We don’t send commands to the rooms, we only monitor them.Details: Devices behind a gateway
Bizim otelde birebir bunu yaşadık, 140 odalı binada. Oğuz Bey’e katılıyorum: ayrı bir standart yok, mesele mimari.
Bizim yaptığımız şu: IoT VLAN’ı internete kapalı kaldı. O VLAN’a bir Raspberry Pi 4 koyduk, iki ayaklı. Bir bacağı IoT ağında, oradaki yerel Mosquitto’yu dinliyor. Diğer bacağı yönetim ağında, sadece dışarı TCP 8883’e izni var. IT’ye tek bir kural yazdırdık: “bu IP’den Hermetry broker host’una 8883 outbound”. İçeri hiçbir port açık değil.
Pi Hermetry’de tek bir cihaz olarak tanımlı ve “This device is a gateway” işaretli. Odalardaki sensörlerin verisini kendi adına v1/gw/* topic’leriyle gönderiyor, Hermetry her sensörü ilk raporda child cihaz olarak kendisi oluşturuyor. Odadaki sensörlerin Hermetry için hiçbir kimliğe ihtiyacı yok.
PUBLISH v1/gw/connect
{"device": "oda-214-klima", "type": "oda-sensoru"}
PUBLISH v1/gw/telemetry
{"oda-214-klima": {"values": {"temperature": 22.4, "humidity": 51}},
"oda-214-kapi": {"values": {"door_open": 0}}}
type alanı Hermetry’de aynı isimde bir profil varsa onu kullanıyor, böylece tüm oda sensörlerinin alarm kuralları tek profilde. Varsayılan sınır gateway başına 500 child, bizim için fazlasıyla yetiyor. Her child cihaz sayısına ayrıca sayılıyor, planı ona göre seçin.
Gerekirse child cihazlara komut ve shared attribute da gönderebiliyorsunuz, Pi bunları v1/gw/rpc ve v1/gw/attributes üzerinden alıp odadaki cihaza iletiyor. Biz odalara komut göndermiyoruz, sadece izliyoruz.
Ayrıntılar: Ağ geçidinin arkasındaki cihazlar

