Tasmota Energy Monitor Configuration Question/Help/Support

Hey everyone,
I just got my Sonoff S31, Output Configuration: On/Off: MQTT Publish - running in Mycodo.

My Tasmota Config is as follows:

I followed Kyle’s guide’s:

My Output Config is as follows:

When I click on or off the relay turns on and off


Very satisfying to have that working.

So now i’m trying to get inputs working as its my understanding that this can provide measurements on load usage/consumption.

I believe I should add this for my input:

I wasn’t sure what to put for these configurations however. The only thing i’ve done was set the Host to the Tastmosta Power Plug

which that alone produces the following:


So its all zero’d out.

I’m inclined to think this is a config issue on my end but maybe my Database is locked/wonky?

Not sure where to go from here but i’ll scratch my head on this a bit any help advice much appreciated.

  • Scott G.

Daemon Logs show:

Blockquote
023-05-10 03:25:28,166 - DEBUG - mycodo.influx - Write point success: b’V,channel=0,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=electrical_potential value=0\nA,channel=1,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=electrical_current value=0\nW,channel=2,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=power value=0\nva,channel=3,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=power_apparent value=0\nvar,channel=4,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=power_reactive value=0\nunitless,channel=5,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=power_factor value=0\nkWh,channel=6,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=energy value=0.001’
2023-05-10 03:25:43,032 - DEBUG - mycodo.inputs.tasmota_outlet_energy_monitor_09c82ded - Request: http://192.168.86.211/cm?cmnd=status%2010
2023-05-10 03:25:43,033 - DEBUG - mycodo.inputs.tasmota_outlet_energy_monitor_09c82ded - Request returned: {‘StatusSNS’: {‘Time’: ‘2023-05-10T03:25:42’, ‘ENERGY’: {‘TotalStartTime’: ‘2023-05-10T01:30:50’, ‘Total’: 0.001, ‘Yesterday’: 0.0, ‘Today’: 0.001, ‘Power’: 0, ‘ApparentPower’: 0, ‘ReactivePower’: 0, ‘Factor’: 0.0, ‘Voltage’: 0, ‘Current’: 0.0}}}
2023-05-10 03:25:43,057 - DEBUG - mycodo.controllers.controller_input_09c82ded - Adding measurements to InfluxDB with ID 09c82ded-fba9-4947-9bb2-143f96e7a02c: {0: {‘measurement’: ‘electrical_potential’, ‘unit’: ‘V’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 25, 43, 33573)}, 1: {‘measurement’: ‘electrical_current’, ‘unit’: ‘A’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 25, 43, 33591)}, 2: {‘measurement’: ‘power’, ‘unit’: ‘W’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 25, 43, 33604)}, 3: {‘measurement’: ‘power_apparent’, ‘unit’: ‘va’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 25, 43, 33616)}, 4: {‘measurement’: ‘power_reactive’, ‘unit’: ‘var’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 25, 43, 33628)}, 5: {‘measurement’: ‘power_factor’, ‘unit’: ‘unitless’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 25, 43, 33641)}, 6: {‘measurement’: ‘energy’, ‘unit’: ‘kWh’, ‘value’: 0.001, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 25, 43, 33653)}}
2023-05-10 03:25:43,108 - DEBUG - mycodo.influx - Write point success: b’V,channel=0,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=electrical_potential value=0\nA,channel=1,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=electrical_current value=0\nW,channel=2,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=power value=0\nva,channel=3,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=power_apparent value=0\nvar,channel=4,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=power_reactive value=0\nunitless,channel=5,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=power_factor value=0\nkWh,channel=6,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=energy value=0.001’
2023-05-10 03:25:58,022 - DEBUG - mycodo.inputs.tasmota_outlet_energy_monitor_09c82ded - Request: http://192.168.86.211/cm?cmnd=status%2010
2023-05-10 03:25:58,023 - DEBUG - mycodo.inputs.tasmota_outlet_energy_monitor_09c82ded - Request returned: {‘StatusSNS’: {‘Time’: ‘2023-05-10T03:25:57’, ‘ENERGY’: {‘TotalStartTime’: ‘2023-05-10T01:30:50’, ‘Total’: 0.001, ‘Yesterday’: 0.0, ‘Today’: 0.001, ‘Power’: 0, ‘ApparentPower’: 0, ‘ReactivePower’: 0, ‘Factor’: 0.0, ‘Voltage’: 0, ‘Current’: 0.0}}}
2023-05-10 03:25:58,047 - DEBUG - mycodo.controllers.controller_input_09c82ded - Adding measurements to InfluxDB with ID 09c82ded-fba9-4947-9bb2-143f96e7a02c: {0: {‘measurement’: ‘electrical_potential’, ‘unit’: ‘V’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 25, 58, 23607)}, 1: {‘measurement’: ‘electrical_current’, ‘unit’: ‘A’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 25, 58, 23624)}, 2: {‘measurement’: ‘power’, ‘unit’: ‘W’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 25, 58, 23638)}, 3: {‘measurement’: ‘power_apparent’, ‘unit’: ‘va’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 25, 58, 23651)}, 4: {‘measurement’: ‘power_reactive’, ‘unit’: ‘var’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 25, 58, 23663)}, 5: {‘measurement’: ‘power_factor’, ‘unit’: ‘unitless’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 25, 58, 23675)}, 6: {‘measurement’: ‘energy’, ‘unit’: ‘kWh’, ‘value’: 0.001, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 25, 58, 23687)}}
2023-05-10 03:25:58,100 - DEBUG - mycodo.influx - Write point success: b’V,channel=0,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=electrical_potential value=0\nA,channel=1,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=electrical_current value=0\nW,channel=2,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=power value=0\nva,channel=3,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=power_apparent value=0\nvar,channel=4,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=power_reactive value=0\nunitless,channel=5,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=power_factor value=0\nkWh,channel=6,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=energy value=0.001’
2023-05-10 03:26:13,136 - DEBUG - mycodo.inputs.tasmota_outlet_energy_monitor_09c82ded - Request: http://192.168.86.211/cm?cmnd=status%2010
2023-05-10 03:26:13,136 - DEBUG - mycodo.inputs.tasmota_outlet_energy_monitor_09c82ded - Request returned: {‘StatusSNS’: {‘Time’: ‘2023-05-10T03:26:12’, ‘ENERGY’: {‘TotalStartTime’: ‘2023-05-10T01:30:50’, ‘Total’: 0.001, ‘Yesterday’: 0.0, ‘Today’: 0.001, ‘Power’: 0, ‘ApparentPower’: 0, ‘ReactivePower’: 0, ‘Factor’: 0.0, ‘Voltage’: 0, ‘Current’: 0.0}}}
2023-05-10 03:26:13,161 - DEBUG - mycodo.controllers.controller_input_09c82ded - Adding measurements to InfluxDB with ID 09c82ded-fba9-4947-9bb2-143f96e7a02c: {0: {‘measurement’: ‘electrical_potential’, ‘unit’: ‘V’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 26, 13, 137171)}, 1: {‘measurement’: ‘electrical_current’, ‘unit’: ‘A’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 26, 13, 137189)}, 2: {‘measurement’: ‘power’, ‘unit’: ‘W’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 26, 13, 137203)}, 3: {‘measurement’: ‘power_apparent’, ‘unit’: ‘va’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 26, 13, 137215)}, 4: {‘measurement’: ‘power_reactive’, ‘unit’: ‘var’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 26, 13, 137227)}, 5: {‘measurement’: ‘power_factor’, ‘unit’: ‘unitless’, ‘value’: 0.0, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 26, 13, 137239)}, 6: {‘measurement’: ‘energy’, ‘unit’: ‘kWh’, ‘value’: 0.001, ‘timestamp_utc’: datetime.datetime(2023, 5, 10, 2, 26, 13, 137251)}}
2023-05-10 03:26:13,215 - DEBUG - mycodo.influx - Write point success: b’V,channel=0,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=electrical_potential value=0\nA,channel=1,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=electrical_current value=0\nW,channel=2,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=power value=0\nva,channel=3,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=power_apparent value=0\nvar,channel=4,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=power_reactive value=0\nunitless,channel=5,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=power_factor value=0\nkWh,channel=6,device_id=09c82ded-fba9-4947-9bb2-143f96e7a02c,measure=energy value=0.001’
2023-05-10 03:26:19,398 - INFO - mycodo.controllers.controller_input_09c82ded - Deactivated in 28.9 ms
2023-05-10 03:26:19,398 - DEBUG - mycodo - Input controller with ID 09c82ded-fba9-4947-9bb2-143f96e7a02c deactivated.

Hey Everyone,
Been thinking on this more and I was clicking buttons not knowing what they did which is normally a bad idea that was days ago but it might be a breadcrumb.
image

So I’ve clicked these… betting that’s what’s causing this but the problem is clicking them again doesn’t fix it…

Thought I’d post more of my config for prosperity’s sake. Other config menus were vanilla so i’ll leave them out.

General Settings
Language

English
Landing Page

Live Measurements
Index Page

Same as Landing Page
Pyro Timeout
30
Enable Daemon Debug Logging
Enable Daemon debug logging for diagnosing issues. Requires Daemon restart.
Force HTTPS
Check to force all web connections to use SSL (port 443) for greater security.
Hide success messages
Check to prevent Success alert messages from appearing at the top of the page.
Hide info messages
Check to prevent Info alert messages from appearing at the top of the page.
Hide warning messages
Check to prevent Warning alert messages from appearing at the top of the page.
Hide Form Tooltips
Hide tooltips that pop up over form inputs.
Opt-out of statistics
Check if you do not wish to send anonymous usage statistics. View collected statistics
Time Series Database Settings
A properly-configured time series database is required for Mycodo to function and is used to store and query measurements.
Database

Influxdb 1.x
Retention Policy
autogen
Hostname
localhost
Port
8086
Database Name
mycodo_db
Username
mycodo
Password
Dashboard Settings
Grid Cell Height (px)
25
Upgrade Settings
Internet Test IP Address
8.8.8.8
Internet Test Port
53
Internet Test Timeout
3
Check for Updates
Check if you would like Mycodo to automatically check for upgrades.
Energy Usage Settings
Max Amps
15.0
Voltage
120
Cost per kWh
0.05
Currency Unit
$
Day of Month
15
Generate Usage/Cost Report
Automatically generate output usage reports on a daily/weekly/monthly schedule. Saved to /home/smguth/Mycodo/output_usage_reports.
Time Span to Generate

Monthly
Day of Week/Month to Generate
1
Hour of Day to Generate
0
Controller Sample Rate Settings
The sample rates of Mycodo daemon controllers can be changed below. Note that the daemon will need to be restarted after saving in order for the new options to take effect. Select Config [Gear Icon] → Restart Backend to restart the daemon.
Sample Rate (Seconds): Conditional
0.25
Sample Rate (Seconds): Function
0.25
Sample Rate (Seconds): Input
0.1
Sample Rate (Seconds): Output
0.05
Sample Rate (Seconds): PID
0.1
Sample Rate (Seconds): Widget
0.25

Wanted to share a picture of it all put together and what I’m using for load. Thought maybe the LED might not be drawing enough amps to register past 0 but I’d imagine that its ample load. :laughing:

If the relay was off the measurements of 0 would be anticipated.

Update -

This is the secret sauce…

image
image

image

Looks like this might be working


Still Kicking the Tires but looks fit for purpose at cursory look.


if this is set to Basic then the inputs won’t work. I forgot to mention that bit.