New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

Hakan Keskin

hakan_dev

@keskin-h · Joined December 2025

Newcomer

Backend geliştirici · yazılım

Topics
5
Replies
38
Points
0
Newcomer10 points to Member

Forum Replies Created

Viewing 15 posts – 1 through 15 (of 38 total)

MQTT’yi seri hatta taşımaya gerek yok bence, Hermetry için TLS de gerekiyor, Nano onu zaten yapamaz. Bende iki tane böyle Nano var, şöyle çalışıyor:

Nano her 10 saniyede bir satır JSON basıyor:

Serial.print("{"oil_temp":");
Serial.print(t, 1);
Serial.print(","pressure_bar":");
Serial.print(p, 2);
Serial.println("}");

Pi’de Python, pyserial ile satırı okuyor, paho-mqtt ile 8883’e TLS’le bağlanıp v1/telemetry‘ye QoS 1 gönderiyor:

line = ser.readline().decode(errors='ignore').strip()
try:
    data = json.loads(line)
except ValueError:
    continue                      # bozuk satırı atla
if isinstance(data, dict):
    client.publish('v1/telemetry', json.dumps(data), qos=1)

O try/except önemli: Nano reset atınca ya da hat parazit yapınca yarım satır geliyor. JSON olmayan bir gövdeyi Hermetry raw diye tek bir anahtar olarak saklıyor, sonra telemetri sekmesinde saçma metinler görürsün.

İkinci Nano gelince Pi’yi gateway yap: cihazı eklerken “This device is a gateway” seç, iki Nano’yu v1/gw/telemetry ile ayrı alt cihaz olarak gönder, mesela {"Kompresor-1": {"values": {...}}, "Kompresor-2": {...}}. Her biri Hermetry’de kendi cihazı olur, alarmları ayrı kurarsın.

Ağ geçidi yine bağlanıyor…
Accepted solution♥ 8

Translated from Türkçe by AI ·

Run a script against the API in a loop and put it in cron. That’s how I do it.

Ağ geçidi yine bağlanıyor…
♥ 0

Translated from Türkçe by AI ·

Keep logging RSSI in telemetry. If you also set a threshold rule, you will get early warning if the antenna cable loosens.

Ağ geçidi yine bağlanıyor…
♥ 0

Translated from Türkçe by AI ·

Set the window to 50, it will be more stable.

Ağ geçidi yine bağlanıyor…
♥ 0

Translated from Türkçe by AI ·

What RSSI are you seeing? If you add WiFi.RSSI() to the telemetry in the code, you’ll see it on the graph instead of guessing.

Ağ geçidi yine bağlanıyor…
♥ 0

Translated from Türkçe by AI ·

Don’t connect an oscilloscope while it’s plugged in. Most of these boards have no isolation, the GND is directly tied to the mains. If you short the scope’s ground with it, you lose the probe and yourself.

Ağ geçidi yine bağlanıyor…
♥ 0

Translated from Türkçe by AI ·

Solved, thanks.I couldn’t find a USB-RS232 converter, so I got a MAX3232 module from the electronics guy. I connected it, still got garbage, then as Esra said I crossed pins 2 and 3, and the lines started coming in properly. I also turned off the serial console, the login screen disappeared. GPIO15 also came out fine, I got lucky.Thanks to Tuğba’s note, weight_kg is going out as a number from the very start, and it’s being plotted as a graph on the dashboard.

Ağ geçidi yine bağlanıyor…
♥ 0

Translated from Türkçe by AI ·

You’re right Esra, I mixed it up with a different product. If you need the History API script, I have a Python example that runs with cron, just let me know.

Ağ geçidi yine bağlanıyor…
♥ 0

Translated from Türkçe by AI ·

For the report part: I think Hermetry itself sends the monthly report by e-mail; I remember there is a scheduled report setting.

Ağ geçidi yine bağlanıyor…
♥ 0
Viewing 15 posts – 1 through 15 (of 38 total)