Closed penzoiders closed 7 years ago
I think that an hint on the field label can avoid issues for now. Definitive solution may be to parse the inputed field and process it to keep into account only the last separator, or the first from the right, and replace it with a dot if it is a comma. Thrashing all the remaining separators in the leftmost part of the number (think someone using a dot to separate the thousands).
I think most people do know this, or can figure it out. And there are input parsers based on language. Will have a look into that
I think most people do know this, or can figure it out. And there are input parsers based on language. Will have a look into that
For sure it's not rocket science, but I know that if an end user has the opportunity to set something wrong, this will happen. =)
I think that an hint in the label field is more than enough for now.
A parser that takes locale into account it's a good idea, but maybe more important is to avoid platform crashing (better set a null value, or valid default if the configuration field is proven to be wrong in format).
Thanks @theyosh , unfortunately, the temperature is not synonymous I have here 24 degrees and 14 degrees is displayed in the interface. And with 3307.3% humidity I can leave the comma away as I want I still come on no real value and when I move the comma I come to 33% and that is not true.
2017-09-27 21:01:03,864 - ERROR - terrariumSensor - Error updating dht22 humidity sensor 'Luft Test 2' with error: float() argument must be a string or a number 2017-09-27 21:01:41,770 - ERROR - terrariumSensor - Error updating dht22 temperature sensor 'Temp Test 1' with error: float() argument must be a string or a number
I do not know what it means but maybe it helps with the error search
Ok, I close this issue now, because the initial problem is solved. And I get the feeling that there is no software problem now. And therefore there is nothing more to do in code.
I've configured a DHT22 sensor using pins 17 (3.3v) 18 (gpio) 20 (ground). configured through GUI and did not come up with a valid monitoring.
this is what is thrown at
screen -r
the sensor is one of these with little PCB with embedded resistor convenient pins for GPIO hook up. https://www.amazon.it/gp/product/B01DB8JH4M/ref=oh_aui_detailpage_o02_s00?ie=UTF8&psc=1
To get the server working again I had to remove the sensor configuration. Upon a CTRL+C restart in the screen session I got this output:
any clues?