HTTPd Plugin (useful for IFTTT Maker integration)

Posted on
Thu Mar 22, 2018 2:54 am
FlyingDiver offline
User avatar
Posts: 7190
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: HTTPd Plugin (useful for IFTTT Maker integration)

Here's my log when I trigger my widget:

Code: Select all
   Action Group                    Maker Test
   HTTPd Debug                     AuthHandler: GET from 54.157.5.69:38978 for /setvar?maker=true
   HTTPd Debug                     AuthHandler: Request has correct Authorization header
   HTTPd Debug                     AuthHandler: setting variable httpd_maker to 'true'
   HTTPd Debug                     Checking Trigger HTTPd Trigger Test (1272578573), Type: requestReceived
   Trigger                         HTTPd Trigger Test


My setup looks identical to what you say you have. Double check the plugin config fields for trailing spaces or anything else like that.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Mar 22, 2018 6:49 am
FlyingDiver offline
User avatar
Posts: 7190
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: HTTPd Plugin (useful for IFTTT Maker integration)

Try release 1.0.1: https://github.com/FlyingDiver/Indigo-H ... /tag/1.0.1

Post the logs again, if you need to.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Mar 22, 2018 7:20 am
cjp767 offline
Posts: 136
Joined: May 02, 2013
Location: Gig Harbor, WA

Re: HTTPd Plugin (useful for IFTTT Maker integration)

I rechecked my login and password for any oddities, and everything looked ok. Then I saw the new plugin, 1.0.1.

I upgraded the plugin and it worked on the first try. Thank you for your guidance and all your effort.

IFTTT integration changes everything. Brilliant work. Thank you!

Posted on
Thu Mar 22, 2018 7:23 am
FlyingDiver offline
User avatar
Posts: 7190
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: HTTPd Plugin (useful for IFTTT Maker integration)

That's interesting, because the ONLY difference between 1.0.0 and 1.0.1 is that it prints out the contents of the mismatched auth fields if they don't match. I added the logging statements. That's it.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Mar 22, 2018 8:34 am
cjp767 offline
Posts: 136
Joined: May 02, 2013
Location: Gig Harbor, WA

Re: HTTPd Plugin (useful for IFTTT Maker integration)

Ahhh yes. The problem was mine. I had downloaded the current version from the Indigo App Store. It was version 0.3 or something like that. I had not searched for an updated version that may not have been put into then App Store yet.

Thank you again. I need to be more vigilant in my search for the latest plugin versions. The latest may or may not be in the App Store.

Posted on
Thu Mar 22, 2018 8:37 am
FlyingDiver offline
User avatar
Posts: 7190
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: HTTPd Plugin (useful for IFTTT Maker integration)

I'm about to post 1.1.0. I'll make sure the store is updated.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Mar 23, 2018 10:20 pm
cjp767 offline
Posts: 136
Joined: May 02, 2013
Location: Gig Harbor, WA

Re: HTTPd Plugin (useful for IFTTT Maker integration)

I tried the 1.1.0 version this morning and ended up getting some errors on installation. I just reverted to the previous version and all is well. Thought you'd like to see the log.


Mar 23, 2018 at 09:30:41
Stopping plugin HTTPd (pid 14104)
HTTPd Shutting down HTTPd
Stopped plugin HTTPd
Upgrading plugin HTTPd to newer version 1.1.0 (previous version moved to trash)
Loading plugin "HTTPd 1.1.0"
Starting plugin "HTTPd 1.1.0" (pid 54808)
HTTPd Debug logLevel = 10
Started plugin "HTTPd 1.1.0"
HTTPd Starting HTTPd
HTTPd Debug Starting HTTP server on port 5555
HTTPd Debug Starting HTTPS server on port 5556
HTTPd Debug Using certfile = /Library/Application Support/Perceptive Automation/Indigo 7/httpd_server.pem
HTTPd Error Error in plugin execution startup:

Traceback (most recent call last):
File "plugin.py", line 158, in startup
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 911, in wrap_socket
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 522, in __init__
IOError: (2, 'No such file or directory')

Posted on
Sat Mar 24, 2018 9:01 am
FlyingDiver offline
User avatar
Posts: 7190
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: HTTPd Plugin (useful for IFTTT Maker integration)

That's what I get for not doing better testing.

Version 1.1.1 released. Fixed that and some other issues.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue May 08, 2018 6:24 pm
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: HTTPd Plugin (useful for IFTTT Maker integration)

I want Indigo to monitor events (doorbell, motion) reported by my video intercoms(by Doorbird).

There are a few ways to achieve this but one is to request the device to send an http request to initiate a stream of status information). I'm trying to get my mind around how this would be possible in this or other plugin. I have no issue sending the intercom a simple http request for a one-off status request ... but initiating and monitoring a multipart stream???...is that feasible?

Its specified as follows:

MONITOR REQUEST

Returns the state of motionsensor and doorbell as a continuous multipart stream. Trigger information about rfid and keypad events coming soon. There are up to 8 concurrent Streams allowed.

When all streams are busy returns HTTP code 509.
Method: GET
Required permission: valid user
Syntax:
http://<device-ip>/bha-api/monitor.cgi?ring=doorbell[,motionsensor]
Example Request:
http://<device-ip>/bha-api/monitor.cgi?ring=doorbell,motionsensor
Example Return:
<parameter>=<value>
Values
Description
ring=<string>
doorbell| motionsensor
Event type to monitor.
Note: rfid and keypad events coming soon

HTTP/1.1 200 OK\r\n
Content-Type: multipart/x-mixed-replace; boundary=--ioboundary\r\n
\r\n
--ioboundary\r\n
Content-Type: text/plain\r\n
\r\n
doorbell:H\r\n
\r\n
--ioboundary\r\n
Content-Type: text/plain\r\n
\r\n
motionsensor:L\r\n
\r\n
..
--ioboundary\r\n
Content-Type: text/plain\r\n
\r\n
doorbell:L\r\n
\r\n
--ioboundary\r\n
Content-Type: text/plain\r\n
\r\n
motionsensor:L\r\n
\r\n

HTTP status codes:
200 – OK
400 – Parameter missing or invalid 401 – Authentication required

Posted on
Tue May 08, 2018 6:49 pm
FlyingDiver offline
User avatar
Posts: 7190
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: HTTPd Plugin (useful for IFTTT Maker integration)

agame wrote:
I want Indigo to monitor events (doorbell, motion) reported by my video intercoms(by Doorbird).
There are a few ways to achieve this but one is to request the device to send an http request to initiate a stream of status information). I'm trying to get my mind around how this would be possible in this or other plugin. I have no issue sending the intercom a simple http request for a one-off status request ... but initiating and monitoring a multipart stream???...is that feasible?


Certainly not with this plugin.

It would be fairly easy to write a Python script that does the request and parses out the data to store in variables. Do a forums search for uses of the Python requests module.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue May 08, 2018 7:39 pm
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: HTTPd Plugin (useful for IFTTT Maker integration)

thanks for the tip. I'll scout around.

Posted on
Wed May 09, 2018 5:06 am
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: HTTPd Plugin (useful for IFTTT Maker integration)

agame wrote:
thanks for the tip. I'll scout around.

When you enter a valid URL in a web browser, does the system return data to you? Try one of their example calls and post the result in a code block (rather than a quote block, which makes it tough to see the formatting). Try the following, replacing the dummy IP address with a valid one:

Code: Select all
http://192.168.1.123/bha-api/monitor.cgi?ring=doorbell[,motionsensor]

You might want to post the result to the GhostXML forum, as that plugin may be able to offer some type of solution (I'm not sure yet).

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon May 14, 2018 6:39 am
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: HTTPd Plugin (useful for IFTTT Maker integration)

DaveL17 wrote:
agame wrote:
thanks for the tip. I'll scout around.

When you enter a valid URL in a web browser, does the system return data to you? Try one of their example calls and post the result in a code block (rather than a quote block, which makes it tough to see the formatting). Try the following, replacing the dummy IP address with a valid one:

Code: Select all
http://192.168.1.123/bha-api/monitor.cgi?ring=doorbell[,motionsensor]

You might want to post the result to the GhostXML forum, as that plugin may be able to offer some type of solution (I'm not sure yet).


sorry about the formatting!
no a browser request as above doesn't appear to work on this particular request, I get 'failed to open page' on a browser.
meantime I've taken a different tack and have the device generating a single http request on the motion or bell press events, to this plugin - rather than initiating a stream...so I don't need to waste your or the ghostXML forum's time on this now. (I imagine there would be other use cases for device integration however - it seems very similar to the UDP monitor that now works so well!).
thanks for following up.

Posted on
Tue Jun 26, 2018 10:53 pm
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: HTTPd Plugin (useful for IFTTT Maker integration)

sorry to raise this old chestnut again, but hopefully someone can throw some light on a new issue I have with authentication.

in summary, I have two separate intercoms set up to make an http request to Indigo (using the HTTPd Plugin) on certain events (door bell press, motion).

one of the intercoms works perfectly (I can use the variable change to trigger a range of actions)

the other intercom (configured identically, except with different variable names) throws up an authentication error. I would have concluded there is a difference in the way the two DoorBird intercoms are generating authentication headers (whilst the config is so far as I can tell identical, they are different generations of DoorBird intercom)...however I get the same error message even using http...makes me think there error must be mine?

Code: Select all
HTTPd Debug        AuthHandler: GET from 10.0.1.xx:xxxx for /setvar?frontdoorbell=doorbellevent
HTTPd Debug        AuthHandler: Request has no Authorization header


the request works fine from a browser (once authorised).

I have a couple of thoughts I'd appreciate any comments on:-

- I assume having two different devices making requests to the same HTTPd service device shouldn't complicate authentication? Should I be able to issue this with no authentication header?
- of course all the info I need is appearing in my log in the form of the URL...it just isn't being acted upon. I assume there's no way of ignoring the authentication issue and just matching this string (similar to the Cynical Networks plugin). Given only one of the intercoms is generating the error, I could deduct which intercom has attempted communication by using the HTTPd plugin's trigger event and some conditional logic to exclude events that were properly processed (although this hack wouldn't reveal which url/sensor was involved).

Posted on
Wed Jun 27, 2018 5:53 am
FlyingDiver offline
User avatar
Posts: 7190
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: HTTPd Plugin (useful for IFTTT Maker integration)

Authentication is not the same as encryption. So using http vs https isn't going to make a difference.

Make sure you're using the latest version of the plugin: https://github.com/FlyingDiver/Indigo-H ... /tag/1.2.0

The latest version fixed an issue where the client device would not send the authentication info unless it first received a "no authentication" reply for a request without it. If the firmware in one of the intercoms is a different version and needs that additional reply, upgrading to 1.2.0 will fix it.

agame wrote:
- I assume having two different devices making requests to the same HTTPd service device shouldn't complicate authentication? Should I be able to issue this with no authentication header?


No issue with multiple clients. Each HTTP request is handled individually.

agame wrote:
- of course all the info I need is appearing in my log in the form of the URL...it just isn't being acted upon. I assume there's no way of ignoring the authentication issue and just matching this string (similar to the Cynical Networks plugin). Given only one of the intercoms is generating the error, I could deduct which intercom has attempted communication by using the HTTPd plugin's trigger event and some conditional logic to exclude events that were properly processed (although this hack wouldn't reveal which url/sensor was involved).


No, the plugin won't do any of that. Easier to fix the authentication error. For some reason, one of your devices is not actually sending a header. Having wrong data in the header would give a different error.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 4 of 10 1, 2, 3, 4, 5, 6, 7 ... 10

Who is online

Users browsing this forum: No registered users and 0 guests

cron