Zway [v1.5.0] Throw Exception if 3 times failed to connect to Raspberry server, add 3 new commandlcasses to IgnoredClasses
Zway-Bot [v1.7.0] rewrite to Threaded Modules, edit service file for systemd
This commit is contained in:
parent
877bce4d1a
commit
6807cd35ad
@ -63,6 +63,8 @@ namespace BlubbFish.IoT.Bots.ZwayBot.Moduls {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void MqttUpdate(Object sender, BackendEvent e) {
|
protected virtual void MqttUpdate(Object sender, BackendEvent e) {
|
||||||
|
try {
|
||||||
|
if (this.mqttConnect) {
|
||||||
if (e.From.ToString().StartsWith("zwavebot/devices/") && (e.From.ToString().EndsWith("/set") || e.From.ToString().EndsWith("/get"))) {
|
if (e.From.ToString().StartsWith("zwavebot/devices/") && (e.From.ToString().EndsWith("/set") || e.From.ToString().EndsWith("/get"))) {
|
||||||
Match m = new Regex("^zwavebot/devices/(\\d+)/(\\d+)/(\\d+)/[gs]et$|^zwavebot/devices/(\\d+)/(\\d+)/(\\d+)/(\\d+)/[gs]et$").Match(e.From.ToString());
|
Match m = new Regex("^zwavebot/devices/(\\d+)/(\\d+)/(\\d+)/[gs]et$|^zwavebot/devices/(\\d+)/(\\d+)/(\\d+)/(\\d+)/[gs]et$").Match(e.From.ToString());
|
||||||
String id = "";
|
String id = "";
|
||||||
@ -98,6 +100,8 @@ namespace BlubbFish.IoT.Bots.ZwayBot.Moduls {
|
|||||||
this.Update?.Invoke(this, cs.Item2);
|
this.Update?.Invoke(this, cs.Item2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch { }
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("BlubbFish")]
|
[assembly: AssemblyCompany("BlubbFish")]
|
||||||
[assembly: AssemblyProduct("Zway-Bot")]
|
[assembly: AssemblyProduct("Zway-Bot")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2017 - 05.06.2018")]
|
[assembly: AssemblyCopyright("Copyright © 2017 - 29.09.2018")]
|
||||||
[assembly: AssemblyTrademark("BlubbFish")]
|
[assembly: AssemblyTrademark("BlubbFish")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
@ -31,8 +31,8 @@ using System.Runtime.InteropServices;
|
|||||||
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||||
// übernehmen, indem Sie "*" eingeben:
|
// übernehmen, indem Sie "*" eingeben:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.6.2")]
|
[assembly: AssemblyVersion("1.7.0")]
|
||||||
[assembly: AssemblyFileVersion("1.6.2")]
|
[assembly: AssemblyFileVersion("1.7.0")]
|
||||||
[assembly: NeutralResourcesLanguage("de-DE")]
|
[assembly: NeutralResourcesLanguage("de-DE")]
|
||||||
|
|
||||||
// “Internet Of Things” icon by By Michael Wohlwend, US, from thenounproject.com.
|
// “Internet Of Things” icon by By Michael Wohlwend, US, from thenounproject.com.
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -6,7 +6,7 @@ OUTPUT="../bin/Release"
|
|||||||
|
|
||||||
EXEC="$ROOT/usr/local/bin/zwaybot"
|
EXEC="$ROOT/usr/local/bin/zwaybot"
|
||||||
CONFIG="$ROOT/etc/zwaybot"
|
CONFIG="$ROOT/etc/zwaybot"
|
||||||
SYSTEMD="$ROOT/etc/systemd/system"
|
SYSTEMD="$ROOT/lib/systemd/system"
|
||||||
LOGROTATE="$ROOT/etc/logrotate.d"
|
LOGROTATE="$ROOT/etc/logrotate.d"
|
||||||
|
|
||||||
DEBIAN="$ROOT/DEBIAN"
|
DEBIAN="$ROOT/DEBIAN"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
systemctl enable zwaybot
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
if [[ $(systemctl is-active zwaybot || true) == "active" ]]
|
if [[ $(systemctl is-active zwaybot || true) == "active" ]]
|
||||||
then
|
then
|
||||||
|
@ -11,6 +11,7 @@ WorkingDirectory=/usr/local/bin/zwaybot
|
|||||||
# ExecStartPre=/bin/rm /var/log/zwaybot.log && /bin/touch /var/log/zwaybot.log && /bin/chown zwaybot:zwaybot /var/log/zwaybot.log && /bin/chmod 644 /var/log/zwaybot.log
|
# ExecStartPre=/bin/rm /var/log/zwaybot.log && /bin/touch /var/log/zwaybot.log && /bin/chown zwaybot:zwaybot /var/log/zwaybot.log && /bin/chmod 644 /var/log/zwaybot.log
|
||||||
ExecStart=/usr/bin/mono /usr/local/bin/zwaybot/Zway-Bot.exe
|
ExecStart=/usr/bin/mono /usr/local/bin/zwaybot/Zway-Bot.exe
|
||||||
KillMode=control-group
|
KillMode=control-group
|
||||||
|
TimeoutStopSec=5
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
StandardOutput=null
|
StandardOutput=null
|
||||||
StandardError=syslog
|
StandardError=syslog
|
||||||
|
Loading…
Reference in New Issue
Block a user