Interrupteur marche/arrêt du chauffage sur la carte pour un relais ESP8266 à côté du thermostat de nos bureaux
Traduit de English par IA ·
Fondateur d’une petite startup de logistique, pas ingénieur, donc toutes mes excuses d’avance. Nos bureaux dans l’entrepôt ont un vieux thermostat mural pour un chauffage au gaz. Je voudrais pouvoir allumer le chauffage depuis notre tableau de bord Hermetry avant l’arrivée des équipes, et voir la température des bureaux.Ce que j’ai déjà : un Sonoff Basic R2 (ESP8266) que j’ai flashé avec mon propre croquis Arduino utilisant PubSubClient. Il envoie une température DS18B20 toutes les minutes vers v1/telemetry et cette partie fonctionne, je peux la tracer. J’ai ajouté une carte Switch sur la carte, mais dans les paramètres, sous Exécuter une commande, la liste des commandes pour l’appareil est vide, et quand j’ai essayé la zone de méthode brute, j’ai obtenu « Cette commande ne figure pas dans le catalogue du profil de l’appareil, elle ne peut donc pas être envoyée depuis une carte. »Dans le croquis, je m’abonne à v1/rpc/req/+ et j’inverse GPIO12 lorsque method vaut heat.set. Je ne suis pas non plus sûr à 100 % de la façon dont le Sonoff doit être branché au câblage du thermostat ; je comptais relier sa sortie aux deux bornes du thermostat.
Founder of a small logistics startup, not an engineer, so apologies in advance. Our warehouse office has an old wall thermostat for a gas heater. I want to be able to switch the heat on from our Hermetry dashboard before people arrive, and see the office temperature.
What I have so far: a Sonoff Basic R2 (ESP8266) that I flashed with my own Arduino sketch using PubSubClient. It sends a DS18B20 temperature every minute to v1/telemetry and that part works, I can chart it. I added a Switch card on the board, but in the settings under Run a command the command list for the device is empty, and when I tried the raw method box I got « This command is not in the device profile’s catalogue, so it cannot be sent from a board. »
In the sketch I subscribe to v1/rpc/req/+ and toggle GPIO12 when method is heat.set. Also I’m not 100% sure how the Sonoff goes into the thermostat wiring, I was going to put its output across the two thermostat terminals.
Traduit de English par IA ·
À la suite de cela, je souhaite faire quelque chose de similaire pour les salles de réunion de notre hôtel.
Following, I want to do something similar for meeting rooms in our hotel.
Traduit de English par IA ·
Arrêtez-vous avant la partie câblage. Un Sonoff Basic laisse passer le secteur vers sa sortie. Les bornes du thermostat de la plupart des chaudières à gaz forment une boucle basse tension de demande de chauffe (call-for-heat). En reliant la sortie du Basic à ces bornes, on applique 230 V sur la carte de commande de la chaudière. Quelle tension y a-t-il sur ces deux fils ?
Stop before the wiring part. A Sonoff Basic switches mains live through to its output. Thermostat terminals on most gas heaters are a low voltage call-for-heat loop. Putting the Basic’s output across them puts 230 V on the boiler’s control board. What voltage is on those two wires?
Traduit de English par IA ·
Mesuré, 24 V AC. Donc… bien fait d’avoir demandé.
Measured it, 24 V AC. So… good thing I asked.
Traduit de English par IA ·
Oui, j’ai fait la même erreur sur le papier l’hiver dernier chez moi. Il te faut un contact sec, donc soit un module relais sans tension (le type Sonoff RE5V1C, ou n’importe quel ESP8266 avec un module relais 5 V câblé en COM/NO) aux bornes du thermostat, en parallèle avec l’ancien thermostat pour qu’il fonctionne encore si ta carte tombe en panne.La partie carte a été plus simple que je ne le pensais une fois que j’ai trouvé le catalogue. Ouvre le profil de l’appareil, l’onglet Commands, puis Add command :
Method: heat.set
Label: Heating
Tier: Basic
Parameters: on (Yes / no, required)
Seules les commandes de niveau Basic de cette liste apparaissent dans les paramètres du Switch. Ensuite, dans Switch : Run a command, choisis l’appareil et heat.set, avec la valeur « The control’s value ». Lie Current state à une clé de télémétrie que la carte envoie : j’envoie heat_on en 0/1 avec chaque mesure, pour que le switch affiche ce que le relais fait réellement et non ce que tu as cliqué. Pour une lumière ou un chauffage, tu peux désactiver « Ask before running ». Réponds avec le même id, sinon la carte reste bloquée sur « Sent; waiting for the device » :
// in callback, topic "v1/rpc/req/17"
String id = String(topic).substring(11);
digitalWrite(RELAY, on ? HIGH : LOW);
mqtt.publish(("v1/rpc/res/" + id).c_str(), "{"ok":true}");
Page que j’ai utilisée : Control cards.
Yep did the same mistake on paper last winter at home. You want a dry contact, so either a relay module that’s volt-free (the Sonoff RE5V1C style board, or any ESP8266 plus a 5 V relay module wired COM/NO) across the thermostat terminals, in parallel with the old thermostat so it still works if your board dies.
The board side was easier than I thought once I found the catalogue. Open the device’s profile, Commands tab, Add command:
Method: heat.set
Label: Heating
Tier: Basic
Parameters: on (Yes / no, required)
Only Basic tier commands from that list show up in the Switch settings. Then in the Switch: Run a command, pick the device and heat.set, value from « The control’s value ». Bind Current state to a telemetry key the board reports, I send heat_on as 0/1 with every reading so the switch shows what the relay is really doing, not what you clicked. For a light or heating you can turn « Ask before running » off. Reply on the same id or the card sits on « Sent; waiting for the device »:
// in callback, topic "v1/rpc/req/17"
String id = String(topic).substring(11);
digitalWrite(RELAY, on ? HIGH : LOW);
mqtt.publish(("v1/rpc/res/" + id).c_str(), "{"ok":true}");
Page I used: Control cards.
Traduit de English par IA ·
J’ai une carte relais sans potentiel, câblée en parallèle avec l’ancien thermostat, et j’ai ajouté heat.set au profil. L’interrupteur fonctionne et affiche l’état réel. Ce qui me manquait dans le code, c’était la réponse : sans elle, chaque clic indiquait « pas de réponse » après 30 secondes, alors que le chauffage s’allumait.
Got a volt-free relay board, wired in parallel with the old thermostat, and added heat.set to the profile. Switch works and shows the real state. The bit I was missing in code was the reply, without it every click said no answer after 30 seconds even though the heater came on.
Traduit de English par IA ·
Gardez l’ancien thermostat réglé sur environ 12 °C en protection antigel, en parallèle. Ainsi, si Internet ou votre carte tombe en panne, le bâtiment ne gèlera quand même pas.
Keep the old thermostat set to something like 12 °C as frost protection in parallel, then if the internet or your board is out the building still won’t freeze.
- Vous devez être connecté pour répondre à ce sujet.
Rejoignez la discussion
Connectez-vous pour poser et répondre à des questions, aimer les messages utiles et marquer la réponse qui a résolu votre problème. Chaque contribution rapporte des points et des niveaux.

