No transfer to domoticz [Solved]
Moderators: grovkillen, Stuntteam, TD-er
No transfer to domoticz [Solved]
Hello,
I was very careless not to secure Domoticz with a password.
Now I have secured Domoticz with a username and password and also used this data at the EspEasy Controller page and then did a reboot at the ESP.
But now no data is going to Domoticz.
What am I doing wrong?
I was very careless not to secure Domoticz with a password.
Now I have secured Domoticz with a username and password and also used this data at the EspEasy Controller page and then did a reboot at the ESP.
But now no data is going to Domoticz.
What am I doing wrong?
Last edited by ManS-H on 28 Aug 2022, 11:51, edited 1 time in total.
Re: No transfer to domoticz
A few possibilities:
- Password is very long (> 32 characters)? -> Enable 'Use Extended Credentials' and re-enter the password
- Made a typo in the Controller Password? -> re-enter the password
- Made a typo in the Controller User? -> re-enter the username
- Are you using the http port for Domoticz? By default it enables https (SSL/TLS), and you have to enable http access, f.e. on port 8080, as ESPEasy doesn't (yet) support https
- Password is very long (> 32 characters)? -> Enable 'Use Extended Credentials' and re-enter the password
- Made a typo in the Controller Password? -> re-enter the password
- Made a typo in the Controller User? -> re-enter the username
- Are you using the http port for Domoticz? By default it enables https (SSL/TLS), and you have to enable http access, f.e. on port 8080, as ESPEasy doesn't (yet) support https
/Ton (PayPal.me)
Re: No transfer to domoticz
The username and password i copies from a file to Domoticz and EspEasy they are the same, but i use the character "-" in the username. Can that be the problem?Ath wrote: ↑26 Aug 2022, 13:15 A few possibilities:
- Password is very long (> 32 characters)? -> Enable 'Use Extended Credentials' and re-enter the password
- Made a typo in the Controller Password? -> re-enter the password
- Made a typo in the Controller User? -> re-enter the username
- Are you using the http port for Domoticz? By default it enables https (SSL/TLS), and you have to enable http access, f.e. on port 8080, as ESPEasy doesn't (yet) support https
Re: No transfer to domoticz
What Domoticz controller are you using, HTTP or MQTT?
Edit: Checked the source, but the username is used without any parsing, so it really shouldn't matter.
It should not matter, but if you can change it, it won't hurt either. If it does make a difference, then we might need to fix this on ESPEasy.
Edit: Checked the source, but the username is used without any parsing, so it really shouldn't matter.
/Ton (PayPal.me)
Re: No transfer to domoticz
Which build are you using?
Since the last build, there is an issue with sending to HTTP, on which I'm working hard to fix.
The build from June should not have this issue.
Since the last build, there is an issue with sending to HTTP, on which I'm working hard to fix.
The build from June should not have this issue.
Re: No transfer to domoticz
I use a no secure port: 192.168.xxx.xx:8080ManS-H wrote: ↑26 Aug 2022, 13:25The username and password i copies from a file to Domoticz and EspEasy they are the same, but i use the character "-" in the username. Can that be the problem?Ath wrote: ↑26 Aug 2022, 13:15 A few possibilities:
- Password is very long (> 32 characters)? -> Enable 'Use Extended Credentials' and re-enter the password
- Made a typo in the Controller Password? -> re-enter the password
- Made a typo in the Controller User? -> re-enter the username
- Are you using the http port for Domoticz? By default it enables https (SSL/TLS), and you have to enable http access, f.e. on port 8080, as ESPEasy doesn't (yet) support https
I checked all thing several times, even when i change Username and Password in a "A", without quotes it doesn't work. Leaving user and password in Domoticz and EspEasy empty i have no troubles at all. Where must search it? Domoticz of EspEasy?
Re: No transfer to domoticz
I used this build: ESP_Easy_mega_20210223_normal_ESP8266_4M1M
I use various builds side by side under the motto "If it works well, don't change a thing".
But I it 15 units with EspEasy, which build do you recommend me to use for all the same, is then Release mega-20220616 the right choice?
Re: No transfer to domoticz
What Domoticz version are you running? The latest (& greatest)?
And you haven't disclosed what type of controller you use, HTTP or MQTT?
And you haven't disclosed what type of controller you use, HTTP or MQTT?
/Ton (PayPal.me)
Re: No transfer to domoticz
Just to be sure I tested on Domoticz 2022.1 (latest GA release, AFAIK) using both the Domoticz MQTT and HTTP controllers (latest mega code) and both controllers work as expected with my username/password configured Domoticz, at least when sending a switch state, so that gives me confidence to say that "It Works" as intended.
/Ton (PayPal.me)
Re: No transfer to domoticz
The latest and i use http
I see something strange, have updated 2 units to HEAD_56d3225, 20116 - Mega The data is refreshed with user and password in EspEasy and Domoticz. Only the values of the CO2 are not taken into account, they are in the same housing. I used this rule for it:
on CO2#PPM do
SendToHTTP,192.168.xxx.xx,8080,/json.htm?param=udevice&type=command&idx=4706&nvalue=[CO2#PPM]
endon
Re: No transfer to domoticz
There used to be some issue with CO2, at least when using a device in Domoticz defined as CO2 sensor.
The CO2 plugin in ESPEasy does send it as nvalue and it should be svalue (or vise verse)
That's the reason I've been using the CO2 sensors as "custom" in Domoticz.
But that's an issue for when sending it via the Domoticz controllers.
When sending it via rules, you must add credentials, which is only added very recently and which is also what is somewhat breaking the sendtohttp on the last build.
Can you try this build from GitHub Actions: https://github.com/letscontrolit/ESPEas ... 2925704851
You need to be logged in on GitHub to download it.
The Zip file is "Binaries" right below the Artifacts label.
The CO2 plugin in ESPEasy does send it as nvalue and it should be svalue (or vise verse)
That's the reason I've been using the CO2 sensors as "custom" in Domoticz.
But that's an issue for when sending it via the Domoticz controllers.
When sending it via rules, you must add credentials, which is only added very recently and which is also what is somewhat breaking the sendtohttp on the last build.
Can you try this build from GitHub Actions: https://github.com/letscontrolit/ESPEas ... 2925704851
You need to be logged in on GitHub to download it.
The Zip file is "Binaries" right below the Artifacts label.
Re: No transfer to domoticz
I know that the custom CO2 sensor works well with Domoticz but I miss that the text whether the air quality is good, bad or average.TD-er wrote: ↑26 Aug 2022, 22:11 There used to be some issue with CO2, at least when using a device in Domoticz defined as CO2 sensor.
The CO2 plugin in ESPEasy does send it as nvalue and it should be svalue (or vise verse)
That's the reason I've been using the CO2 sensors as "custom" in Domoticz.
But that's an issue for when sending it via the Domoticz controllers.
When sending it via rules, you must add credentials, which is only added very recently and which is also what is somewhat breaking the sendtohttp on the last build.
Can you try this build from GitHub Actions: https://github.com/letscontrolit/ESPEas ... 2925704851
You need to be logged in on GitHub to download it.
The Zip file is "Binaries" right below the Artifacts label.
I have installed ESP_Easy_mega_20220825_collection_C_ESP8266_4M1M but now maybe a stupid question? How do I put the username and password in a rule format.
I can't find any info on this. I read the discussion with ThomasB on the same question, but then my knowledge falls short.
Re: No transfer to domoticz
I send some special commands to Domoticz using this type of command:
Code: Select all
SendToHTTP,192.168.1.xxx,8080,/json.htm?username= cGk= &password= UGFzc3dvcmQ= &type=command¶m=switchscene&idx=4&switchcmd=On

I put some spaces around them, to show what is exactly put there, but you will need to remove the spaces to have it work correctly!
The param, idx and other arguments depend on the device you need to control, and should be extracted from Domoticz documentation.
/Ton (PayPal.me)
Re: No transfer to domoticz
Why not use the username:password@hostname syntax?
Re: No transfer to domoticz
That feature is only introduced very recent, and the unit that is running that script is already in use for a few years

/Ton (PayPal.me)
Re: No transfer to domoticz
Yep but it is working (or at least supposed to work) in the build I linked.
Re: No transfer to domoticz
Or I'm doing something wrong, but it's not working. Even with only user and password I get an error messageAth wrote: ↑27 Aug 2022, 12:07I send some special commands to Domoticz using this type of command:The username (pi) and password (Password) arguments need to be Base64 encoded, with padding (Notepad++ plugin Mime tools will do that nicely for you) (don't worry, those are not my real username/passwordCode: Select all
SendToHTTP,192.168.1.xxx,8080,/json.htm?username= cGk= &password= UGFzc3dvcmQ= &type=command¶m=switchscene&idx=4&switchcmd=On
)
I put some spaces around them, to show what is exactly put there, but you will need to remove the spaces to have it work correctly!
The param, idx and other arguments depend on the device you need to control, and should be extracted from Domoticz documentation.
I use this for converting user and password, https://codebeautify.org/base64-decode
21720738: ACT : SendToHTTP,192.168.xxx.xx,8080,/json.htm?username=xxxxxx=&password=xxxxxx
21720759: HTTP : SendToHTTP 192.168.xxx.xx GET... failed HTTP code: 401
What I would like is this:
SendToHTTP,192.168.xxx.xx,8080,/json.htm?username=xxxxx=&password=xxxx and this:
SendToHTTP,192.168.178.53,8080,/json.htm?param=udevice&type=command&idx=4578&nvalue=[CO2#PPM]
in one rule
Re: No transfer to domoticz
You have to include the authentication and the command in the same request, it doesn't 'stick' after the first one. My example is working like that.
/Ton (PayPal.me)
Re: No transfer to domoticz
Ik haak af. Even with your line and my ip and user,& password is get this: HTTP : SendToHTTP 192.168.xxx.xx GET... failed HTTP code: 401
Re: No transfer to domoticz
Have you tried to download the build that TD-er linked? That should have the 401 errors fixed.TD-er wrote: ↑26 Aug 2022, 22:11 When sending it via rules, you must add credentials, which is only added very recently and which is also what is somewhat breaking the sendtohttp on the last build.
Can you try this build from GitHub Actions: https://github.com/letscontrolit/ESPEas ... 2925704851
/Ton (PayPal.me)
Re: No transfer to domoticz
I wrote that before: I have installed ESP_Easy_mega_20220825_collection_C_ESP8266_4M1M but now maybe a stupid question? How do I put the username and password in a rule format.Ath wrote: ↑27 Aug 2022, 19:54Have you tried to download the build that TD-er linked? That should have the 401 errors fixed.TD-er wrote: ↑26 Aug 2022, 22:11 When sending it via rules, you must add credentials, which is only added very recently and which is also what is somewhat breaking the sendtohttp on the last build.
Can you try this build from GitHub Actions: https://github.com/letscontrolit/ESPEas ... 2925704851
This is the one i worked with: Build: ESP_Easy_mega_20220825_collection_C_ESP8266_4M1M Aug 25 2022
And still i have GET... failed HTTP code: 401
Re: No transfer to domoticz
sendtohttp,username:password@ip,80,.... (or whatever port you need)
Or (this is also new)
sendtohttp,http://username:password@ip/....
Or if you need to specify the port like 8080:
sendtohttp,http://username:password@ip:8080/....
With of course username and password replaced with whatever you've got
IP to be replaced by either IP or DNS hostname.
N.B. make sure you don't have characters like these in your password:
Or (this is also new)
sendtohttp,http://username:password@ip/....
Or if you need to specify the port like 8080:
sendtohttp,http://username:password@ip:8080/....
With of course username and password replaced with whatever you've got
IP to be replaced by either IP or DNS hostname.
N.B. make sure you don't have characters like these in your password:
Code: Select all
: " ,
Re: No transfer to domoticz [Solved]
The problem is solved, everything is working properly again.TD-er wrote: ↑27 Aug 2022, 20:08 sendtohttp,username:password@ip,80,.... (or whatever port you need)
Or (this is also new)
sendtohttp,http://username:password@ip/....
Or if you need to specify the port like 8080:
sendtohttp,http://username:password@ip:8080/....
With of course username and password replaced with whatever you've got
IP to be replaced by either IP or DNS hostname.
N.B. make sure you don't have characters like these in your password:
Code: Select all
: " ,
Gijs and Ton thanks for the help and patience.
Re: No transfer to domoticz [Solved]
Great!
And just at the moment I was thinking about actually fixing the CO2-type to Domoticz controllers which is an outstanding issue for the last years...
This is a perfect excuse to procrastinate
And just at the moment I was thinking about actually fixing the CO2-type to Domoticz controllers which is an outstanding issue for the last years...
This is a perfect excuse to procrastinate

Who is online
Users browsing this forum: No registered users and 18 guests