Sending powerreading to ESP

Everything about esp8266 and more.
Post Reply
jandoedel99
Posts: 12
Joined: Tuesday 18 April 2017 21:55
Target OS: -
Domoticz version:
Contact:

Sending powerreading to ESP

Post by jandoedel99 » Tuesday 26 December 2017 1:54

I want the power reading in my raspberry sent to a ESP8266 with a display2004 to display my powerconsumption.
Is this possible ?

rhendriks
Posts: 185
Joined: Tuesday 24 December 2013 0:36
Target OS: Raspberry Pi
Domoticz version: Newest
Location: Netherlands Helmond
Contact:

Re: Sending powerreading to ESP

Post by rhendriks » Tuesday 26 December 2017 14:27

I think this is possible , look at this:
https://www.letscontrolit.com/wiki/index.php/LCDDisplay

jandoedel99
Posts: 12
Joined: Tuesday 18 April 2017 21:55
Target OS: -
Domoticz version:
Contact:

Re: Sending powerreading to ESP

Post by jandoedel99 » Tuesday 26 December 2017 21:01

Thanks i have read that. But now how to do?

jandoedel99
Posts: 12
Joined: Tuesday 18 April 2017 21:55
Target OS: -
Domoticz version:
Contact:

Re: Sending powerreading to ESP

Post by jandoedel99 » Wednesday 27 December 2017 21:18

I have now:

Code: Select all

[--
commandArray = {}
 DomDevice = 'Power';
 IP = '192.168.0.53';
-- if devicechanged[DomDevice] then
   DomValue = otherdevices_svalues[DomDevice];
   print(DomValue)
 --  print(string.sub(DomValue, string.find(DomValue, ;)))   
-- end
 
 runcommand = "curl http://" .. IP .. "/control?cmd=LCD,1,1," ..DomValue.. " ";
 os.execute(runcommand);
 
return commandArray
/code]
This is working.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests