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 -
"ZHNetwork" a esp-now based mesh network for ESP8266/ESP32 hardware
Feature Requests • 17 Mar 2023, 07:25 • graffiti 17 Mar 2023, 07:25 -
wireless gateway
Feature Requests • 8 Jun 2023, 14:05 • Thomaswortman 8 Jun 2023, 14:05 -
PJON on RS485
Feature Requests • 11 Apr 2022, 06:58 • hypnosiss 22 days ago -
debug serial gateway (homeassistant raspberry py 4)
Feature Requests • 2 May 2023, 09:01 • Branther 8 Jun 2023, 12:38 -
ota-configuration
Feature Requests • 8 Mar 2023, 09:28 • pbw 8 Mar 2023, 09:28