gw.send for float
-
Hello,
I have many gases sensors, especially for harmful gases, that report very small concentration, which is thus a float.
Today gw.send only allows an int, which is troublesome for I have to multiply per 1k to have an int.
That would mean that the controller would have to convert back to float to be on the right scale.
Would that extension be possible ?
-
@epierre almost all my sensors use gw.send to send floats. It is in the API, or do I misunderstand you?
-
in 1.5 I just have the int definition of it, maybe is that linked to the S_AIR_QUALITY maybe ?
gw.present(CHILD_ID_CO, S_AIR_QUALITY);
gw.send(msg_co.set("ppm"));
-
@epierre Did you try something like:
float myval = 0.1234; gw.send( MyMessage(CHILD_ID_CO, V_VAR1).set(myval) );
-
You should be able to do something like line 57 in this sketch https://codebender.cc/sketch:177182#Soil moisture for houseplants - multi-sensor internal pull-up.ino
-
@mfalkvidd thanks a lot !
Suggested Topics
-
Controlling Blinds.com RF Dooya Motors with Arduino and Vera
My Project • 24 Mar 2014, 13:27 • petewill 12 Aug 2023, 16:39 -
Raspberry MQTT GW over TLS with rfm69
Feature Requests • 14 Sept 2022, 15:11 • Tico 16 Sept 2022, 07:23 -
"ZHNetwork" a esp-now based mesh network for ESP8266/ESP32 hardware
Feature Requests • 17 Mar 2023, 07:25 • graffiti 17 Mar 2023, 07:25 -
ESP32 Wired (no WiFi)
Feature Requests • 15 Nov 2024, 10:39 • Marcin 28 days ago -
ESPnow as transport layer
Feature Requests • 19 days ago • MasMat 19 days ago -
ESP32 with builtin Ethernet as Gateway - f.e. WT32-ETH01
Feature Requests • 15 Mar 2023, 15:01 • gryzli133 15 Mar 2023, 21:25