Compare commits

..

10 commits

Author SHA1 Message Date
Sander Hautvast
fef4f7a4ae
Update README.md 2025-10-08 20:11:16 +02:00
Sander Hautvast
7b89d7f5ca
Update README.md 2025-10-08 20:07:11 +02:00
Sander Hautvast
5a28065bba
Update README.md 2025-10-08 20:05:10 +02:00
Sander Hautvast
9530885dc4
Update README.md 2025-10-08 20:04:32 +02:00
Sander Hautvast
c78772a532
Update README.md 2025-10-08 20:03:08 +02:00
Sander Hautvast
ccd2fe1689
Update README.md 2025-10-08 20:01:59 +02:00
Sander Hautvast
ec9e10c260
Create README.md 2025-10-08 19:58:55 +02:00
Shautvast
83951140e6 call back again 2025-10-08 17:04:08 +02:00
Shautvast
e0a5eb7f7f meh 2025-10-08 16:39:59 +02:00
Shautvast
e5675cd2db foutje 2025-10-08 16:26:08 +02:00
2 changed files with 20 additions and 3 deletions

18
README.md Normal file
View 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.

View file

@ -35,7 +35,7 @@ struct AppState {
} }
#[tokio::main] #[tokio::main]
async fn main() -> anyhow::Result<()> { async fn main() -> axum::response::Result<()> {
dotenv().ok(); dotenv().ok();
let bind_addr = env::var("BIND_ADDR").expect("BIND_ADDR"); let bind_addr = env::var("BIND_ADDR").expect("BIND_ADDR");
@ -59,12 +59,11 @@ async fn main() -> anyhow::Result<()> {
"/static", "/static",
ServiceBuilder::new().service(ServeDir::new("static")), ServiceBuilder::new().service(ServeDir::new("static")),
); );
// .layer(LiveReloadLayer::new());
let listener = tokio::net::TcpListener::bind(bind_addr).await.unwrap(); let listener = tokio::net::TcpListener::bind(bind_addr).await.unwrap();
println!("server on {}", listener.local_addr().unwrap()); println!("server on {}", listener.local_addr().unwrap());
report("started").await?;
axum::serve(listener, app).await.unwrap(); axum::serve(listener, app).await.unwrap();
report("started");
Ok(()) Ok(())
} }