question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feature request: kWhDelivered/kWhCounter in WebUI, HASS status and MQTT

See original GitHub issue

I’m working on a solution for a simple view of the consumed/charged kwh, preferably recorded by car/model (M3 and non tesla), just to get an overview of how much kwh each of the cars consumed in a year.

I think this fork is the closest to beginn with and fits quite good, as my idea was to integrate it in HASS anyway and/or make it available via MQTT.

I use TWCManager in a passive way, in fakemaster = 2 mode and like to capture the consumed kwh (on newer fw). As a second step I’m planing to readout part of the VIN to figure out if its a telsa or not to assign from-to charged kwh to the individual car.

is it possible to integrate kWhDelivered/kWhCounter msgpart from debug output in HASS and MQTT the same was as “total_amps_in_use”, “totalAmpsInUse” ?

22:23:40 TWCManager 1 TWC Manager starting as fake Master with id 7777 and sign 77
22:23:41 TWCManager 9 Rx@: () FD EB 25 87 00 00 03 9C 00 F6 00 F0 00 F6 00 00 00 00 00 12
22:23:41 TWCManager 1 VRS XXX: 924kWh 246V 240V 246V

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:26 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
MikeBishopcommented, Apr 29, 2020

@nean-and-i, to your last question, if a non-Tesla car is charging the result will be all zeros.

1reaction
ngardinercommented, Apr 28, 2020

With 6365098 we add VIN polling for TWCs which support this in their firmware. When a vehicle is detected charging on a Slave TWC, we will send the command to prompt the TWC to send the first 7 bytes of the attached vehicle. If it responds, we then go on to request the next 7 bytes and finally the last 3 bytes.

This is stored as current VIN and last VIN for each Slave TWC. This is now visible in the built-in web interface, and is published via MQTT and HASS:

  • last_vehicle_vin or lastVehicleVIN per TWC
  • current_vehicle_vin or currentVehicleVIN per TWC

I am going to use this opportunity to do some work on the two Status module docs pages now to reflect all of the various published values. They are:

Read more comments on GitHub >

github_iconTop Results From Across the Web

MQTT - Home Assistant
By default, Home Assistant sends online and offline to homeassistant/status . MQTT Birth and Last Will messages can be customized or disabled from...
Read more >
MQTT - Tasmota
Configure MQTT using WebUI~. Go to Configuration -> Configure Other and make sure "MQTT Enable" box is checked. Once MQTT is enabled you...
Read more >
MQTT - AWS IoT Core - AWS Documentation
MQTT (Message Queuing Telemetry Transport) is a lightweight and widely adopted messaging protocol that is designed for constrained devices.
Read more >
Understand Azure IoT Hub MQTT support - Microsoft Learn
This article describes how devices can use supported MQTT behaviors to communicate with IoT Hub. Note. Some of the features mentioned in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found