Hi everyone, I’m asking for help with the above mentioned issues.
I try to summarize as much as possible.
My configuration involves an ESP8266 which publishes the values of 4 sensors, via wifi, and it works because with the app on the phone I see the published messages…
On the Raspeberry where OH4 is installed, Mosquito is also active.
The configuration of everything is done with files and is as follows:
ESP8266 CONFIGURATION
‘’’
randomSeed(analogRead(A0));
pompa_temperatura = int(random(0, 100));
Serial.print("Temperatura Pompa : ");
Serial.println(pompa_temperatura);
itoa(pompa_temperatura, mqtt_pompa_temperatura, 10);
client.publish(“mqttChannelPompaTemperatura”, mqtt_pompa_temperatura);
‘’’
BRIDGE AND THING CONFIGURATION
‘’’
Bridge mqtt:broker:mqttBridgeBrokerMosquito “Mosquito OH4”[ host=“localhost”, port=1883, username=“xxxx”, password=“yyyy” ]
Thing mqtt:topic:mqttThingPompaIrrigazione “Pompa Irrigazione” (mqtt:broker:mqttBridgeBrokerMosquito) {
Channels:
Type contact : mqttChannelPompaStato “Pompa - Topic Stato” // [min=0, max=1, step=1]
Type number : mqttChannelPompaPortata “Pompa - Topic Portata” [min=0, max=100, step=1, “l/min”]
Type number : mqttChannelPompaPressione “Pompa - Topic Pressione” [min=0, max=10, step=1, “bar”]
Type number : mqttChannelPompaTemperatura “Pompa - Topic Temperatura” [min=0, max=100, step=1, “°C”]
}
‘’’
ITEMS CONFIGURATION
‘’’
String mqttItemPompaStato “Pompa topic stato” (GR_Info_Pompa) {autoupdate=“true”, channel=“mqtt:topic:mqttThingPompaIrrigazione:mqttChannelPompaStato”}
String mqttItemPompaPortata “Pompa topic portata” (GR_Info_Pompa) {autoupdate=“true”, channel=“mqtt:topic:mqttThingPompaIrrigazione:mqttChannelPompaPortata”}
String mqttItemPompaPressione “Pompa topic pressione” (GR_Info_Pompa) {autoupdate=“true”, channel=“mqtt:topic:mqttThingPompaIrrigazione:mqttChannelPompaPressione”}
String mqttItemPompaTemperatura “Pompa topic temperatura” (GR_Info_Pompa) {autoupdate=“true”, channel=“mqtt:topic:mqttThingPompaIrrigazione:mqttChannelPompaTemperatura”}
,
The Bridge and the Thing are ONLINE and therefore configured correctly,
I see the channel values pass through, but the problem is that the ITEM values are always NULL.
I have done various tests by changing the data TYPES both on the Channels and on the Items but to no avail…
I’m not a programmer, I can get by with some of these things, but in this case I can’t continue…
Maybe it’s just a syntax error…
THANK YOU ALL FOR THE HELP