davidp11
@david-patel · Membre depuis mars 2025
Facility manager · hospitality · new to IoT
- Sujets
- 8
- Réponses
- 62
- Points
- 0
Toutes mes réponses sur les forums
OK so batteries. Does Hermetry City handle that or do I need something else?
Does cable length really matter at only 9600 baud?
How do the night staff work, one person on a fixed station or walking around? That changes what kind of alert makes sense.
Traduit de English par IA ·
À quoi sert exactement le 9e bit ? Je n’ai jamais vu autre chose que du 8N1.
What’s the 9th bit for exactly? I’ve only ever seen 8N1.
Traduit de English par IA ·
Exactement le même problème sur un de nos sites après que le FAI a activé l’IPv6. Le Pi obtient une adresse IPv6, il l’essaie en premier, la route est cassée et il attend le délai d’expiration avant de revenir à IPv4. Votre test curl le montre.Je ne voulais pas désactiver l’IPv6 partout, j’ai donc configuré le Pi pour préférer IPv4. Décommentez cette ligne dans /etc/gai.conf :
precedence ::ffff:0:0/96 100
Pas besoin de redémarrer pour les nouveaux processus, redémarrez simplement votre script. Si vous ne le voulez que pour le script, vous pouvez le forcer en Python avant d’importer requests :
import socket
import urllib3.util.connection as conn
conn.allowed_gai_family = lambda: socket.AF_INET
Et l’idée d’Owen reste bonne pour plus tard. Ajoutez l’IPv4 publique de l’hôtel à la liste d’autorisation IP de la clé, afin qu’une clé volée soit inutile ailleurs.
Had exactly this at one of our properties after the ISP turned IPv6 on. The Pi gets an IPv6 address, tries it first, the route is broken and it waits for the timeout before falling back to IPv4. Your curl test shows that.
I didn’t want to switch IPv6 off for everything, so I told the Pi to prefer IPv4. Uncomment this line in /etc/gai.conf:
precedence ::ffff:0:0/96 100
No reboot needed for new processes, just restart your script. If you only want it for the script, you can force it in Python before importing requests:
import socket
import urllib3.util.connection as conn
conn.allowed_gai_family = lambda: socket.AF_INET
And Owen’s idea is still a good one for later. Put the hotel’s public IPv4 in the key’s IP allowlist so a stolen key is useless elsewhere.
Is this the same radio as LoRa? I thought the RFM95 was LoRa only.
Traduit de English par IA ·
Tu ne peux pas simplement monter l’antenne plus haut ?
Can’t you just put the antenna higher?
Maybe you need pull-up resistors on SDA and SCL? I read I2C needs them.
Will the switch show if someone turned the light on at the wall?
Traduit de English par IA ·
donc la passerelle compte pour un seul appareil ou pour 26 ?
so the gateway counts as one device or 26?
Traduit de English par IA ·
je suis le sujet, j’ai un MCP3008 dans un tiroir que je n’ai jamais réussi à faire fonctionner non plus
following, I have an MCP3008 in a drawer I never got working either
Traduit de English par IA ·
Je suis nouveau dans l’IoT, mais nous avons eu exactement ce problème avec un Pi dans un boîtier en acier dans le local technique de la piscine de notre hôtel. Notre informaticien m’a dissuadé de souder. Un boîtier en acier fermé se rapproche d’une cage de Faraday, donc l’antenne puce intégrée à l’intérieur aura toujours du mal, et le Pi 3 n’est pas conçu pour une antenne externe.Ce que nous avons fait à la place, pour environ 20 dollars :
- Un adaptateur Wi-Fi USB avec connecteur RP-SMA.
- Un court câble d’extension RP-SMA passé par un presse-étoupe du boîtier, l’antenne montée à l’extérieur, en haut.
- Le Wi-Fi intégré désactivé pour que la clé soit le seul wlan0. Ajoutez
dtoverlay=disable-wifidans config.txt, puis redémarrez. Configurez ensuite vos paramètres Wi-Fi sur la clé comme d’habitude.
Notre signal est passé d’environ -84 à -58 dBm.Côté Hermetry, j’ai aussi allongé l’alarme de hors ligne. La documentation suggère un délai d’Open plus long que la reconnexion normale pour les appareils qui peuvent se déconnecter brièvement ; nous utilisons 600 s, donc une coupure Wi-Fi de 30 secondes ne réveille plus personne. Le keepalive est de 60 s dans notre script.
I’m new to IoT but we had exactly this with a Pi in a steel box in our hotel’s pool plant room. Our IT guy talked me out of soldering. A closed steel box is close to a Faraday cage, so the onboard chip antenna inside it will always struggle, and the Pi 3 is not designed for an external one.
What we did instead, cost about 20 dollars:
- A USB Wi-Fi adapter with an RP-SMA connector.
- A short RP-SMA extension cable through a cable gland in the box, antenna mounted outside on top.
- Onboard Wi-Fi switched off so the dongle is the only wlan0. Add
dtoverlay=disable-wifito config.txt and reboot. Then put your Wi-Fi settings on the dongle as usual.
Our signal went from about -84 to -58 dBm.
On the Hermetry side I also lengthened the offline alarm. The docs suggest an Open after time longer than a normal reconnect for devices that can drop briefly, we use 600 s, so a 30 second Wi-Fi dip no longer wakes anyone. Keepalive is 60 s in our script.
Traduit de English par IA ·
Oui, le laptop partage sa connexion (NAT) et doit rester allumé. C’est pourquoi j’ai choisi l’adaptateur.
Yep, laptop shares its connection (NAT) and has to stay on. That’s why I went with the adapter.
Probably the least qualified person in this thread, but our electrician sorted almost the same thing in our boiler room, and Emily’s point is why yours sits at 9 V. Your 10k pull-up and 10k pulldown make the gate about 12 V, minus the threshold gives the source a bit under 10 V. The MOSFET is half on, so it gets warm.
His fix was to throw the MOSFET out. A PLC input like that only draws a few milliamps (ours was about 5 mA at 24 V, the manual says), and a PC817 transistor can switch that by itself:
Pi side: GPIO17 -- 330R -- PC817 anode (pin 1), cathode (pin 2) -- Pi GND
24 V side: +24 V -- PC817 collector (pin 4)
PC817 emitter (pin 3) -- PLC input I0.5
PLC input common -- 0 V
Opto on, the input sees close to 24 V. Opto off, nothing. Isolation stays. If you want something with a DIN rail clip and a label on it, a ready-made 24 V opto or relay module does the same.
On the Hermetry side he set the hold command as High impact so whoever sends it has to confirm. A board control won’t send a high-impact command though, so it goes from the device’s Commands tab. For a hold request that stops a line, we found that was fine.
Traduit de English par IA ·
Je suis responsable des installations, pas ingénieur électronique, mais j’ai poursuivi exactement cette idée pour un écran d’accueil l’année dernière et j’y ai perdu un après-midi. Le Pi n’implémente pas HEC. Sur HDMI, ce sont les broches 14 et 19, et le Pi n’a pas de PHY Ethernet derrière elles, donc il n’y a rien à activer logiciellement. Aucun overlay ne réglera cela.Voici ce que j’ai fini par faire, et ce que j’essaierais dans votre ordre :
- Un adaptateur micro-USB vers Ethernet sur le port USB du Zero (pas celui marqué PWR). Les modèles à base d’ASIX AX88772 fonctionnent directement, eth0 apparaît tout seul. Le mien coûtait une dizaine de dollars.
- Mode gadget USB : le Zero se fait passer pour une carte réseau auprès d’un ordinateur portable via le câble USB. Ajoutez
dtoverlay=dwc2dans config.txt etmodules-load=dwc2,g_etheraprès rootwait dans cmdline.txt. Il faut ensuite que l’ordinateur partage sa connexion. - Passer à un Zero 2 W si le Wi-Fi est un jour autorisé.
Une fois eth0 actif, la partie MQTT est identique à celle de n’importe quel Pi : TLS sur le port 8883 avec le jeton de l’appareil.
I’m a facilities guy, not an EE, but I chased this exact idea for a lobby display last year and burned an afternoon on it. The Pi doesn’t implement HEC. On HDMI that’s pins 14 and 19, and the Pi has no Ethernet PHY behind them, so there’s nothing to switch on in software. No overlay will fix it.
What I ended up with, and what I’d try in your order:
- A micro-USB to Ethernet adapter on the Zero’s USB port (not the PWR one). ASIX AX88772 based ones work out of the box, eth0 just appears. Mine was about ten dollars.
- USB gadget mode: the Zero pretends to be a network card to a laptop over the USB cable. Add
dtoverlay=dwc2to config.txt andmodules-load=dwc2,g_etherafter rootwait in cmdline.txt. Then the laptop has to share its connection. - Swap for a Zero 2 W if Wi-Fi ever becomes allowed.
Once eth0 is up the MQTT side is the same as any other Pi, TLS on 8883 with the device token.

