Dummy device > Domoticz

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
frankvk63
New user
Posts: 7
Joined: 13 Oct 2020, 17:28

Dummy device > Domoticz

#1 Post by frankvk63 » 13 Oct 2020, 17:43

Hi All,

Being new to EspEasy, I have a simple question:

I'm using an ESP8266 (nodemcu) with EspEasy release 120, I got the ESP8266 flahed and connected to my router.
Entered the IP address of my Domoticz server and the port.

I added a simple temperature sensor (DS18b20) and a dummy device (connected to GPIO5).
I can see the temperature sensor is working on the devices page.

I created a virtual sensor (idx = 866) and a virtual swith (idx=867).
For some reason, Domoticz (which is working fine) does not see the data coming from the ESP8266.

Does the ESP8266 send data to the domoticz server automatically?
Any troubleshooting suggestions?
Attachments
2020-10-13 17_42_39-ESP8266-63.png
2020-10-13 17_42_39-ESP8266-63.png (31.11 KiB) Viewed 11389 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Dummy device > Domoticz

#2 Post by TD-er » 13 Oct 2020, 18:23

frankvk63 wrote: 13 Oct 2020, 17:43 [...]
Any troubleshooting suggestions?
Please use a build, which is roughly 3 years newer...
The newest builds can be found here: https://github.com/letscontrolit/ESPEasy/releases

But for now, as the last (2) builds have some issue with WiFi, please use this test build which has a fix for the WiFi issues:
- ESP8266/ESP8285 build: https://www.dropbox.com/s/ss2p4dtadmrzc ... 3.zip?dl=0
- ESP32 build: https://www.dropbox.com/s/8ao6l1p92xsko ... 3.zip?dl=0

Also can you link where the R120 build is linked?
Maybe we can add a link there to the latest builds.

frankvk63
New user
Posts: 7
Joined: 13 Oct 2020, 17:28

Re: Dummy device > Domoticz

#3 Post by frankvk63 » 14 Oct 2020, 17:18

TD-er wrote: 13 Oct 2020, 18:23 ...
Thanks for your reply TD-er!. I used version [20111 - Mega] and (again) the ESP8266 is doing it's job: the temperature is reading fine.
For some reason the Domoticz server is still not recording the temperature in the virtual sensor.
I included the JSON output, which (I think) is looking OK.

When I open a webbrowser and enter

Code: Select all

http://xxx.xxx.xxx.xxx:8080/json.htm?type=command&param=udevice&idx=866&nvalue=0&svalue=21.2

it works fine! The virtual sensor is being updated to read 21.1 C

Why doesn't the JSON output of the ESP8266 resemble the json command above? Or does it? :?

frankvk63
New user
Posts: 7
Joined: 13 Oct 2020, 17:28

Re: Dummy device > Domoticz

#4 Post by frankvk63 » 14 Oct 2020, 17:23

frankvk63 wrote: 14 Oct 2020, 17:18 I included the JSON output, which (I think) is looking OK.

Code: Select all


{"System":{
"Build":20111,
"Git Build":"",
"System Libraries":"ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support",
"Plugin Count":46,
"Plugin Description":"[Normal]",
"Local Time":"1970-01-01 06:31:27",
"Unit Number":63,
"Unit Name":"ESP_Easy",
"Uptime":391,
"Last Boot Cause":"Manual reboot",
"Reset Reason":"Software/System restart",
"Load":6.91,
"Load LC":2436,
"CPU Eco Mode":"false",
"Heap Max Free Block":17072,
"Heap Fragmentation":9,
"Free RAM":18696
},
"WiFi":{
"Hostname":"ESP-Easy-63",
"IP Config":"DHCP",
"IP Address":"xxx.xxx.xxx.xxx",
"IP Subnet":"255.255.255.0",
"Gateway":"xxx.xxx.xxx.xxx",
"STA MAC":"98:F4:AB:B2:5B:52",
"DNS 1":"xxx.xxx.xxx.xxx",
"DNS 2":"(IP unset)",
"SSID":"xxxxxxxxx",
"BSSID":"xx:xx:xx:xx:xx:xx",
"Channel":11,
"Connected msec":23279000,
"Last Disconnect Reason":8,
"Last Disconnect Reason str":"(8) Assoc leave",
"Number Reconnects":1,
"Force WiFi B/G":"false",
"Restart WiFi Lost Conn":"false",
"Force WiFi No Sleep":"false",
"Periodical send Gratuitous ARP":"false",
"Connection Failure Threshold":0,
"RSSI":-49
},
"Sensors":[
{
"TaskValues": [
{"ValueNumber":1,
"Name":"Testing123",
"NrDecimals":2,
"Value":23.50
}],
"DataAcquisition": [
{"Controller":1,
"IDX":866,
"Enabled":"true"
},
{"Controller":2,
"IDX":0,
"Enabled":"false"
},
{"Controller":3,
"IDX":0,
"Enabled":"false"
}],
"TaskInterval":10,
"Type":"Environment - DS18b20",
"TaskName":"Testing123",
"TaskDeviceNumber":4,
"TaskEnabled":"true",
"TaskNumber":2
}
],
"TTL":10000
}

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Dummy device > Domoticz

#5 Post by Ath » 14 Oct 2020, 19:03

What Controller configuration have you setup on your ESP device, making the connection to Domoticz?
/Ton (PayPal.me)

frankvk63
New user
Posts: 7
Joined: 13 Oct 2020, 17:28

Re: Dummy device > Domoticz

#6 Post by frankvk63 » 14 Oct 2020, 19:16

Ath wrote: 14 Oct 2020, 19:03 What Controller configuration have you setup on your ESP device, making the connection to Domoticz?
Domoticz HTTP
PORT: 8080

How can I check what string the ESP8266 is actually sending to the Domoticz server?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Dummy device > Domoticz

#7 Post by TD-er » 14 Oct 2020, 20:02

frankvk63 wrote: 14 Oct 2020, 19:16
Ath wrote: 14 Oct 2020, 19:03 What Controller configuration have you setup on your ESP device, making the connection to Domoticz?
Domoticz HTTP
PORT: 8080

How can I check what string the ESP8266 is actually sending to the Domoticz server?
It should also be mentioned in the log.
It should at least be log level Info, but maybe for a bit more detailed info you may need to increase it to level debug.

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Dummy device > Domoticz

#8 Post by Ath » 14 Oct 2020, 20:08

Have you set up the/a username/password for the ESPEasy controller correctly? (from Domoticz: Settings/System/'Website Security' or smth. similar)
/Ton (PayPal.me)

frankvk63
New user
Posts: 7
Joined: 13 Oct 2020, 17:28

Re: Dummy device > Domoticz

#9 Post by frankvk63 » 15 Oct 2020, 10:35

Ath wrote: 14 Oct 2020, 20:08 Have you set up the/a username/password for the ESPEasy controller correctly? (from Domoticz: Settings/System/'Website Security' or smth. similar)
No credentials needed (password currently not set)
TD-er wrote: 14 Oct 2020, 20:02 It should also be mentioned in the log.
It should at least be log level Info, but maybe for a bit more detailed info you may need to increase it to level debug.
If I send a command by openening a webserver, I do see an entry in the Domoticz logfile.
I do NOT see any log entries coming from the ESP.

Issueing a command on the ESP8266

Code: Select all

sendtohttp,xxx.xxx.xxx.xxx,8080,/json.htm?type=command&param=udevice&idx=866&nvalue=0&svalue=19.3
I get the response "Ok", but nothing seems to happen. No log entry on Domoticz.

I think that leaves two possibilities:

1) Nothing is being sent from the ESP8266
How can I check what string/pakage the ESP8266 is actually sending to the Domoticz server?

2) The ESP8266 is sending data, but it does NOT reach the Domoticz server somehow
Network/firewall issue?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Dummy device > Domoticz

#10 Post by TD-er » 15 Oct 2020, 12:43

About the log on ESPEasy. Make sure you have the log level set to at least INFO for the kind of log output you try to view. (web/serial/syslog)

In Tools => Advanced make sure to check:
"SendToHTTP wait for ack"

And just to be sure, press the submit button at the bottom of the page (Just to make sure, a little while ago I noticed someone not submitting as that's also not needed in Android like apps...)

frankvk63
New user
Posts: 7
Joined: 13 Oct 2020, 17:28

Re: Dummy device > Domoticz

#11 Post by frankvk63 » 15 Oct 2020, 13:58

TD-er wrote: 15 Oct 2020, 12:43 About the log on ESPEasy. Make sure you have the log level set to at least INFO for the kind of log output you try to view. (web/serial/syslog)

In Tools => Advanced make sure to check:
"SendToHTTP wait for ack"

And just to be sure, press the submit button at the bottom of the page (Just to make sure, a little while ago I noticed someone not submitting as that's also not needed in Android like apps...)
Ah! Now we're getting somewhere!

Code: Select all

13:52:59.784 -> 484080 : Info  : WD   : Uptime 8 ConnectFailures 0 FreeMem 21672 WiFiStatus WL_CONNECTED ESPeasy internal wifi status: Conn. IP Init
13:53:04.289 -> 488587 : Info  : DS   : Temperature: 20.50 (28-e4-1-77-91-17-2-b5)
13:53:04.289 -> 488591 : Info  :  Domoticz: Sensortype: 1 idx: 866 values: 20.50
13:53:05.555 -> 489871 : Info  :  Webserver args: 0: 'cmd' length: 96
13:53:05.590 -> 489893 : Error : HTTP : Command_HTTP_SendToHTTP Error: HTTP/1.1 401 Unauthorized
13:53:06.610 -> 490896 : Error : Timeout while reading input data!
I found the following information on Domoticz wiki
2020-10-15 14_03_58-Domoticz API_JSON URL's - Domoticz.png
2020-10-15 14_03_58-Domoticz API_JSON URL's - Domoticz.png (63.41 KiB) Viewed 11307 times
Got it now! Thanks TD-er for pointing me in the right direction!
Last edited by frankvk63 on 15 Oct 2020, 14:30, edited 1 time in total.

frankvk63
New user
Posts: 7
Joined: 13 Oct 2020, 17:28

Re: Dummy device > Domoticz

#12 Post by frankvk63 » 15 Oct 2020, 14:29

Ath wrote: 14 Oct 2020, 20:08 Have you set up the/a username/password for the ESPEasy controller correctly? (from Domoticz: Settings/System/'Website Security' or smth. similar)
Hi Ton,

You were right after all!!!
I forgot all about the username & password because I didn't have to include them when issuing the command from a webbrowser.
Of course the webbrowser added the authentication automatically!

The ESP8266 is updating the Domotics server now. Thanks again

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests