Open joosbuijsNL opened 2 years ago
Similar: #23.
The battery level feedback functionality has been integrated into the MTC4PF and MTC4PU since early stages of the project. It is even a part of the hardware and PCB design of the MTC4PF mini. We just never brought it to life there, but it would only be a small step I guess. Just need a layout and sufficient time at the same moment... as always.
The assumption is:
Ray is going to find out how to send the power level back to Rocrail via MQTT.
Any update/progress on this one? Still interested since during an 8h show it would be nice if trains are pro-actively put aside instead of slowing down and clogging up the layout :)
I have done some checking in battery status and had a conversation with Joos and I think it is doable: https://wiki.rocrail.net/rocrail-snapshot/rocrail/wrapper-en.html This command should message rocrail: <lc id="loc id> energypercentage="90" /> And you should set the home block for the locomotive. Can someone do some test with <lc id="loc id> energypercentage="90" /> by putting it on the command topic and see how rocrail is behaving.
If the home block is set the train should return to the home block if the percentage is low enough.
Buwizz reports back the battery voltagen, haven't found anything on the PU.
SBrick documentation: https://social.sbrick.com/custom/The_SBrick_BLE_Protocol.pdf BuWizz2 documentation: https://buwizz.com/BuWizz_2.0_API_1.3_web.pdf Lego PU documentation: https://lego.github.io/lego-ble-wireless-protocol-docs/
There seem to be some battery voltage report back for all of them.
Rocrail has a feature to send a train to the home location at a certain battery level (https://wiki.rocrail.net/doku.php?id=loc-details-en#minimal_energy). In order to use this correctly MTC4BT should regularly report back the current battery level to Rocrail.
Such that trains with low batteries are taken out of operation and do not block the main tracks.