jimmycleuren / loxone-weather-service

This project emulates the loxone weather service
10 stars 2 forks source link

Multiple questions #325

Open Rubeast opened 1 year ago

Rubeast commented 1 year ago

Does this still work? I see that it hasn't been updated in a while.

Is it ok to use this docker image? https://registry.hub.docker.com/r/jimmycleuren/loxone-weather-service/ I have added a variable WEATHERBIT_KEY and I saw that the container uses port 9000. I guess this port needs to be mapped with port 80?

I'm running it on my Synology and can't use port 80. I'm guessing, for it to work, that it needs to be running on port 80?

Is there a way to check if it is working without having to deal with loxone. Can I point my browser to a specific URL? If everything is correctly configured, I should get a certain response from http://weather.loxone.com/ ?

jimmycleuren commented 1 year ago

Yes, it still works, but it might not be really user friendly (yet).

You can use that docker image indeed and add your weatherbit key. The application container runs on port 9000 but you have to put a webserver in front of it. In the docker-compose.yml file you can see an example using nginx. That webserver has to run on port 6066 since that's the port the loxone weather service runs on, and your miniserver will connect to.

The check if it's working, you can browse to the following url for example:

http://weather.loxone.com:6066/forecast/?user=loxone_&coord=,&asl=42&format=1&new_api=1

Replace miniserver serial, lat and long with your specific parameters.

The first time you will request this, the output will be empty, but the app has saved your username and corresponding latitude and longitude. It will fetch the weather for your location in the background after a while (or when you force it), and when you call the url again, you will get the data in loxone format.

Rubeast commented 1 year ago

Ok, sorry I guess I have to move to something else. This is too complicated. Lol. Noob question. But how do you put a webserver in front of it? I have a Synology where I can run docker. It also serves as my reverse proxy. I also have a unifi router and a pihole. So I guess I have all the hardware needed, but I think I need a bit more info to get started.

jimmycleuren commented 1 year ago

You can just use the compose file in the examples directory, it includes nginx as a webserver. Not sure you can have your synology listen on port 6066 though.

https://github.com/jimmycleuren/loxone-weather-service/blob/master/examples/compose/docker-compose.yml