Usage of rpi_envsens lib and pressure output added for client
This commit is contained in:
parent
1cfa3c4274
commit
e14e8c4585
@ -5,7 +5,7 @@ import config
|
|||||||
import logging
|
import logging
|
||||||
import socket_protocol
|
import socket_protocol
|
||||||
|
|
||||||
import envsens
|
import rpi_envsens as envsens
|
||||||
|
|
||||||
logger = logging.getLogger('APP')
|
logger = logging.getLogger('APP')
|
||||||
|
|
||||||
@ -46,6 +46,7 @@ class my_client_protocol_tcp(my_base_protocol_tcp):
|
|||||||
env_data = msg.get_data()
|
env_data = msg.get_data()
|
||||||
print("Temperature: %6.1f °C" % env_data[envsens.KEY_TEMPERATURE])
|
print("Temperature: %6.1f °C" % env_data[envsens.KEY_TEMPERATURE])
|
||||||
print("Humidity: %6.1f %%" % env_data[envsens.KEY_HUMIDITY])
|
print("Humidity: %6.1f %%" % env_data[envsens.KEY_HUMIDITY])
|
||||||
|
print("Pressure: %6.1f mbar" % env_data[envsens.KEY_PRESSURE])
|
||||||
return self.STATUS_OKAY, None
|
return self.STATUS_OKAY, None
|
||||||
else:
|
else:
|
||||||
print('No environmental data received!')
|
print('No environmental data received!')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user