Voltage monitor with ESP8266
Moderator: leecollings
Voltage monitor with ESP8266
Using a voltage divider I was able to make a voltage monitor with the ESP8266, with ADS1115.
The Outback charge controller was a real pain to give me the voltage in any form that I could use with Domoticz, but now I have a complete status even on my cell phone. I love this program, combined with Espeasy.!!!!
The Outback charge controller was a real pain to give me the voltage in any form that I could use with Domoticz, but now I have a complete status even on my cell phone. I love this program, combined with Espeasy.!!!!
- Attachments
-
- chart.png (89.78 KiB) Viewed 3352 times
-
- Volt metter 24 v.png (62.16 KiB) Viewed 3352 times
Re: Voltage monitor with ESP8266
The only issue I get is I get an value of -65 V on like a random basis. I am guessing this is cause by flyback voltage to the battery, but I am not sure how to filter that out, but I can manually remove the data points with the shift click on the graft. I love searching these forums 

- sincze
- Posts: 1302
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Voltage monitor with ESP8266
Nice one
A solution to your problem would be to store the values first in a dummy esp device. (not sending them to domoticz directly) Using rules to see if it has a 'valid' number and then post to domoticz.
https://www.letscontrolit.com/wiki/inde ... rial_Rules

A solution to your problem would be to store the values first in a dummy esp device. (not sending them to domoticz directly) Using rules to see if it has a 'valid' number and then post to domoticz.

https://www.letscontrolit.com/wiki/inde ... rial_Rules
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Re: Voltage monitor with ESP8266
I like that solution, I like that alot!
Rules on the ESP8266 board, would filter any bad data before it would be recorded and thus there would be no problem data, only missing gaps.
I guess the next trick is to switch to the ESP32 so that I can use the sleep mode to save power so I can run this on batteries. Ideally, I would like sensors that are powered by an lithium battery which in turn are charged by a solar panel.
Rules on the ESP8266 board, would filter any bad data before it would be recorded and thus there would be no problem data, only missing gaps.
I guess the next trick is to switch to the ESP32 so that I can use the sleep mode to save power so I can run this on batteries. Ideally, I would like sensors that are powered by an lithium battery which in turn are charged by a solar panel.
- sincze
- Posts: 1302
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Voltage monitor with ESP8266
Just let me know if you need help 
I know it works.
Next to data validation I now only send data if the data itself was changed since the last reading. And use timers as well. To look at the data every X seconds.

I know it works.
Next to data validation I now only send data if the data itself was changed since the last reading. And use timers as well. To look at the data every X seconds.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Re: Voltage monitor with ESP8266
So I guess what you do is disable "enabled" on the device, then create a loop with timers so that it reads the data compares with last then sends via rules.
I took a quick look at rules, but I did not see where they detailed how to send the data to domoticzs.....
If you have a link to an example that would be cool
I took a quick look at rules, but I did not see where they detailed how to send the data to domoticzs.....
If you have a link to an example that would be cool
- sincze
- Posts: 1302
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Voltage monitor with ESP8266
Leave the device enabled but disable only the 'send to controller' check box, where the IDX is filled.MartHale wrote: ↑Monday 06 August 2018 21:02 So I guess what you do is disable "enabled" on the device, then create a loop with timers so that it reads the data compares with last then sends via rules.
I took a quick look at rules, but I did not see where they detailed how to send the data to domoticzs.....
If you have a link to an example that would be cool
To send data from rules you can use
Code: Select all
SendToHTTP 192.168.1.111,8080,/json.htm?type=command¶m=udevice&idx=<IDXHERE>&nvalue=0&svalue=<YOUR VALUE>
Code: Select all
On System#Boot do
TimerSet,1,30
EndOn
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Re: Voltage monitor with ESP8266
Hi, I thought I would post an update, I was able to get rid of the voltage spikes by adding a capacitor to the center of the voltage divider and putting the other leg to the ground of the esp8266 board!. that problem is now all gone.
I love it when a problem is that simple to get rid of and gets rid of any other code I need to do. Yipee!

I love it when a problem is that simple to get rid of and gets rid of any other code I need to do. Yipee!








- sincze
- Posts: 1302
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Voltage monitor with ESP8266
Exellent, but still a questionMartHale wrote: ↑Thursday 04 October 2018 0:47 Hi, I thought I would post an update, I was able to get rid of the voltage spikes by adding a capacitor to the center of the voltage divider and putting the other leg to the ground of the esp8266 board!. that problem is now all gone.
I love it when a problem is that simple to get rid of and gets rid of any other code I need to do. Yipee!
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()

We love pictures of succesful and less succesful projects for inspiration.

Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Re: Voltage monitor with ESP8266
https://www.youtube.com/watch?v=WytU5uj ... 6w&index=2
I have been trying to understand capacitors magic in circuits, this video was most eye opening..
I have been trying to understand capacitors magic in circuits, this video was most eye opening..
Who is online
Users browsing this forum: No registered users and 1 guest