You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some weeks ago I added messaging to my EVCC installation.
Because there is no native implementation for signal messanger I have build a server to act as messagebot in my local network.
The task here is to create a json message an send it to the messagebot server.
In EVCC I have added "custom" messaging to /etc/evcc.yaml
I placed a simple script "sendSignalMsg.sh" in /usr/local/bin. The script is taking the input from EVCC, is adding some stuff to create the message. The message is posted via wget to the MessageBot Server.
During first tests I found that there are error message in log file about certificate trust errors. Finally I added the certificate of my local root-ca to EVCC and the certificate error was history ...
/usr/local/bin/sendSignalMsg.sh
#!/bin/bash
# Alle uebergebenen Parameter (sie koennten durch ' ' getrennt sein) zu einem String zusammenfassen,
# {} entfernen, und "msg;" entfernen
# Den bereinigten String in der Variablem MSG speichern
MSG=$( echo ${*} | cut -d'}' -f1 | cut -d'{' -f2 | cut -d':' -f2)
# Erstelle eine temporaere Datei und speichere den Namen in der Variablen TEMP_FILE
TEMP_FILE=$(mktemp)
# Nachricht im JSON Format erstellen
echo '{' > ${TEMP_FILE}
echo ' "receiver": "+49nnnnnnnnnn",' >> ${TEMP_FILE}
echo ' "msg": "'${MSG}'"' >> ${TEMP_FILE}
echo '}' >> ${TEMP_FILE}
wget --post-file=${TEMP_FILE} --header=Authorization:"Basic cBlaBla" --header=Content-Type:application/json -qO- https://Messagebot:8080/evcc/justsend.sh >/dev/null 2>&1
# temporaere Datei wieder loeschen
rm -rf ${TEMP_FILE}
# Jetzt noch mal fuer 2. Empfaenger wiederholen
# ===========================================
# Erstelle eine temporaere Datei und speichere den Namen in der Variablen TEMP_FILE
TEMP_FILE=$(mktemp)
# Nachricht im JSON Format erstellen
echo '{' > ${TEMP_FILE}
echo ' "receiver": "+49xxxxxxxxxx",' >> ${TEMP_FILE}
echo ' "msg": "'${MSG}'"' >> ${TEMP_FILE}
echo '}' >> ${TEMP_FILE}
wget --post-file=${TEMP_FILE} --header=Authorization:"Basic cBlaBla" --header=Content-Type:application/json -qO- https://Messagebot:8080/evcc/justsend.sh >/dev/null 2>&1
# temporaere Datei wieder loeschen
rm -rf ${TEMP_FILE}
exit 0
But there are more ERROR messages in log, and I don't know where its coming from :(
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Some weeks ago I added messaging to my EVCC installation.
Because there is no native implementation for signal messanger I have build a server to act as messagebot in my local network.
The task here is to create a json message an send it to the messagebot server.
In EVCC I have added "custom" messaging to /etc/evcc.yaml
I placed a simple script "sendSignalMsg.sh" in /usr/local/bin. The script is taking the input from EVCC, is adding some stuff to create the message. The message is posted via wget to the MessageBot Server.
During first tests I found that there are error message in log file about certificate trust errors. Finally I added the certificate of my local root-ca to EVCC and the certificate error was history ...
/usr/local/bin/sendSignalMsg.sh
But there are more ERROR messages in log, and I don't know where its coming from :(
When running the script via CLI there are no error messages at all ...
How to remove/supress these ERROR messages?
Beta Was this translation helpful? Give feedback.
All reactions