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

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
schwuppdiwupp
Posts: 13
Joined: Wednesday 25 March 2020 19:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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
schwuppdiwupp
Posts: 13
Joined: Wednesday 25 March 2020 19:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by schwuppdiwupp »

Any suggestions?
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

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

Post 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??
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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
}
schwuppdiwupp
Posts: 13
Joined: Wednesday 25 March 2020 19:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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)
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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.
schwuppdiwupp
Posts: 13
Joined: Wednesday 25 March 2020 19:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by schwuppdiwupp »

ok, will try that tomorrow.
Any suggestions for my news problem?
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

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

Post 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?
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
schwuppdiwupp
Posts: 13
Joined: Wednesday 25 March 2020 19:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

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

Post 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/';
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
schwuppdiwupp
Posts: 13
Joined: Wednesday 25 March 2020 19:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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)
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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.
schwuppdiwupp
Posts: 13
Joined: Wednesday 25 March 2020 19:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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.
Thorgal789
Posts: 815
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

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

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest