Battery level icon

9 years 6 months ago #1694 by zyrotron
Battery level icon was created by zyrotron
In some of the photos in the tutorials there is a small battery icon, showing actually the battery level of the node. I've build a couple of esp8266-DHT22 humidity/temperature nodes using the provided arduino code (v.2), however there is no icon shown.
  1. Is there a way to enable it?
  2. How is the battery level measured?

By the way, did anyone have any progress with the battery life of the temperature node? I am looking i a way to put the node in sleep mode and transmit every half an hour.

Thanks.

Please Log in or Create an account to join the conversation.

9 years 6 months ago #1698 by piman
Replied by piman on topic Battery level icon
I think you have to do this in automation. iot-playground.com/2-uncategorised/34-se...battery-status-alarm

Please Log in or Create an account to join the conversation.

9 years 6 months ago #1704 by zyrotron
Replied by zyrotron on topic Battery level icon
I have already done that, however the icon is still missing from the web interface.

Please Log in or Create an account to join the conversation.

9 years 6 months ago #1708 by EasyIoT
Replied by EasyIoT on topic Battery level icon

zyrotron wrote: In some of the photos in the tutorials there is a small battery icon, showing actually the battery level of the node. I've build a couple of esp8266-DHT22 humidity/temperature nodes using the provided arduino code (v.2), however there is no icon shown.

  1. Is there a way to enable it?
  2. How is the battery level measured?

By the way, did anyone have any progress with the battery life of the temperature node? I am looking i a way to put the node in sleep mode and transmit every half an hour.

Thanks.


You see battery icon in user interface if you have property Status.Battery. It is automatically added to node if you call function sendBatteryLevel in ESP8266 EasyIoT library and set value between 0 and 100. If you are using WEB API then call
http://localhost/Api/EasyIoT/Control/Module/Virtual/N19S0/ControlBattery/10
Relace server address, node address and value with your settings.

To measure battery voltage level you have two options:
-If you are using battery directly connected to ESP8266 (no regulator) use getBatteryLevel () function in door/windoe example
github.com/iot-playground/Arduino/blob/m...or_window_sensor.ino
-if you are using voltage regulator, then connect resistor divider (two serial resistors) directly to battery VCC and GND. Then connect middle od resistor divider to analog input and in Arduino program measure voltage on this pin.
The following user(s) said Thank You: zyrotron

Please Log in or Create an account to join the conversation.

Time to create page: 0.247 seconds

Forum latest

  • No posts to display.