Page 1 of 1

Combine multiple sensors (Temp/Hum) | RSS news feed not working

Posted: Sunday 05 April 2020 13:12
by schwuppdiwupp
Hi!
I just started my Dashticz project and wanted to know if there is a possibility to combine sensor values to one item.
Domoticz is reporting my Aqara Sensors with 3 different idx i.e. 45 temp, 46 hum, 47 pressure
I found sensor_block: 1 as a parameter, but no explanation how it is supposed to be setup. Looking at the code, it is expecting some kind of idx_1, idx_2, idx_3
Any easy solution to this?

My 2nd problem: I want to show some news on the board.
I copied the example and tried some different things but I always end up with this error:
RSS feed SyntaxError: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL. Check rss url.
System is running on a Pi4 with raspbian
Dashticz 3.4.2 beta
Domoticz version 2020.1
dzVents version 3.0.1
Python version 3.7.3
PHP 7.4.4

Re: Combine multiple sensors (Temp/Hum) | RSS news feed not working

Posted: Tuesday 07 April 2020 12:06
by schwuppdiwupp
Any suggestions?

Re: Combine multiple sensors (Temp/Hum) | RSS news feed not working

Posted: Tuesday 07 April 2020 20:14
by clinkadink
For devices with multiple data, i.e. subdevices, I think you can add them like this:

Code: Select all

blocks[123_1] = {
	title: 'My Sub Device Title',
	flash: 500,
	width: 4
}
More here on blocks and subdevices ...
https://dashticz.readthedocs.io/en/beta ... parameters

For the RSS feed, what url are you trying to access? What happens when you paste the RSS url into a browser??

Re: Combine multiple sensors (Temp/Hum) | RSS news feed not working

Posted: Tuesday 07 April 2020 21:29
by Lokonli
Don't forget the quotes around '123_1', like this:

Code: Select all

blocks['123_1'] = {
If you use '123_1' as label, then only subdevice 1 will be shown on the dashboard.
With label '123' all subdevices of device 123 will be shown.

For some devices it's possible to combine the values of the subdevices into one block, by adding the 'single_block' parameter, like this:

Code: Select all

blocks['123'] = {
   single_block: true
}

Re: Combine multiple sensors (Temp/Hum) | RSS news feed not working

Posted: Tuesday 07 April 2020 21:31
by schwuppdiwupp
My problem is, I don't have subdevices. I got three different idx numbers(45,46,47) for the readings from one aqara sensor. (Deconz zigbee plugin)

Re: Combine multiple sensors (Temp/Hum) | RSS news feed not working

Posted: Tuesday 07 April 2020 21:34
by Lokonli
Combining three devices in Dashticz is not possible at the moment. Maybe something for the future :)

You can create a dummy device in Domoticz, and combine the data with some scripting.

Re: Combine multiple sensors (Temp/Hum) | RSS news feed not working

Posted: Tuesday 07 April 2020 21:36
by schwuppdiwupp
ok, will try that tomorrow.
Any suggestions for my news problem?

Re: Combine multiple sensors (Temp/Hum) | RSS news feed not working

Posted: Tuesday 07 April 2020 21:48
by clinkadink
schwuppdiwupp wrote: Tuesday 07 April 2020 21:36 ok, will try that tomorrow.
Any suggestions for my news problem?
Did you check the url in a browser, as mentioned in my reply?

Re: Combine multiple sensors (Temp/Hum) | RSS news feed not working

Posted: Tuesday 07 April 2020 21:52
by schwuppdiwupp
Sorry, seems like I didn't read that.
I tried the URL from the example and 3-4 other ones. None worked. All had the same error. The one I want to have is: www.n-tv.de/rss

Re: Combine multiple sensors (Temp/Hum) | RSS news feed not working

Posted: Tuesday 07 April 2020 21:58
by clinkadink
Works fine for me, both the url in a browser, and in Dashticz news. I see the news and photos.
Make sure these are set in your in config.js.

Code: Select all

config['default_news_url'] = 'https://www.n-tv.de/rss';
config['news_scroll_after'] = '10';
config['default_cors_url'] = 'https://cors-anywhere.herokuapp.com/';

Re: Combine multiple sensors (Temp/Hum) | RSS news feed not working

Posted: Tuesday 07 April 2020 22:06
by schwuppdiwupp
you're my hero!
It's the default_cors_url parameter that was set to 0 in my config. This should be updated in the wiki (https://dashticz.readthedocs.io/en/mast ... /news.html)

Re: Combine multiple sensors (Temp/Hum) | RSS news feed not working

Posted: Tuesday 07 April 2020 22:28
by Lokonli
schwuppdiwupp wrote: Tuesday 07 April 2020 22:06 you're my hero!
It's the default_cors_url parameter that was set to 0 in my config. This should be updated in the wiki (https://dashticz.readthedocs.io/en/mast ... /news.html)
The news block requires a CORS proxy to work.

With the default_cors_url parameter you can define which CORS proxy to use.

If you don't set this parameter the internal Dashticz CORS proxy will be used.
If you configured Dashticz by following the installation instructions the internal Dashticz CORS proxy will work. It will then be more reliable than the CORS proxy from herokuapp, because that one is offline quite often.

If you set the default_cors_url parameter to 0, then you've disabled the CORS proxy.

So my advice is:
Don't set the default_cors_url parameter, unless you really have to.

Re: Combine multiple sensors (Temp/Hum) | RSS news feed not working

Posted: Tuesday 07 April 2020 22:59
by schwuppdiwupp
Ahh, I see! I just copied the generated file from my settings to the config file as a start. Thx for clarification on this.

Re: Combine multiple sensors (Temp/Hum) | RSS news feed not working

Posted: Sunday 19 April 2020 14:15
by Thorgal789
Lokonli wrote: Tuesday 07 April 2020 21:34 Combining three devices in Dashticz is not possible at the moment. Maybe something for the future :)

You can create a dummy device in Domoticz, and combine the data with some scripting.
You have some scripts here for that https://github.com/Smanar/Domoticz-deCO ... ame-sensor