verdura Posted August 23 Posted August 23 Hi all, I have a flood sensor and need to call a url when a flood is detected and when a temperature is over 27 ºC. The url is a way to send a SMS but even so the temperature is over 27 ºC it never call the url. If I call it in a browser it works fine but the sensor never calls it... I need to put it too in the flood detected action... Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
tvbshelly Posted August 23 Posted August 23 (edited) Is there a certificate warning in the browser when you call that URL manually? Then it could be that the Shelly cannot access that URL. @verdura Edited August 23 by tvbshelly Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
verdura Posted August 23 Author Posted August 23 4 minutes ago, tvbshelly said: Is there a certificate warning in the browser when you call that URL manually? Then it could be that the Shelly cannot access that URL. @verdura Nope. It works fine! Just a simple php that calls another... Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
tvbshelly Posted August 23 Posted August 23 Do you have the option of calling up anything else for testing? Preferably directly via IP address, but then without TLS (https), i.e. http-only. There may be a DNS problem and the Shelly may not be able to resolve the names. Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
verdura Posted August 23 Author Posted August 23 Done as instructed... But the result is the same... No sms. As allways if called in a browser it works... Is there any log to see if there's any error? Also, with the above configs, does it call the url once it reaches the target temperature or for instance if it starts and the temp is already above 27ºC it calls the url? Thanks a lot for the help! 1 Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
tvbshelly Posted August 23 Posted August 23 Pls. access http://<shelly-ip>/status and also http://<shelly-ip>/settings Just to be on the safe side: Please check that the temperature displayed here is really above 27 degrees Celsius. 10 minutes ago, verdura said: Also, with the above configs, does it call the url once it reaches the target temperature or for instance if it starts and the temp is already above 27ºC it calls the url? I assume that even if the temperature is already above 27 degrees Celsius when the Flood wakes up, the URL is called. 1 Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
tvbshelly Posted August 23 Posted August 23 (edited) Another point, @Heinz wrote this in another post: Quote There is a setting for the temperature threshold at which the device wakes up and sends the information if there has been a temperature change. Presumably this also calls up the URL / triggers the sensor action. Edited August 23 by tvbshelly Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
Heinz Posted August 23 Posted August 23 57 minutes ago, verdura said: Done as instructed... But the result is the same... No sms. As allways if called in a browser it works... Is there any log to see if there's any error? Also, with the above configs, does it call the url once it reaches the target temperature or for instance if it starts and the temp is already above 27ºC it calls the url? Thanks a lot for the help! You should be able to see all logs of the device in the debugger So just that i understand when you set the alarm with shelly there are the Phone notifications ( this is notification from the App not sms) Email ( email of registed account) Alexa ( when added ) and ativity log I would check the log on the shelly to see if its sending anything and then the logs of the server to see if you getting anything. If you want to go more advanced I would do a network sniffing with Wireshark to see what packets are being sent to and from the device and server IP do you have a SMS server these calls are being sent to ? Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
tvbshelly Posted August 23 Posted August 23 @Heinz The Flood is a Gen1 device as far as I understand. Gen1 doesn't have this debug setting yet, does it? Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
Heinz Posted August 23 Posted August 23 ahh yes but there is a way let me find it Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
tvbshelly Posted August 23 Posted August 23 I found it, that's how it works: http://<shelly-ip>/settings/?debug_enable=true And then access the log with http://<shelly-ip>/debug/logs Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
Heinz Posted August 23 Posted August 23 23 minutes ago, tvbshelly said: I found it, that's how it works: http://<shelly-ip>/settings/?debug_enable=true And then access the log with http://<shelly-ip>/debug/logs yup i did a test now and on the flood you can get the logs from the device Download Previous and download current logs to get the status its <ipaddress>/status its good to get the current status of the device as well as the device logs Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
verdura Posted August 26 Author Posted August 26 Hi, Beforehand let me thank you for all the help given... I managed to get all the things you instructed me. I send then in attach. I didn't see nothing out of the ordinary. I change the temperature for a lower setting. Status: logs.txt settings.txt status.txt Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
tvbshelly Posted August 26 Posted August 26 Unfortunately, I can't see anything there that indicates a problem either. Maybe @Heinz can help? Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
Heinz Posted August 26 Posted August 26 in the logs i cant see the device sending anything to the sms.php server. The other settings looks fine going to try test this to see what its doing and what its not. maybe i can find the root cause Im doing a simular test but instead of a php server im doing a standard webhook to turn on a shelly device when its goes below the temp of 10. It should turn on a light Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
Heinz Posted August 26 Posted August 26 So i did the test with the webhook its abit with both over temp and under temp for a webhook on a shelly plus 1pm. could you try this test to make sure the device is sending a webhook. easy way i did this to speed things up was have a under temp and over temp. The webhook i used for the Plus 1pm http://<IP address>/rpc/switch.toggle?id=0 Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
verdura Posted August 26 Author Posted August 26 I have a Shelly Plug 2. I read the webhook is: http://<ip_address_Plug_2>/relay/0?turn=toggle I put it and it worked... Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
Heinz Posted August 26 Posted August 26 ok so it seems that from the shelly side its sending the API log. something needs to be going strange with the php.sms request Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
verdura Posted August 26 Author Posted August 26 Going to dig deep... In the logs it doesn't show the result of the call? Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
tvbshelly Posted August 26 Posted August 26 (edited) I believe no. Maybe the call from Shelly is missing some required http header values for the php script, but the browser sends them? Edited August 26 by tvbshelly Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
verdura Posted August 26 Author Posted August 26 (edited) Well... I change the php code and it worked in the LAN not in the internet. The same code but different url, it doesn't... Maybe the https? The DNS? I force ip, gw and dns... ---- Just for the record the code change was using a redirect with the Header function - Not working changed to curl - Worked --- Edited August 26 by verdura Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
Heinz Posted August 26 Posted August 26 Just to double check its working now ? Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
verdura Posted August 27 Author Posted August 27 Yes it is... I use "curl" and it worked. The php was the culprit... Thanks for all the help! 1 Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
Heinz Posted August 27 Posted August 27 awsome thanks for the update Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.