Page 1 of 1

struggling to add weather forecast / external access

Posted: Friday 18 August 2023 20:52
by henrybcn
Hi all,
I have been with domoticz for years (always happy!) and over the last 5 I am mainly using dashticz as it shows everything very clear! But since the limitation to weather forecast and the difficulties I have to access it from outside my network (I use a raspberry pi as server) I am about to start moving to Home Assistant tomorrow.
Is there anyone with a very simple basic CONFIG.JS showing how I can use OPENWEATHER? I have an acct for several years with them, but can not make it work. Seems I need to upgrade to beta, etc..... But I just want something very simple.
Same with accessing it externally. Seems I need a lot of different steps to make it happen....
BTW, is there a way to chat/IM here? Instead of posts?
Tks all!
Henry

Re: struggling to add weather forecast / external access

Posted: Saturday 19 August 2023 9:01
by kiddigital
Both issues should be easy to solve as many domoticz users are using weather forecasts and access their domoticz from outside.

Not sure if/how HA makes that easier… did it?

Search the wiki and forum for the info needed.

Re: struggling to add weather forecast / external access

Posted: Saturday 19 August 2023 14:43
by Lokonli
henrybcn wrote: ↑Friday 18 August 2023 20:52 Hi all,
I have been with domoticz for years (always happy!) and over the last 5 I am mainly using dashticz as it shows everything very clear! But since the limitation to weather forecast and the difficulties I have to access it from outside my network (I use a raspberry pi as server) I am about to start moving to Home Assistant tomorrow.
Is there anyone with a very simple basic CONFIG.JS showing how I can use OPENWEATHER? I have an acct for several years with them, but can not make it work. Seems I need to upgrade to beta, etc..... But I just want something very simple.
Same with accessing it externally. Seems I need a lot of different steps to make it happen....
BTW, is there a way to chat/IM here? Instead of posts?
Tks all!
Henry
If you have setup your OWM account some time ago, then the most straightforward method to show the weather forecast is as follows:

Code: Select all

blocks['myweather'] = {
    type:'weather',
    apikey: '6c4...7b9',
    city: 'amsterdam',
    country: 'nl',
}
var columns = {}

columns[1] = {}
columns[1]['blocks'] = [
    'myweather'
]

var screens = {}
screens[1] = {
    columns: [1]
}
This will give:
owm.jpg
owm.jpg (72.93 KiB) Viewed 514 times
If you have a OWM 3.0 account, add 'provider: "owm3"' to the block, like:

Code: Select all

blocks['myweather'] = {
    type:'weather',
    apikey: '6c4...7b9',
    city: 'amsterdam',
    country: 'nl',
    provider: 'owm3'
}
OWM also has a free account. This free account makes use of a slightly different OWM api. I'll add support for the free OWM account in the next few days.

For the external access: Let's start a new topic for that one. Domoticz now supports a new authentication method. That makes things safer when exposing Dashticz to the outside world.