Open markus2330 opened 1 year ago
For some reason, the new states aren't updated. Maybe something is wrong with the async fn send_status(&self)
function. I get the right status if I check them with the command \status
. Maybe there is something wrong with the payload. @horenso do you have any idea?
Now it's working for me. But I don't know what I have changed, I just added an eprintln
for debugging.
Okay now I tested it with Env and Garage. It worked and I also have an implementation for the Battery status. I think the problem was, that a switch from Closed to Open or from Open to Closed needs to be executed to change the state. Or an update from Environment.
Is this fixed in #112?
I used the .deb
file from PR #112 and it updates the status for Env, Bat and Garage.
I found in the log would might be the problem here:
Okt 19 11:27:48 garage opensesame[13645]: Error: reqwest::Error { kind: Status(503), url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("nextcloud.markus-raab.org")), port: None, path: "/nextcloud/ocs/v2.php/apps/spreed/>
Okt 19 11:27:48 garage opensesame[13645]: Error: reqwest::Error { kind: Status(503), url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("nextcloud.markus-raab.org")), port: None, path: "/nextcloud/ocs/v2.php/apps/spreed/>
Okt 19 11:27:48 garage opensesame[13645]: Error: reqwest::Error { kind: Status(503), url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("nextcloud.markus-raab.org")), port: None, path: "/nextcloud/ocs/v2.php/apps/spreed/>
Okt 19 11:27:49 garage opensesame[13645]: Error: reqwest::Error { kind: Status(503), url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("nextcloud.markus-raab.org")), port: None, path: "/nextcloud/ocs/v2.php/apps/spreed/>
Okt 19 11:27:49 garage opensesame[13645]: Error: reqwest::Error { kind: Status(503), url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("nextcloud.markus-raab.org")), port: None, path: "/nextcloud/ocs/v2.php/apps/spreed/>
Config is nextcloud.url = "https://nextcloud.markus-raab.org/nextcloud
which works for sending/receiving messages?
This is my config of nextcloud and the status update works for me.
nextcloud.user = "<user>"
nextcloud.pass = "<password>"
nextcloud.url = "https://nextcloud.markus-raab.org/nextcloud"
nextcloud.format.datetime = "%d.%m.%Y %H:%M:%S"
nextcloud.format.time = "%H:%M:%S"
I tested it again with the new .deb
from master and it still works for me.
As I see the log is created by sending messages because the path nextcloud/ocs/v2.php/apps/spreed/api/v1/chat/
is used to send messages, and the path nextcloud/ocs/v2.php/apps/user_status/api/v1/user_status/message/custom
is for updating the status
Ok, thx, then these messages are unrelated.
should be battery and open/close etc. but does not seem to be updated properly