Page 1 of 4

RSS integration with HS works

Posted: Mon Dec 01, 2008 3:10 pm
by DJF3
Hi,

The first steps towards Plugwise / HS integration has been completed now.

Required
-HS2
-Jon00's RSS script (http://www.domoticaworld.com/domotica1/links/)
-Updated MyRSS.vb file (MyRSS_DJ_x.vb)
-Updated rss.xml file (rss_DJ_xx.xml)
-Image files for device status
Download http://www.domoticaworld.com/scripts/plugwise/
What it does
It puts the Plugwise Device ID info in the matching HomeSeer device. Example:
Image
How?
I modified the MyRSS.vb script from Jon00 in a way that:
-it gets the data from Plugwise DeviceID-XX and puts the result in HomeSeer device XX (housecode Q, so Qxx)
-Instead of writing everything found in the RSS feed into one HS device, the code now checks if the HS device *NUMBER* as used in the .ini file matches the Plugwise DeviceID as found in the RSS file.
-most of the formatting is removed (or accessible through parameters)
I also modified the rss.xml file so it shows more compact information, and the ID is added which is needed to match it with the HS device in the .ini file
<%=.ID%>, C:<%=.PowerUsage%>, S:<%=.PowerState%>, T:<%=.TotalUsage%>

Instructions
For detailed and <b>updated</b> instructions please visit my website: http://www.domoticaworld.com/ click 'Plugwise' under Scripts.

Goodluck!
bye
DJ

PS. For these 'virtual' devices in the house-code Q range I created a new Device-Type "Plugwise" without other options. This will give you 'on/off' buttons on the left. Then create events that run the code to turn on/off plugwise devices based on the status change of these plugwise 'Q' devices.

RSS integration with HS works

Posted: Mon Dec 01, 2008 3:43 pm
by TANE
Good work DJ..:)

RSS integration with HS works

Posted: Mon Dec 01, 2008 4:45 pm
by Noel
When going to 'HomeSeer plugins' > "Jon00's plugins (nice!)" it's asking for a user name / password.

RSS integration with HS works

Posted: Mon Dec 01, 2008 4:46 pm
by TANE
username and password are guest

RSS integration with HS works

Posted: Mon Dec 01, 2008 4:52 pm
by Noel
thank you.

RSS integration with HS works

Posted: Mon Dec 01, 2008 9:10 pm
by Noel
Some one here who can share / mirror Jon00's RSS plugin? (that is if it's free)
His site is down at the moment :(

RSS integration with HS works

Posted: Mon Dec 01, 2008 10:11 pm
by DJF3
Try this link:
http://www.btinternet.com/~jon00/
enter site, click menu "Home Automation" and "Home Automation Server Access"
enter username pwd (guest/guest)
click downloads

Works fine here!

RSS integration with HS works

Posted: Mon Dec 01, 2008 10:31 pm
by Noel
Yes that link is working fine, but the one from your site "Jon00's plugins (nice!)" is pointing to http://217.43.46.209:8087/HS2_Downloads.aspx?Sort=0#Top is not working (at the moment)

RSS integration with HS works

Posted: Mon Dec 01, 2008 11:25 pm
by Noel
Call me stupid, but when I try to run the event (pointing to MyRSS_DJ_2.vb ) I get an error 1 - Running script MyRSS_DJ_2.vb :method not found.

Re: Setup Jon00's RSS reader and test that it works
Done. Working fine

Re: Copy MyRSS_DJ_2.vb to your HS scripts directory
Done.

Re: Copy rss_DJ_01.xml to your C:\Program Files\Plugwise\Plugwise Source\www directory
Done.

Re: Create an event in HS that runs MyRSS_DJ_2.vb
Done.

Re: In the Jon00RSS.ini file, under [VDevSettings] add Showheader=0, Showappliancename=0 and Showformatting=0
Done. I added each setting line by line.

I did mess with the Plugwise web server port, but did set it back again to port 80

RSS integration with HS works

Posted: Tue Dec 02, 2008 10:53 am
by Noel
Ok. The "error 1 - Running script MyRSS_DJ_2.vb :method not found" is gone.
I needed to add "("main","0")" also to the MyRSS_DJ_2.vb event (like the Jon00's RSS event)

RSS integration with HS works

Posted: Tue Dec 02, 2008 11:09 am
by TANE
DJ
I have just removed the RSS reader from my Homeseer...did not use it for long time.
Before I reinstall your version few questions.
How long will the updated process take...i have 30 plugs.
are you going to optimize it that more than 9 plugs will be supported?
Can the devices also be used for triggering events..turn on/off

thanks

RSS integration with HS works

Posted: Tue Dec 02, 2008 11:50 am
by Noel
Hmm.
Now I'm getting the following error when running your script.
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">2-12-2008 10:47:33 Info Event Trigger "PugWise"
2-12-2008 10:47:33 Info Running script in background: MyRSS_DJ_2.vb("main","0")
2-12-2008 10:47:33 PW RSS ==========http://www.theregister.co.uk/feeds/latest.rdf
2-12-2008 10:47:33 PW RSS ----------------FEED1
2-12-2008 10:47:33 Error Scripting runtime error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object variable or With block variable not set. at Microsoft.VisualBasic.CompilerServices.Symbols.Container..ctor(Object Instance) at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateSet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean OptimisticSet, Boolean RValueBase, CallType CallType) at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateSet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments) at scriptcode8.scriptcode8.GetRSS(Object Count, Object Choice) at scriptcode8.scriptcode8.main(String strMode) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Scheduler.VsaScriptHost.Invoke(String ModuleName, String MethodName, Object[] Arguments) <hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

RSS integration with HS works

Posted: Tue Dec 02, 2008 12:03 pm
by Noel
Okay.. Getting close now.
Going to http://localhost/rss_DJ_01.xml does show me the RSS feed, so this is working.
Running the event will give me this error.

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">2-12-2008 11:02:09 - Info - Event Trigger "PugWise"
2-12-2008 11:02:09 - Info - Running script in background: MyRSS_DJ_2.vb("main","0")
2-12-2008 11:02:09 - PW RSS - ==========http://localhost/rss_DJ_01.xml
2-12-2008 11:02:09 - PW RSS - ----------------FEED1
2-12-2008 11:02:09 - Error - Scripting runtime error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object variable or With block variable not set. at Microsoft.VisualBasic.CompilerServices.Symbols.Container..ctor(Object Instance) at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateSet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean OptimisticSet, Boolean RValueBase, CallType CallType) at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateSet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments) at scriptcode8.scriptcode8.GetRSS(Object Count, Object Choice) at scriptcode8.scriptcode8.main(String strMode) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Scheduler.VsaScriptHost.Invoke(String ModuleName, String MethodName, Object[] Arguments)<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

RSS integration with HS works

Posted: Tue Dec 02, 2008 2:25 pm
by DJF3
Good question :-)

Please try the newer version (rss file, vb file and new icons) that is available on my website.
http://www.domoticaworld.com/scripts/plugwise/. This is where I will post the latest releases and instructions.

The error message doesn't really show specific error messages.. Many error messages I received were HUGE and I found 'red' strings that provided a lot of information. Could you PM these to me?

I have an updated release available on my website (0.3):
- removed some code that's not required
- process the 'description' string so all info is available through variables. Now you can decide what is being displayed in the status field (see screenshot in this thread)
- should support device-ID's > 10


CHAK: When I run the script to update 10 devices, it takes less than 1 second. I could add some simple code that times it and puts it in the hslog. In upcoming releases I will make it easier to turn on/off certain logging that help you to identify a potential problem.

RSS integration with HS works

Posted: Tue Dec 02, 2008 3:03 pm
by Rene
When I follow your plugwise project link, I have to enter a user ID and password.

Rene.