New Plugin: GhostXML

Posted on
Fri May 06, 2016 3:31 am
Asconasny offline
Posts: 161
Joined: Jan 16, 2015

Re: New Plugin: GhostXML

It works!

Thanks for the update and support.

Regards
Asconasny

Posted on
Fri May 06, 2016 4:00 am
DaveL17 offline
User avatar
Posts: 6786
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: New Plugin: GhostXML

Great news--thanks for letting me know.

I'll get the revised version up on GitHub as soon as possible.

Cheers!
Dave


Sent from my iPhone using Tapatalk

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

[My Plugins] - [My Forums]

Posted on
Fri May 06, 2016 5:54 am
DaveL17 offline
User avatar
Posts: 6786
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: New Plugin: GhostXML

I have updated the plugin to address the 'can't decode' error that Asconasny was encountering. Please report here if there are any problems with this update.

The download link can be found in post #1 of this thread.
Dave

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

[My Plugins] - [My Forums]

Posted on
Mon Jun 06, 2016 5:15 pm
jay (support) offline
Site Admin
User avatar
Posts: 18261
Joined: Mar 19, 2008
Location: Austin, Texas

Re: New Plugin: GhostXML

I was just doing some forum maintenance - is there some reason you didn't put this thread in your forum?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Jun 06, 2016 5:33 pm
DaveL17 offline
User avatar
Posts: 6786
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: New Plugin: GhostXML

jay (support) wrote:
I was just doing some forum maintenance - is there some reason you didn't put this thread in your forum?

Hi Jay - originally, it was my intention that this one be community supported, that's why I put it on GitHub rather than in the Indigo Library.
Dave

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

[My Plugins] - [My Forums]

Posted on
Tue Jun 07, 2016 9:25 am
jay (support) offline
Site Admin
User avatar
Posts: 18261
Joined: Mar 19, 2008
Location: Austin, Texas

Re: New Plugin: GhostXML

That's fine - I was just talking about this topic itself (since you are the originator of the plugin). Several other developers have their plugins hosted on github but still put the forums/announcements in their developer forum. Just wondering... ;)

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Jun 07, 2016 10:16 am
DaveL17 offline
User avatar
Posts: 6786
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: New Plugin: GhostXML

Okay, cool. If you want to establish a sub-forum for this one, that sounds good to me.


Sent from my iPhone using Tapatalk

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

[My Plugins] - [My Forums]

Posted on
Tue Jun 07, 2016 10:34 am
jay (support) offline
Site Admin
User avatar
Posts: 18261
Joined: Mar 19, 2008
Location: Austin, Texas

Re: New Plugin: GhostXML

How about I just move it to your forum...

...Done :)

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Jun 07, 2016 11:05 am
DaveL17 offline
User avatar
Posts: 6786
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: New Plugin: GhostXML

Deal!


Sent from my iPhone using Tapatalk

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

[My Plugins] - [My Forums]

Posted on
Fri Jun 17, 2016 1:33 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: New Plugin: GhostXML

Code: Select all
GhostXML Error                  No JSON object could be decoded
  GhostXML Error                  Error in plugin execution CalcDeviceFunc:

Traceback (most recent call last):
  File "plugin.py", line 202, in getDeviceStateList
AttributeError: 'NoneType' object has no attribute 'iterkeys'

  GhostXML Error                  Error refreshing devices. Please check settings.
  GhostXML Error                  'NoneType' object has no attribute 'iterkeys'
GhostXML Error                  Error in plugin execution CalcDeviceFunc:

Traceback (most recent call last):
  File "plugin.py", line 202, in getDeviceStateList
AttributeError: 'NoneType' object has no attribute 'iterkeys'
 Error                           device "FollowMee Device List" state key deviceIsOnline not defined (ignoring update request)
  Error                           device "FollowMee Device List" state key deviceIsOnline not defined (ignoring update request)
  GhostXML                        Starting GhostXML device: FollowMee Device List
  Error                           device "FollowMee Device List" state key deviceIsOnline not defined (ignoring update request)
  Error                           device "FollowMee Device List" state key deviceIsOnline not defined (ignoring update request)


Just had all that lot when I included a carriage return in the URL by accident.

All sorted now.

Is the plugin scriptable? I want to write a FollowMee plugin using their API, and it wonder if it makes sense to utilise your plugin to fetch the data then mine to present it as suitable devices?

Peter

Posted on
Fri Jun 17, 2016 2:53 pm
DaveL17 offline
User avatar
Posts: 6786
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: New Plugin: GhostXML

howartp wrote:
Is the plugin scriptable? I want to write a FollowMee plugin using their API, and it wonder if it makes sense to utilise your plugin to fetch the data then mine to present it as suitable devices?

Peter

Hi Peter - I responded to your PM as well.

You should be able to do what you are thinking, but you might want to do some tinkering before investing the full effort of developing a plugin. IIRC, there is only one GhostXML Action which refreshes all plugin devices when called. If there are other features that you'd be interested in, you can always toss a feature up on the repo. :D

Dave

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

[My Plugins] - [My Forums]

Posted on
Fri Jun 17, 2016 4:35 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: New Plugin: GhostXML

You'll see in my data in the pm, there's address data - this is a 15 day free trial of the various paid API features available with FollowMee, but costs money to carry on with.

I've just found opencagedata.com who have a free API up to X,000 per day so I will use that and therefore need to take the lat/long from the data from your plugin, or deal with the whole JSON myself - which would be daft.

I could easily trigger on whenUpdated(lat/long) to cause mine to re-query the API with your values.

I'd definitely like the individual refresh rates mentioned in your TODO, as well as individual refresh actions.

Peter


Sent from my iPhone using Tapatalk

Posted on
Sat Jun 18, 2016 4:30 am
DaveL17 offline
User avatar
Posts: 6786
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: New Plugin: GhostXML

Glad to hear that you found something that works for you. If I'm understanding correctly, you should be able to trigger off GhostXML device state value changes already--but perhaps I misunderstand. I'll add individual device refresh actions to the TODO list, but to be honest, it will be a while before I would be able to get to something that substantial. I have some updates for other plugins in the works that I need to finish first, and some personal projects that I'd like to finish up as well.

The GhostXML plugin is meant to be open for the whole community to support, so if there is anyone that's willing and able to take a crack at any of the TODO list items, they should feel free. :D

Dave

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

[My Plugins] - [My Forums]

Posted on
Sat Jun 18, 2016 12:42 pm
DaveL17 offline
User avatar
Posts: 6786
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: New Plugin: GhostXML

GhostXML v0.2.05 now available.

v0.2.05
- Adds a method, cleanTheKeys(), which removes certain characters from dictionary key names that Indigo cannot use for device state names.

You can get it here.

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

[My Plugins] - [My Forums]

Posted on
Sat Jun 18, 2016 4:05 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: New Plugin: GhostXML

DaveL17 wrote:
The GhostXML plugin is meant to be open for the whole community to support, so if there is anyone that's willing and able to take a crack at any of the TODO list items, they should feel free. :D

Hi Dave.

You're on!

I've sorted the following:

  • Individual refresh rates per feed, including manual refresh only
  • Separate action for refreshing an individual feed
  • Sorted out some additional error handling - whenever a feed was invalid (eg incorrect URL), the Indigo device got stuck in a broken state, flooded the logs, and couldn't self-heal itself.
  • Added optional variable substitution, based on indigo's self.substitution() methods but with a nicer UI for end users.

The variable substitution allows you to construct a feed URL such as [url]www.abc.com?key=abc123&lat=[A]&long=[B]&username=jbloggs.[/url]

In the UI you enter the variable IDs that [A] to [E] should substitute. I've got a GhostXML feed from FollowMee which provides the lat and long of my iPhone, which I then trigger (when device state updated > insert device state into variable > then refresh a 2nd GhostXML feed which takes the lat and long and provides me an human-readable address/location).

I have/had also done a version of cleanTheKeys() but yours is better as it works on the raw JSON structure with pushing and popping, which I'm not good at; I just intercepted the keys every time they were iterated (once creating states and once updating values) and cleaned them in-line.

I don't have a clue how to use Github - shall I send you it or stick it on dropbox for you and others to test, or? Will you merge it into your github branch if it's ok, or do I need to work out Github?

Peter

Page 5 of 20 1, 2, 3, 4, 5, 6, 7, 8 ... 20

Who is online

Users browsing this forum: No registered users and 3 guests