HTTPrequest from Automagic on Android

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
skom
Posts: 18
Joined: Sunday 15 March 2020 9:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Poland
Contact:

HTTPrequest from Automagic on Android

Post by skom »

Since Domoticz 2022.2 I had problems connecting to Domoticz with Dataplicity. Since version 2023.1 the problem has disappeared :), but not completely. I have flow in Automagic4Android on a mobile phone and send HTTPrequset post from it. Unfortunately, it does not reach Domoticz. I've read a lot about Auth-basic (I have it turned on in Domoticz) and Settings->Applications - unfortunately I don't know what and how to enter so that commands from the mobile phone are handled by Domoticz.
Below is the log from the execution of flow by Automagic:

Code: Select all

29.03.2023 12:31:15.903 [_Flow1] Starting to execute flow '_Flow1' with Context{global{global_volume_music=12,global_wyslane=0},local{flow_name=_Połączenie z siecią domową,trigger=Manual,triggertime=1680085855882}}
29.03.2023 12:31:15.904 [_Flow1] Start executing action 'HTTP Request: POST https://***-***-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response'
29.03.2023 12:31:15.906 [_Flow1] Action 'HTTP Request: POST https://***-***-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' url = https://***-***-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0
29.03.2023 12:31:15.907 [_Flow1] Action 'HTTP Request: POST https://***-***-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' formFieldList = Lastname=XYZ,Firstname=ABC
29.03.2023 12:31:15.908 [_Flow1] Action 'HTTP Request: POST https://***-***-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' variable = response
29.03.2023 12:31:15.908 [_Flow1] Action 'HTTP Request: POST https://***-***-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' encoding = 
29.03.2023 12:31:17.006 [_Flow1] Action 'HTTP Request: POST https://***-***-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' URL data fetched successfully.
29.03.2023 12:31:17.008 [_Flow1] End executing action 'HTTP Request: POST https://***-***-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response'
29.03.2023 12:31:17.024 [_Flow1] Flow ended.
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: HTTPrequest from Automagic on Android

Post by kiddigital »

Run Domoticz with additional debug flags enabled `—debuglevel webserver,received,auth` and Domoticz will produce extra debugging information showing what it receives and how it tries to handle it.

If you can post that info, we might find what is not working.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
skom
Posts: 18
Joined: Sunday 15 March 2020 9:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Poland
Contact:

Re: HTTPrequest from Automagic on Android

Post by skom »

I don't know either I'm doing something wrong or I don't know what? After running domoticz with the parameters "-debuglevel webserver,received,auth" (without quotes :)), the logs were displayed in the console, but there was nothing new about logins, and I was sending the command

Code: Select all

https://****-** *-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0
from chrome on this mobile phone (it works and domoticz responds) and from Automagic the same command via HTTPrequest POST (domoticz here does not respond) but there are no traces of these attempts in the logs :(.Log below:

Code: Select all

pi@domoticz:~/domoticz $ ./domoticz -debuglevel webserver,received,auth
2023-03-30 09:11:05.664  Status: Debug logging not active. Set loglevel DEBUG when using debug logging!
2023-03-30 09:11:05.664  Status: Domoticz V2023.1 (c)2012-2023 GizMoCuz
2023-03-30 09:11:05.664  Status: Build Hash: f9b9ac774, Date: 2023-02-14 15:06:40
2023-03-30 09:11:05.664  Status: Startup Path: /home/pi/domoticz/
2023-03-30 09:11:05.690  Sunrise: 06:07:00 SunSet: 18:59:00
2023-03-30 09:11:05.690  Day length: 12:51:00 Sun at south: 12:33:00
2023-03-30 09:11:05.690  Civil twilight start: 05:32:00 Civil twilight end: 19:34:00
2023-03-30 09:11:05.691  Nautical twilight start: 04:50:00 Nautical twilight end: 20:16:00
2023-03-30 09:11:05.691  Astronomical twilight start: 04:05:00 Astronomical twilight end: 21:01:00
2023-03-30 09:11:05.743  Status: PluginSystem: Started, Python version '3.7.3', 8 plugin definitions loaded.
2023-03-30 09:11:05.751  Active notification Subsystems: clickatell, kodi, pushbullet, pushover, telegram (5/13)
2023-03-30 09:11:05.757  Status: WebServer(HTTP) started on address: :: with port 8080
2023-03-30 09:11:05.764  Status: WebServer(SSL) startup failed on address :: with port: 443: bind: Permission denied [system:13], trying ::
2023-03-30 09:11:05.766  Status: WebServer(SSL) startup failed on address :: with port: 443: bind: Permission denied [system:13], trying 0.0.0.0
2023-03-30 09:11:05.767  Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 443: bind: Permission denied [system:13]
2023-03-30 09:11:05.767  Error: WebServer(SSL) check privileges for opening ports below 1024
2023-03-30 09:11:05.768  Status: Camera: settings (re)loaded
2023-03-30 09:11:05.769  Error: Exception starting shared server: bind: Address already in use [system:98]
2023-03-30 09:11:05.770  Status: RxQueue: queue worker started...
2023-03-30 09:11:07.772  Status: Kodi: Started
2023-03-30 09:11:07.772  Status: Pogoda Forecast.io: Started...
2023-03-30 09:11:07.773  PiMonitor: Worker thread started.
2023-03-30 09:11:07.773  Status: PiMonitor: Started.
2023-03-30 09:11:07.773  Status: PiMonitor: Entering work loop.
2023-03-30 09:11:07.774  Status: RPi GPIO: This hardware is deprecated. Please transfer to the new SysFS hardware type!
2023-03-30 09:11:07.774  Status: Inverter_Afore: Worker started...
2023-03-30 09:11:07.780  Status: MySensors: trying to connect to: 10.1.1.70:5003
2023-03-30 09:11:07.781  Status: NotificationSystem: thread started...
2023-03-30 09:11:07.781  Status: EventSystem: reset all events...
2023-03-30 09:11:07.788  Status: MySensors: connected to: 10.1.1.70:5003
2023-03-30 09:11:07.790  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Radio.lua
2023-03-30 09:11:07.790  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Nikt w domu - wylacz radio.lua
2023-03-30 09:11:07.791  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Ktos_w_domu.lua
2023-03-30 09:11:07.791  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Check_DB.lua
2023-03-30 09:11:07.792  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/solary.lua
2023-03-30 09:11:07.792  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/_Alarm_.lua
2023-03-30 09:11:07.793  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Transmission (torrenty).lua
2023-03-30 09:11:07.793  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Alcatel ostatnio widziany.lua
2023-03-30 09:11:07.794  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Wakacje-Swiatla dol wieczor.lua
2023-03-30 09:11:07.794  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Gaz-koszty.lua
2023-03-30 09:11:07.794  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/set_device_protection.lua
2023-03-30 09:11:07.796  MySensors: Gateway Ready...
2023-03-30 09:11:07.796  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Auto_ktos_w_domu.lua
2023-03-30 09:11:07.796  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Czujki alarmu.lua
2023-03-30 09:11:07.797  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Czujka telegram.lua
2023-03-30 09:11:07.797  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Wakacje - swiatlo gora wieczor.lua
2023-03-30 09:11:07.798  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Wakacje - swiatlo dol rano.lua
2023-03-30 09:11:07.798  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Ile czasu nie było temp Gabinet.lua
2023-03-30 09:11:07.799  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Alarm KM geo auto.lua
2023-03-30 09:11:07.799  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Poczta (przypomnienie blisko domu).lua
2023-03-30 09:11:07.799  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Auto ON_OFF tryb wakacje.lua
2023-03-30 09:11:07.800  Status: EventSystem: reset all device statuses...
2023-03-30 09:11:07.839  MySensors: Gateway Version: 2.3.2
2023-03-30 09:11:07.842  MySensors: Gateway Version: 2.3.2
2023-03-30 09:11:07.848  MySensors: Gateway Version: 2.3.2
2023-03-30 09:11:07.865  Status: PiMonitor: Initialized version 2.1.0, author 'Xorfor'
2023-03-30 09:11:07.873  Kodi: (TV) Starting thread.
2023-03-30 09:11:07.875  PiMonitor: Debug logging mask set to: NONE
2023-03-30 09:11:07.945  Status: Python EventSystem: Initializing event module.
2023-03-30 09:11:07.946  Status: EventSystem: Started
2023-03-30 09:11:07.946  Status: EventSystem: Queue thread started...
2023-03-30 09:11:07.973  Kodi: Starting I/O service thread.
2023-03-30 09:11:08.194  Status: PluginSystem: 1 plugins started.
2023-03-30 09:11:08.772  Status: MQTT: Connecting to 10.1.1.16:1883
2023-03-30 09:11:08.793  Inverter_Afore: Lighting 2 (Solary - Inverter)
2023-03-30 09:11:08.974  Status: MQTT: connected to: 10.1.1.16:1883
2023-03-30 09:11:18.492  Pogoda Forecast.io: Temp + Humidity + Baro (Zewnętrzna (www))
2023-03-30 09:11:18.498  Pogoda Forecast.io: Wind (Łapy Wiatr)
2023-03-30 09:11:18.501  Pogoda Forecast.io: UV (Łapy - UV Index)
2023-03-30 09:11:18.506  Pogoda Forecast.io: Rain (Łapy - Opady)
2023-03-30 09:11:18.508  Pogoda Forecast.io: General/Visibility (Łapy - Widoczność)
2023-03-30 09:11:18.510  Pogoda Forecast.io: General/Custom Sensor (Łapy Ozone Sensor)
2023-03-30 09:11:18.512  Pogoda Forecast.io: General/Percentage (Cloud Cover)
2023-03-30 09:11:18.787  Inverter_Afore: Lighting 2 (Solary - Inverter)
2023-03-30 09:11:28.792  Inverter_Afore: Lighting 2 (Solary - Inverter)
2023-03-30 09:11:37.780  RPi GPIO: Optional connected Master Domoticz now updates its status
2023-03-30 09:11:38.800  Inverter_Afore: Lighting 2 (Solary - Inverter)
2023-03-30 09:11:48.798  Inverter_Afore: Lighting 2 (Solary - Inverter)
2023-03-30 09:11:53.656  MySensors: General/Waterflow (Przepływ całej wody)
2023-03-30 09:11:53.886  MySensors: RFXMeter (Wodomierz Główny)
2023-03-30 09:11:58.812  Inverter_Afore: Lighting 2 (Solary - Inverter)
2023-03-30 09:12:00.535  Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2023-03-30 09:12:00.546  Status: EventSystem: Script event triggered: time_kodi
2023-03-30 09:12:00.551  Status: EventSystem: Script event triggered: time_TV_Samsung
2023-03-30 09:12:01.451  Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2023-03-30 09:12:08.812  Inverter_Afore: Lighting 2 (Solary - Inverter)
2023-03-30 09:12:18.813  Inverter_Afore: Lighting 2 (Solary - Inverter)
2023-03-30 09:12:28.824  Inverter_Afore: Lighting 2 (Solary - Inverter)
If I sent an HTTPrequest POST from Automagic to the local domoticz address, everything works (but also without a trace in the logs) 10 seconds later via dataplicity and it's a failure :( Log from Automagic:

Code: Select all

30.03.2023 09:11:36.162 [_Flow1] Starting to execute flow '_Flow1' with Context{global{global_volume_music=12,global_wyslane=0},local{flow_name=_Flow1,trigger=Manual,triggertime=1680162546160}}
30.03.2023 09:11:36.164 [_Flow1] Start executing action 'Sound: Chaos as Notification'
30.03.2023 09:11:36.168 [_Flow1] End executing action 'Sound: Chaos as Notification'
30.03.2023 09:11:36.168 [_Flow1] Start executing action 'HTTP Request: POST http://10.1.1.16/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response'
30.03.2023 09:11:36.169 [_Flow1] Start executing action 'Sleep: 10s (keep device awake)'
30.03.2023 09:11:36.170 [_Flow1] Action 'HTTP Request: POST http://10.1.1.16/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' url = http://10.1.1.16/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0
30.03.2023 09:11:36.170 [_Flow1] Action 'HTTP Request: POST http://10.1.1.16/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' formFieldList = Lastname=XYZ,Firstname=ABC
30.03.2023 09:11:36.170 [_Flow1] Action 'HTTP Request: POST http://10.1.1.16/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' variable = response
30.03.2023 09:11:36.170 [_Flow1] Action 'HTTP Request: POST http://10.1.1.16/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' encoding = 
30.03.2023 09:11:36.170 [_Flow1] Action 'Sleep: 10s (keep device awake)' Sleeping for 10s (keep device awake)
30.03.2023 09:11:36.205 [_Flow1] Action 'HTTP Request: POST http://10.1.1.16/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' URL data fetched successfully.
30.03.2023 09:11:36.206 [_Flow1] End executing action 'HTTP Request: POST http://10.1.1.16/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response'
30.03.2023 09:11:46.176 [_Flow1] End executing action 'Sleep: 10s (keep device awake)'
30.03.2023 09:11:46.189 [_Flow1] Flow continues executing with the next step.
30.03.2023 09:11:46.190 [_Flow1] Start executing action 'HTTP Request: POST https://flavorless-lynx-0940.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response'
30.03.2023 09:11:46.197 [_Flow1] Action 'HTTP Request: POST https://***-***-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' url = https://***-***-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0
30.03.2023 09:11:46.198 [_Flow1] Action 'HTTP Request: POST https://***-***-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' formFieldList = Lastname=XYZ,Firstname=ABC
30.03.2023 09:11:46.198 [_Flow1] Action 'HTTP Request: POST https://***-***-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' variable = response
30.03.2023 09:11:46.198 [_Flow1] Action 'HTTP Request: POST https://***-***-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' encoding = 
30.03.2023 09:11:48.660 [_Flow1] Action 'HTTP Request: POST https://***-***-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' URL data fetched successfully.
30.03.2023 09:11:48.663 [_Flow1] End executing action 'HTTP Request: POST https://***-***-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response'
30.03.2023 09:11:48.675 [_Flow1] Flow ended.
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

HTTPrequest from Automagic on Android

Post by kiddigital »

skom wrote:I don't know either I'm doing something wrong or I don't know what? After running domoticz with the parameters "-debuglevel webserver,received,auth" (without quotes :)), the logs were displayed in the console, but there was nothing new about logins, and I was sending the command

Code: Select all

https://****-** *-***.dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0
from chrome on this mobile phone (it works and domoticz responds) and from Automagic the same command via HTTPrequest POST (domoticz here does not respond) but there are no traces of these attempts in the logs :(.Log below:

Code: Select all

pi@domoticz:~/domoticz $ ./domoticz -debuglevel webserver,received,auth



2023-03-30 09:11:05.664  Status: Debug logging not active. Set loglevel DEBUG when using debug logging!



…
2023-03-30 09:11:05.764  Status: WebServer(SSL) startup failed on address :: with port: 443: bind: Permission denied [system:13], trying ::
2023-03-30 09:11:05.766  Status: WebServer(SSL) startup failed on address :: with port: 443: bind: Permission denied [system:13], trying 0.0.0.0
2023-03-30 09:11:05.767  Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 443: bind: Permission denied [system:13]
2023-03-30 09:11:05.767  Error: WebServer(SSL) check privileges for opening ports below 1024
2023-03-30 09:11:05.769  Error: Exception starting shared server: bind: Address already in use [system:98]
…
2023-03-30 09:11:07.774  Status: RPi GPIO: This hardware is deprecated. Please transfer to the new SysFS hardware type!
…
The hint to what you forgetting is in the log :)

Add ‘—loglevel debug’ (or ‘all’)
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
skom
Posts: 18
Joined: Sunday 15 March 2020 9:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Poland
Contact:

Re: HTTPrequest from Automagic on Android

Post by skom »

I'm still at a dead end. It is true that debug works, but I have domoticz on port 80 and if I run it without the -www parameter, I have no access to it from the outside and it does not show any login attempts from dataplicity (it connects through port 80 and domoticz starts on port 8080). When I run with "-www 80" it crashes after a while:

Code: Select all

pi@domoticz:~/domoticz $ ./domoticz -www 80 -loglevel debug -debuglevel webserver,received,auth
2023-04-03 09:48:00.194  Debug: CWebServer::StartServer() : settings : 'server_settings[is_secure_=false, www_root='/home/pi/domoticz/www', listening_address='::', listening_port='80', vhostname='', php_cgi_path='']'
2023-04-03 09:48:00.194  Debug: CWebServer::StartServer() : IAM settings : 'iam_settings[is_enabled_=true, auth_url='/oauth2/v1/authorize', token_url='/oauth2/v1/token', discovery_url='/.well-known/openid-configuration', code_expire_seconds='60', token_expire_seconds='3600', refresh_expire_seconds='86400']'
2023-04-03 09:48:00.199  Debug: CWebServer::StartServer() : settings : ssl_server_settings['server_settings[is_secure_=true, www_root='/home/pi/domoticz/www', listening_address='::', listening_port='443', vhostname='', php_cgi_path='']', ssl_method='tls', certificate_chain_file_path='./server_cert.pem', ca_cert_file_path='./server_cert.pem', cert_file_path=./server_cert.pem', private_key_file_path='./server_cert.pem', private_key_pass_phrase='', ssl_options='single_dh_use', tmp_dh_file_path='./server_cert.pem', verify_peer=false, verify_fail_if_no_peer_cert=false, verify_file_path='']
2023-04-03 09:48:00.199  Debug: CWebServer::StartServer() : IAM settings : 'iam_settings[is_enabled_=true, auth_url='/oauth2/v1/authorize', token_url='/oauth2/v1/token', discovery_url='/.well-known/openid-configuration', code_expire_seconds='60', token_expire_seconds='3600', refresh_expire_seconds='86400']'
2023-04-03 09:48:00.200  Debug: [web:443] Enabled ciphers (TLSv1.2) ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
2023-04-03 09:48:00.201  Debug: [web:443] 'BEGIN DH PARAMETERS' found in file ./server_cert.pem
2023-04-03 09:48:00.202  Debug: [web:443] Enabled ciphers (TLSv1.2) ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
2023-04-03 09:48:00.203  Debug: [web:443] 'BEGIN DH PARAMETERS' found in file ./server_cert.pem
2023-04-03 09:48:00.204  Debug: [web:443] Enabled ciphers (TLSv1.2) ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
2023-04-03 09:48:00.205  Debug: [web:443] 'BEGIN DH PARAMETERS' found in file ./server_cert.pem
terminate called without an active exception
Przerwane

Run with:

Code: Select all

./domoticz -loglevel debug -debuglevel webserver,received,auth

Code: Select all

pi@domoticz:~/domoticz $ ./domoticz -loglevel debug -debuglevel webserver,received,auth
2023-04-03 09:56:41.975  Debug: CWebServer::StartServer() : settings : 'server_settings[is_secure_=false, www_root='/home/pi/domoticz/www', listening_address='::', listening_port='8080', vhostname='', php_cgi_path='']'
2023-04-03 09:56:41.975  Debug: CWebServer::StartServer() : IAM settings : 'iam_settings[is_enabled_=true, auth_url='/oauth2/v1/authorize', token_url='/oauth2/v1/token', discovery_url='/.well-known/openid-configuration', code_expire_seconds='60', token_expire_seconds='3600', refresh_expire_seconds='86400']'
2023-04-03 09:56:41.976  Debug: [web:8080] Adding IPv4 network (10.1.1.*) to list of trusted networks.
2023-04-03 09:56:41.976  Debug: [web:8080] Adding IPv4 network (127.0.0.1) to list of trusted networks.
2023-04-03 09:56:41.977  Debug: [web:8080] Adding IPv4 network (172.27.***.**1) to list of trusted networks.   [b]<- this is Zerotier[/b]
2023-04-03 09:56:41.977  Debug: [web:8080] Adding IPv4 network (172.27.***.**2) to list of trusted networks.   [b]<- this is Zerotier[/b]
2023-04-03 09:56:41.977  Debug: [web:8080] Adding IPv4 network (172.27.***.**3) to list of trusted networks.   [b]<- this is Zerotier[/b]
2023-04-03 09:56:41.980  Debug: CWebServer::StartServer() : settings : ssl_server_settings['server_settings[is_secure_=true, www_root='/home/pi/domoticz/www', listening_address='::', listening_port='443', vhostname='', php_cgi_path='']', ssl_method='tls', certificate_chain_file_path='./server_cert.pem', ca_cert_file_path='./server_cert.pem', cert_file_path=./server_cert.pem', private_key_file_path='./server_cert.pem', private_key_pass_phrase='', ssl_options='single_dh_use', tmp_dh_file_path='./server_cert.pem', verify_peer=false, verify_fail_if_no_peer_cert=false, verify_file_path='']
2023-04-03 09:56:41.980  Debug: CWebServer::StartServer() : IAM settings : 'iam_settings[is_enabled_=true, auth_url='/oauth2/v1/authorize', token_url='/oauth2/v1/token', discovery_url='/.well-known/openid-configuration', code_expire_seconds='60', token_expire_seconds='3600', refresh_expire_seconds='86400']'
2023-04-03 09:56:41.981  Debug: [web:443] Enabled ciphers (TLSv1.2) ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
2023-04-03 09:56:41.982  Debug: [web:443] 'BEGIN DH PARAMETERS' found in file ./server_cert.pem
2023-04-03 09:56:41.983  Debug: [web:443] Enabled ciphers (TLSv1.2) ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
2023-04-03 09:56:41.984  Debug: [web:443] 'BEGIN DH PARAMETERS' found in file ./server_cert.pem
2023-04-03 09:56:41.985  Debug: [web:443] Enabled ciphers (TLSv1.2) ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
2023-04-03 09:56:41.986  Debug: [web:443] 'BEGIN DH PARAMETERS' found in file ./server_cert.pem
2023-04-03 09:56:46.076  Debug: [web:8080] Host:10.1.1.100 Uri:/json
2023-04-03 09:56:46.077  Debug: [web:8080] Request Headers:
Host: 10.1.1.16:8080     [b]<- form chrome on PC and sent to 8080 port[/b]
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.62
Upgrade: websocket
Origin: http://10.1.1.16:8080
Sec-WebSocket-Version: 13
Accept-Encoding: gzip, deflate
Accept-Language: pl,en;q=0.9,en-GB;q=0.8,en-US;q=0.7
Cookie: securitytoken=7b32a35f408508e56edc13a45a335f51
Sec-WebSocket-Key: yklN6t3L+gscCSgCowyrwA==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Sec-WebSocket-Protocol: domoticz

2023-04-03 09:56:46.077  Debug: [web:8080] IP (10.1.1.100) is within Trusted network range!
2023-04-03 09:56:46.077  Debug: [web:8080] isPage 0 isAction 0 isUpgrade 1 needsAuthentication 1 isAuthenticated 1 (skom)
2023-04-03 09:56:46.077  Debug: Web ACLF: 10.1.1.100 - - [03/Apr/2023:09:56:46.076 +0200] "GET /json HTTP/1.1" 101 0 - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.62"
2023-04-03 09:57:41.976  Debug: [web:8080] cleaning sessions...
2023-04-03 09:57:41.976  Debug: SessionStore : clean...
User avatar
waltervl
Posts: 5846
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: HTTPrequest from Automagic on Android

Post by waltervl »

Check the commandline parameters https://www.domoticz.com/wiki/Command_line_parameters to add for example -www 80 to host domoticz on port 80.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
skom
Posts: 18
Joined: Sunday 15 March 2020 9:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Poland
Contact:

Re: HTTPrequest from Automagic on Android

Post by skom »

This is what I did (first listing from my previous post):

Code: Select all

./domoticz -www 80 -loglevel debug -debuglevel webserver,received,auth
and after running this I get:

Code: Select all

terminate called without an active exception
Aborted
here is a new listing (but identical to that one - except for run time)

Code: Select all

pi@domoticz:~/domoticz $ ./domoticz -www 80 -loglevel debug -debuglevel webserver,received,auth
2023-04-04 08:03:16.657 Debug: CWebServer::StartServer() : settings : 'server_settings[is_secure_=false, www_root='/home/pi/domoticz/www', listening_address='::', listening_port= '80', vhostname='', php_cgi_path='']'
2023-04-04 08:03:16.657 Debug: CWebServer::StartServer() : IAM settings : 'iam_settings[is_enabled_=true, auth_url='/oauth2/v1/authorize', token_url='/oauth2/v1/token' , discovery_url='/.well-known/openid-configuration', code_expire_seconds='60', token_expire_seconds='3600', refresh_expire_seconds='86400']'
2023-04-04 08:03:16.661 Debug: CWebServer::StartServer() : settings : ssl_server_settings['server_settings[is_secure_=true, www_root='/home/pi/domoticz/www', listening_address='::', listening_port='443', vhostname='', php_cgi_path='']', ssl_method='tls', certificate_chain_file_path='./server_cert.pem', ca_cert_file_path='./server_cert.pem', cert_file_path=./server_cert. pem', private_key_file_path='./server_cert.pem', private_key_pass_phrase='', ssl_options='single_dh_use', tmp_dh_file_path='./server_cert.pem', verify_peer=false, verify_fail_if_no_peer_cert=false, verify_file_path='']
2023-04-04 08:03:16.662 Debug: CWebServer::StartServer() : IAM settings : 'iam_settings[is_enabled_=true, auth_url='/oauth2/v1/authorize', token_url='/oauth2/v1/token' , discovery_url='/.well-known/openid-configuration', code_expire_seconds='60', token_expire_seconds='3600', refresh_expire_seconds='86400']'
2023-04-04 08:03:16.662 Debug: [web:443] Enabled ciphers (TLSv1.2) ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256- GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
2023-04-04 08:03:16.688 Debug: [web:443] 'BEGIN DH PARAMETERS' found in file ./server_cert.pem
2023-04-04 08:03:16.689 Debug: [web:443] Enabled ciphers (TLSv1.2) ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256- GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
2023-04-04 08:03:16.691 Debug: [web:443] 'BEGIN DH PARAMETERS' found in file ./server_cert.pem
2023-04-04 08:03:16.692 Debug: [web:443] Enabled ciphers (TLSv1.2) ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256- GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
2023-04-04 08:03:16.693 Debug: [web:443] 'BEGIN DH PARAMETERS' found in file ./server_cert.pem
terminate called without an active exception
Aborted
nothing works on the port

Code: Select all

sudo netstat -tulpn | grep '80\|433'

Code: Select all

tcp        0      0 0.0.0.0:1880            0.0.0.0:*               LISTEN      362/node-red
tcp        0      0 127.0.0.1:8088          0.0.0.0:*               LISTEN      630/influxd
tcp6       0      0 :::8084                 :::*                    LISTEN      1442/docker-proxy
tcp6       0      0 :::8086                 :::*                    LISTEN      630/influxd
tcp6       0      0 :::3000                 :::*                    LISTEN      780/grafana-server
Normally Domoticz (on port 80) is started by:

Code: Select all

sudo service domoticz start
But I don't know how to add debug options there?
When I run:

Code: Select all

sudo service domoticz -loglevel debug -debuglevel webserver,received,auth start
This shows that the recognized command :(
User avatar
waltervl
Posts: 5846
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: HTTPrequest from Automagic on Android

Post by waltervl »

You can modify the DEAMON_ARGS in file/etc/init.d/domoticz.sh to add the debug statements when domoticz is run as a service.
https://www.domoticz.com/wiki/Command_l ... figuration
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
skom
Posts: 18
Joined: Sunday 15 March 2020 9:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Poland
Contact:

Re: HTTPrequest from Automagic on Android

Post by skom »

@waltervl: Thanks for the answer. Before reading it, I tried to figure it out on my own and I came to what you replied to me, but thank you very much for your commitment :)

Finally I managed to start domoticz with "sudo service ...." (add parameters in /etc/init.d/domoticz.sh file) but no response to sending commands from Automagic via Dataplicity - in logs at 9:22 , but sending the command from Automagic over the local network (9:16) and sending this command via Dataplicity from Chroma:

Code: Select all

https://flavor***-***-***dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0
running on the same phone as Automagic (9:20).
Domoticz logs:

Code: Select all

2023-04-04 09:12:21.802  Status: Domoticz V2023.1 (c)2012-2023 GizMoCuz
2023-04-04 09:12:21.802  Status: Build Hash: f9b9ac774, Date: 2023-02-14 15:06:40
2023-04-04 09:12:21.802  Status: Startup Path: /home/pi/domoticz/
2023-04-04 09:12:21.832  Sunrise: 05:55:00 SunSet: 19:08:00
2023-04-04 09:12:21.832  Day length: 13:12:00 Sun at south: 12:32:00
2023-04-04 09:12:21.832  Civil twilight start: 05:20:00 Civil twilight end: 19:43:00
2023-04-04 09:12:21.832  Nautical twilight start: 04:37:00 Nautical twilight end: 20:26:00
2023-04-04 09:12:21.832  Astronomical twilight start: 03:50:00 Astronomical twilight end: 21:13:00
2023-04-04 09:12:21.883  Status: PluginSystem: Started, Python version '3.7.3', 8 plugin definitions loaded.
2023-04-04 09:12:21.894  Active notification Subsystems: clickatell, kodi, pushbullet, pushover, telegram (5/13)
2023-04-04 09:12:21.899  Status: WebServer(HTTP) started on address: :: with port 80
2023-04-04 09:12:21.906  Status: WebServer(SSL) started on address: :: with port 443
2023-04-04 09:12:22.006  Status: TCPServer: shared server started...
2023-04-04 09:12:22.007  Status: RxQueue: queue worker started...
2023-04-04 09:12:24.319  Status: RPi GPIO: This hardware is deprecated. Please transfer to the new SysFS hardware type!
2023-04-04 09:12:24.322  Status: NotificationSystem: thread started...
2023-04-04 09:12:24.322  Status: EventSystem: reset all events...
2023-04-04 09:12:24.328  Status: EventSystem: reset all device statuses...
2023-04-04 09:12:24.342  Status: MySensors: connected to: 10.1.1.70:5003
2023-04-04 09:12:24.346  MySensors: Gateway Ready...
2023-04-04 09:12:24.353  MySensors: Gateway Version: 2.3.2
2023-04-04 09:12:24.357  MySensors: Gateway Version: 2.3.2
2023-04-04 09:12:24.489  Status: Python EventSystem: Initializing event module.
2023-04-04 09:12:24.489  Status: EventSystem: Started
2023-04-04 09:12:24.489  Status: EventSystem: Queue thread started...
2023-04-04 09:12:25.008  Status: MQTT: Connecting to 10.1.1.16:1883
2023-04-04 09:12:25.210  Status: MQTT: connected to: 10.1.1.16:1883
2023-04-04 09:12:26.230  Status: [web:80] Incoming connection from: 10.1.1.16
2023-04-04 09:12:28.059  Status: [web:80] Incoming connection from: 10.1.1.15
2023-04-04 09:12:54.324  RPi GPIO: Optional connected Master Domoticz now updates its status
2023-04-04 09:15:31.689  Status: [web:80] Incoming connection from: 10.1.1.100
2023-04-04 09:15:31.704  Status: [web:80] Incoming connection from: 10.1.1.100
2023-04-04 09:15:31.706  Status: [web:80] Incoming connection from: 10.1.1.100
2023-04-04 09:15:31.707  Status: [web:80] Incoming connection from: 10.1.1.100
- " -
- " -
- " -
- " -
2023-04-04 09:15:31.763  Status: [web:80] Incoming connection from: 10.1.1.100
2023-04-04 09:15:31.763  Status: [web:80] Incoming connection from: 10.1.1.100
2023-04-04 09:15:31.764  Status: [web:80] Incoming connection from: 10.1.1.100
2023-04-04 09:15:31.765  Status: [web:80] Incoming connection from: 10.1.1.100
2023-04-04 09:15:31.766  Status: [web:80] Incoming connection from: 10.1.1.100
2023-04-04 09:16:16.624  Status: User: skom (IP: 10.1.1.4) initiated a switch command (154/Osoby - KM geo/On)
2023-04-04 09:16:16.626  Status: Notification: Wchodzisz do strefy domowej
2023-04-04 09:16:16.629  Clickatell SMS notification json: {"content":"Wchodzisz do strefy domowej","to":["485********8"],"binary": false,"charset": "UTF-8"}
2023-04-04 09:16:16.632  Dummy: Light/Switch (Osoby - KM geo)
2023-04-04 09:16:16.637  Status: [web:80] Incoming connection from: 10.1.1.4
2023-04-04 09:16:16.707  Status: dzVents: !Info: Startuje ze skryptem AUTO
2023-04-04 09:16:16.710  Status: dzVents: !Info: ***** Osoby - AM OFF *****
2023-04-04 09:16:16.711  Status: dzVents: !Info: ***** Koniec *****
2023-04-04 09:16:17.024  Clickatell SMS Gateway: {"responseCode":202,"messages":[{"apiMessageId":"2b**********f57","accepted":true,"to":"485********8","errorCode":null,"error":null,"errorDescription":null}]}
2023-04-04 09:16:17.024  Notification sent (clickatell) => Success
2023-04-04 09:20:46.287  Status: User: skom (IP: 78.**.**.14) initiated a switch command (154/Osoby - KM geo/On)
2023-04-04 09:20:46.289  Status: Notification: Wchodzisz do strefy domowej
2023-04-04 09:20:46.290  Clickatell SMS notification json: {"content":"Wchodzisz do strefy domowej","to":["485********8"],"binary": false,"charset": "UTF-8"}
2023-04-04 09:20:46.297  Dummy: Light/Switch (Osoby - KM geo)
2023-04-04 09:20:46.422  Status: dzVents: !Info: Startuje ze skryptem AUTO
2023-04-04 09:20:46.425  Status: dzVents: !Info: ***** Osoby - AM OFF *****
2023-04-04 09:20:46.425  Status: dzVents: !Info: ***** Koniec *****
2023-04-04 09:20:46.652  Clickatell SMS Gateway: {"responseCode":202,"messages":[{"apiMessageId":"c1*******************2","accepted":true,"to":"485********8","errorCode":null,"error":null,"errorDescription":null}]}
2023-04-04 09:20:46.652  Notification sent (clickatell) => Success
2023-04-04 09:21:22.088  Status: Closing application!...
2023-04-04 09:21:22.088  Status: Stopping worker...
2023-04-04 09:21:22.230  Status: RxQueue: queue worker stopped...
2023-04-04 09:21:22.731  Status: WebServer(HTTP) stopped
2023-04-04 09:21:23.233  Status: WebServer(SSL) stopped
2023-04-04 09:21:23.235  Status: TCPServer: shared server stopped
2023-04-04 09:21:23.235  Status: Stopping all hardware...
2023-04-04 09:21:23.777  Status: MQTT: Worker stopped...
2023-04-04 09:21:25.656  RPi GPIO: Hardware stopped
2023-04-04 09:21:25.657  Status: MySensors: TCP/IP Worker stopped...
2023-04-04 09:21:25.663  Status: Scheduler stopped...
2023-04-04 09:21:25.663  Status: EventSystem: Queue thread stopped...
2023-04-04 09:21:25.663  Status: EventSystem: Stopped...
2023-04-04 09:21:25.674  Status: EventSystem - Python stopped...
2023-04-04 09:21:25.674  Status: NotificationSystem: thread stopped...
2023-04-04 09:21:25.675  Status: PluginSystem: Exited work loop.
2023-04-04 09:21:25.684  Status: PluginSystem: Stopped.
2023-04-04 09:21:25.685  Status: Mainworker Stopped...
Automagic logs:

Code: Select all

04.04.2023 09:16:17.035 [_Flow1] Starting to execute flow '_Flow1' with Context{global{global_volume_music=12,global_wyslane=0},local{flow_name=_Flow1,trigger=Manual,triggertime=1680592577033}}
04.04.2023 09:16:17.038 [_Flow1] Start executing action 'HTTP Request: POST http://10.1.1.16/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response'
04.04.2023 09:16:17.039 [_Flow1] Action 'HTTP Request: POST http://10.1.1.16/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' url = http://10.1.1.16/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0
04.04.2023 09:16:17.040 [_Flow1] Action 'HTTP Request: POST http://10.1.1.16/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' formFieldList = Lastname=XYZ,Firstname=ABC
04.04.2023 09:16:17.040 [_Flow1] Action 'HTTP Request: POST http://10.1.1.16/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' variable = response
04.04.2023 09:16:17.040 [_Flow1] Action 'HTTP Request: POST http://10.1.1.16/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' encoding = 
04.04.2023 09:16:17.111 [_Flow1] Action 'HTTP Request: POST http://10.1.1.16/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' URL data fetched successfully.
04.04.2023 09:16:17.111 [_Flow1] End executing action 'HTTP Request: POST http://10.1.1.16/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response'
04.04.2023 09:16:17.125 [_Flow1] Flow ended.

04.04.2023 09:22:27.640 [_Flow1] Starting to execute flow '_Flow1' with Context{global{global_volume_music=12,global_wyslane=0},local{flow_name=_Flow1,trigger=Manual,triggertime=1680592947638}}
04.04.2023 09:22:27.647 [_Flow1] Start executing action 'HTTP Request: POST https://flavor***-***-***dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response'
04.04.2023 09:22:27.648 [_Flow1] Action 'HTTP Request: POST https://flavor***-***-***dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' url = https://flavor***-***-***dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0
04.04.2023 09:22:27.649 [_Flow1] Action 'HTTP Request: POST https://flavor***-***-***dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' formFieldList = Lastname=XYZ,Firstname=ABC
04.04.2023 09:22:27.649 [_Flow1] Action 'HTTP Request: POST https://flavor***-***-***dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' variable = response
04.04.2023 09:22:27.649 [_Flow1] Action 'HTTP Request: POST https://flavor***-***-***dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' encoding = 
04.04.2023 09:22:29.445 [_Flow1] Action 'HTTP Request: POST https://flavor***-***-***dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response' URL data fetched successfully.
04.04.2023 09:22:29.447 [_Flow1] End executing action 'HTTP Request: POST https://flavor***-***-***dataplicity.io/json.htm?type=command&param=switchlight&idx=154&switchcmd=On&level=0 application/x-www-form-urlencoded Lastname=XYZ,Firstname=ABC store in response'
04.04.2023 09:22:29.460 [_Flow1] Flow ended.
skom
Posts: 18
Joined: Sunday 15 March 2020 9:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Poland
Contact:

Re: HTTPrequest from Automagic on Android

Post by skom »

no one faced such problem?
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: HTTPrequest from Automagic on Android

Post by kiddigital »

Looking at your log output, I do not see any debug messages.

If domoticz is started correctly with the debug flags active, it will report that in the log.

Ensure that you start Domoticz correctly with these flags active, otherwise we do not have any additional info to find out why your setup does not work.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest