Page 1 of 1

Get data sent by data-push (http) in domoticz

Posted: 07 Feb 2019, 11:42
by Mjollnir951
Hi!
I've done some research, but I didn't get a solution.

I have a few ESP with BME sensors attached, they send temperature info to domoticz.
In domoticz I have data-push option.
I want to display this values in other ESP which has 7 segment display attached.
Here is what I'm trying to get:

Image

Is this possible to do in espeasy?

Re: Get data sent by data-push (http) in domoticz

Posted: 07 Feb 2019, 12:14
by kimot
Yes, It is possible.
I am sending outdoor temperature to my heating control nodes for example.

For inspiration part of my Dzvents script, which I call every minute:

Code: Select all

--Outdoor      
		      
	       local outdoor = domoticz.devices('Outdoor')
	       -- Kacka
		    local urlHDO = 'http://192.168.1.102/control?cmd=event,Outdoor='..(outdoor.temperature)..'' 
		    print(urlHDO)
		    domoticz.openURL(urlHDO)
		-- Filip
		    local urlHDO = 'http://192.168.1.105/control?cmd=event,Outdoor='..(outdoor.temperature)..''
		    print(urlHDO)
		    domoticz.openURL(urlHDO)
		 --Kuchyne
		    local urlHDO = 'http://192.168.1.103/control?cmd=event,Outdoor='..(outdoor.temperature)..''
		    print(urlHDO)
		    domoticz.openURL(urlHDO)
		 -- Koupelna
		    local urlHDO = 'http://192.168.1.107/control?cmd=event,Outdoor='..(outdoor.temperature)..''
		    print(urlHDO)
		    domoticz.openURL(urlHDO)
	        -- WC
		    local urlHDO = 'http://192.168.1.109/control?cmd=event,Outdoor='..(outdoor.temperature)..'' 
		    print(urlHDO)
		    domoticz.openURL(urlHDO)
	        -- Koupelna_WC
		    local urlHDO = 'http://192.168.1.108/control?cmd=event,Outdoor='..(outdoor.temperature)..''
		    print(urlHDO)
		    domoticz.openURL(urlHDO)
		-- Loznice
		    local urlHDO = 'http://192.168.1.110/control?cmd=event,Outdoor='..(outdoor.temperature)..''
		    print(urlHDO)
		    domoticz.openURL(urlHDO)
		-- Hala
		    local urlHDO = 'http://192.168.1.106/control?cmd=event,Outdoor='..(outdoor.temperature)..''
		    print(urlHDO)
		    domoticz.openURL(urlHDO)
		-- Chodba
		    local urlHDO = 'http://192.168.1.111/control?cmd=event,Outdoor='..(outdoor.temperature)..''
		    print(urlHDO)
		    domoticz.openURL(urlHDO)


But you can call it when one from BME temperature changes.

I am not using TM1637 so you must study how to display received values on it.

Re: Get data sent by data-push (http) in domoticz

Posted: 07 Feb 2019, 12:30
by Mjollnir951
Hmm okay, but as far as I know Dzvents is for domoticz - this is not a problem.
I want to know how to receive this data sent by domoticz in wemos :)

Re: Get data sent by data-push (http) in domoticz

Posted: 07 Feb 2019, 23:09
by kimot
Rules....
example:

Code: Select all

on Outdoor do   
 TaskValueSet,5,1,%eventvalue%
endon 
2019-02-07-230546_1920x1080_scrot.png
2019-02-07-230546_1920x1080_scrot.png (126.23 KiB) Viewed 3995 times

Re: Get data sent by data-push (http) in domoticz

Posted: 21 Mar 2019, 14:17
by Mjollnir951
Thanks for the replies!
Finally I've created sketch in arduino IDE, cause I feel C better than rules.
It sends request to my domoticz, parse it and show on displays.
If anybody is interested I can paste it here :)