Hi,
I was somehow a bit reluctant to use a library, whose makers warn You:
"should only be used if you like living on the edge and are prepared to update sensor/gateway code frequently"
Anyhow. So now I swapped V1.5 with V2.0 beta of MySensors. I am using the "MockMySensor" sketch which
unfortunately doesn't contain an 'S_GAS' child. So I re-wrote the 'S_WATER' child, replacing each "water" by "gas":
Code: Select all
#define ID_S_GAS 34
[...]
#ifdef ID_S_GAS
MyMessage msg_S_GAS_F(ID_S_GAS, V_FLOW);
MyMessage msg_S_GAS_V(ID_S_GAS, V_VOLUME);
#endif
[...]
#ifdef ID_S_GAS
Serial.println(" S_GAS");
present(ID_S_GAS, S_GAS, "Gas Level");
wait(SHORT_WAIT);
#endif
[...]
#ifdef ID_S_GAS
gas();
#endif
[...]
#ifdef ID_S_GAS
void gas() {
Serial.print("Gas flow is: " );
Serial.println(map(randNumber, 1, 100, 0, 150));
send(msg_S_GAS_F.set(map(randNumber, 1, 100, 0, 150)));
Serial.print("Gas volume is: " );
Serial.println(map(randNumber, 1, 100, 0, 150));
send(msg_S_GAS_V.set(map(randNumber, 1, 100, 0, 150)));
}
#endif
I guess You are familiar with the MockMySensor project ...
Anyway, it does not seem to change anything. The display I get is exactly as it is with registering the gas-sensor as 'S_GAS' and then change that in Domoticz.
The graph's legend is the same too.
An idea what I may have done wrong?
Ah ... do I have to reflash the gateway as well? I did not do that ...
How compatible are V1.5 and V2.0 beta compiled firmwares anyhow?
Christoph