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 -
ESPnow as transport layer
Feature Requests • 26 days ago • MasMat 26 days ago -
wireless gateway
Feature Requests • 8 Jun 2023, 14:05 • Thomaswortman 8 Jun 2023, 14:05 -
ESP32 with builtin Ethernet as Gateway - f.e. WT32-ETH01
Feature Requests • 15 Mar 2023, 15:01 • gryzli133 15 Mar 2023, 21:25 -
Raspberry MQTT GW over TLS with rfm69
Feature Requests • 14 Sept 2022, 15:11 • Tico 16 Sept 2022, 07:23 -
PJON on RS485
Feature Requests • 11 Apr 2022, 06:58 • hypnosiss 9 Mar 2025, 07:57