Compare commits
10 commits
d293fd60f2
...
fef4f7a4ae
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fef4f7a4ae | ||
|
|
7b89d7f5ca | ||
|
|
5a28065bba | ||
|
|
9530885dc4 | ||
|
|
c78772a532 | ||
|
|
ccd2fe1689 | ||
|
|
ec9e10c260 | ||
|
|
83951140e6 | ||
|
|
e0a5eb7f7f | ||
|
|
e5675cd2db |
2 changed files with 20 additions and 3 deletions
18
README.md
Normal file
18
README.md
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# solarmon
|
||||
* charts solaredge inverter data using its REST api like their app also does
|
||||
* sends alerts if around 12:00 no output is measured. Mine had died without a word last summer...
|
||||
* alerting on your phone using pushover
|
||||
* solaredge api has at least 15 mins resolution. Its response is cached to prevent overloading their server.
|
||||
|
||||
**start**
|
||||
* clone this repo
|
||||
* create .env file that contains
|
||||
* SOLAREDGE_API_KEY
|
||||
* SOLAREDGE_SITE_ID
|
||||
* PUSHOVER_USER_ID
|
||||
* PUSHOVER_API_KEY
|
||||
* BIND_ADDR eg. 0.0.0.0:3000
|
||||
* CALL_HOME url to include in the pushover notification
|
||||
* cargo run
|
||||
|
||||
After successful startup a informational message is sent to pushover.
|
||||
|
|
@ -35,7 +35,7 @@ struct AppState {
|
|||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
async fn main() -> axum::response::Result<()> {
|
||||
dotenv().ok();
|
||||
let bind_addr = env::var("BIND_ADDR").expect("BIND_ADDR");
|
||||
|
||||
|
|
@ -59,12 +59,11 @@ async fn main() -> anyhow::Result<()> {
|
|||
"/static",
|
||||
ServiceBuilder::new().service(ServeDir::new("static")),
|
||||
);
|
||||
// .layer(LiveReloadLayer::new());
|
||||
|
||||
let listener = tokio::net::TcpListener::bind(bind_addr).await.unwrap();
|
||||
println!("server on {}", listener.local_addr().unwrap());
|
||||
report("started").await?;
|
||||
axum::serve(listener, app).await.unwrap();
|
||||
report("started");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue