Closed baylanger closed 2 months ago
This is quite a huge PR. I will read through the code (and not only changes) to see if I detect anything strange, but I doubt
I suggest creating folders: resources:
version.sh should stay aside run.sh
This is quite a huge PR. I will read through the code (and not only changes) to see if I detect anything strange, but I doubt
I suggest creating folders: resources:
I dislike resources cuz I've never seen that word, doesn't mean it doesn't exist in some world I'm less aware like Python, Go, etc
I would prefer to keep something more standard like "src" (run.sh) and "lib" for the remaining. Let me know what you think.
I suggest creating folders: resources:
* tesla.sh (to be renamed tesla_commands.sh) * discovery.sh (to be renamed mqtt_discovery.sh) * listen_to_mqtt.sh (to be renamed mqtt_listen.sh)
All above renamed in this PR.
mqtt.sh:
Smarter DeployKey & Device's Card Panel logic
Rename function listen_for_HA_start->listenForHAstatus
listen_to_mqtt; use new teslaCtrlSendCommand
Split setup_auto_discovery: Create following functions:
listen_to_mqtt: sort & add missing commands
Create env.sh & version.sh, move top of run.sh to env.sh
Create tesla.sh & update functions
pass commandDescription from listen_mqtt
add return value
add more logging/consistancy (debug/info)
rename send_key -> teslaCtrlSendKey*
rename send_command -> teslaCtrlSendCommand*
rename tesla_vin2ble_ln -> vinToBLEln
in case someday teslaAPISendCommand