Plugin for NetworkOWL Intuition-pv sensor now available

Posted on
Mon Apr 08, 2013 4:14 pm
NickSmith offline
Posts: 32
Joined: Oct 28, 2012
Location: UK

Re: Plugin for NetworkOWL Intuition-pv sensor now available

Hi Bruno - I've got a draft version 1.1 of the plug-in ready for testing:

http://www.nickandmeryl.com/software/downloads/NetworkOwl/v1.1%20draft/NetworkOwl.indigoPlugin.zip

This introduces separate "usedWattsNow" & "usedWattsToday" states for each phase which are populated when the Intuition model type is set to "Intuition-lc" in the "Edit Device Settings" dialogue box.

Hopefully this fixes the problem!

Cheers

Nick

Posted on
Mon Apr 08, 2013 6:37 pm
bmoraes offline
Posts: 47
Joined: Feb 05, 2007
Location: Rio de Janeiro, Brazil

Re: Plugin for NetworkOWL Intuition-pv sensor now available

Nick,

Thanks a lot for the new version!

I updated the plugin, but got an error. After updating it was still working as before (one phase). As I went to the configuration to change the "Model" the only option was the -pv (no -lc). Additionally the Edit Device Settings... button was grayed out.

I tried also to create a new device, but in that case the Edit Device Settings was also grayed out so I could not configure it.

Cheers, Bruno

Code: Select all
Stopping plugin "NetworkOwl" (pid 61095)
  Stopped plugin "NetworkOwl"
  Upgrading plugin "NetworkOwl" to newer version 1.1 (previous version moved to trash)
  Loading plugin "NetworkOwl 1.1"
  Starting plugin "NetworkOwl 1.1" (pid 70076)
  Started plugin "NetworkOwl 1.1"
  NetworkOwl Error                exception in deviceStartComm(OWL): 'key owlType not found in dict'
  NetworkOwl                      NetworkOwl: starting listener on port 22600
  NetworkOwl                      NetworkOwl: electricity packet received
  NetworkOwl                      NetworkOwl: electricity packet received
Attachments
owl_setup.png
owl_setup.png (61.66 KiB) Viewed 7123 times

Posted on
Mon Apr 08, 2013 9:16 pm
bmoraes offline
Posts: 47
Joined: Feb 05, 2007
Location: Rio de Janeiro, Brazil

Re: Plugin for NetworkOWL Intuition-pv sensor now available

Hi Nick,

I just observed that with the new version although Indigo receives the datagrams the "state" variables are not getting updated, none of the values change.

Code: Select all
Reloading plugin "NetworkOwl 1.1"
  Stopping plugin "NetworkOwl 1.1" (pid 70106)
  Stopped plugin "NetworkOwl 1.1"
  Starting plugin "NetworkOwl 1.1" (pid 71250)
  Started plugin "NetworkOwl 1.1"
  NetworkOwl Debug                startup called
  NetworkOwl Debug                Starting device: OWL
  NetworkOwl Debug                MAC Address: 443719______
  NetworkOwl Error                exception in deviceStartComm(OWL): 'key owlType not found in dict'
  NetworkOwl                      NetworkOwl: starting listener on port 22600
  NetworkOwl Debug                startProtocol called
  NetworkOwl Debug                Datagram "<electricity id='443719_______'><signal rssi='-50' lqi='0'/><battery level='100%'/><chan id='0'><curr units='w'>231.00</curr><day units='wh'>70.66</day></chan><chan id='1'><curr units='w'>1520.00</curr><day units='wh'>320.39</day></chan><chan id='2'><curr units='w'>204.00</curr><day units='wh'>46.86</day></chan></electricity>" received from ('192.168.0.158', 22600)
  NetworkOwl                      NetworkOwl: electricity packet received
  NetworkOwl Debug                packet address: 443719_______
 

Posted on
Mon Apr 08, 2013 10:59 pm
NickSmith offline
Posts: 32
Joined: Oct 28, 2012
Location: UK

Re: Plugin for NetworkOWL Intuition-pv sensor now available

Hi Bruno - think you might need to stop & restart the Indigo server for it to pick up the new device states, rather than just the plugin itself. I was getting a similar error to you until I did this. What seemed to work for me was:

1) disable the plugin
2) stop the Indigo server
3) copy the new version into the Indigo "disabled plugins" folder
4) restart Indigo
5) enable the plugin
6) check the config of the plugin

Cheers

Nick

Posted on
Tue Apr 09, 2013 5:11 am
bmoraes offline
Posts: 47
Joined: Feb 05, 2007
Location: Rio de Janeiro, Brazil

Re: Plugin for NetworkOWL Intuition-pv sensor now available

Nick,

great. I got it working now!

What did the trick, however, was deleting the existing OWL variable before stopping the indigo server.

I will monitor the behavior and let you know if anything happens.

Just as a potential refinement for a new version, when selecting the -lv device type it might make sense:
1) not reporting the expWattsNow, expWattsToday, genWattsNow and genWattsToday variables
2) having usedWattsNow and usedWatts today representing the sum of all 3 phases

Thanks a lot, Bruno

Posted on
Tue Apr 09, 2013 5:56 am
NickSmith offline
Posts: 32
Joined: Oct 28, 2012
Location: UK

Re: Plugin for NetworkOWL Intuition-pv sensor now available

Ah - excellent, thanks Bruno: glad to hear it's working - was scratching my head this end as it was working ok for me!

Good suggestions - I'll certainly build the second of these into the "official" v1.1 release, but the first one may take a little bit more work: some research required for that one!

Thanks

Cheers

Nick

Posted on
Wed Dec 04, 2013 3:37 am
hugues0509 offline
Posts: 6
Joined: May 17, 2013

Re: Plugin for NetworkOWL Intuition-pv sensor now available

Hello, I have a problem since the update from mouton lion to Maverick.
The plugin start and stop immediately :

Copy of logs :

2013-12-04 10:12:57 Application Enabling plugin "NetworkOwl 1.0"
2013-12-04 10:12:57 Application Starting plugin "NetworkOwl 1.0" (pid 58036)
2013-12-04 10:12:58 NetworkOwl Error Error in plugin execution InitializeMain:
Traceback (most recent call last):
File "plugin.py", line 19, in <module>
<type 'exceptions.ImportError'>: No module named twisted.internet.protocol
2013-12-04 10:12:58 Application Stopping plugin "NetworkOwl 1.0" (pid 58036)

Did anyone have the same issue ?

Thanks for your help.

Posted on
Wed Dec 04, 2013 1:13 pm
NickSmith offline
Posts: 32
Joined: Oct 28, 2012
Location: UK

Re: Plugin for NetworkOWL Intuition-pv sensor now available

Hi - thanks for the message: I've checked & I've also got the same issue myself after upgrading my Indigo server to 10.9 at the weekend. After doing a spot of googling it looks like a number of packages were removed as part of the upgrade to 10.9 (thanks Apple :? ), but unfortunately the easy fixes I've tried (like installing the Xcode command line tools) haven't resolved the issue. I'll keep working on it & see if I can find a solution.

One question to Matt & Jay: I'm still running Indigo v5 - is there anything in v6 that helps address this problem in OS X 10.9?

Regards

Nick

Posted on
Wed Dec 04, 2013 1:47 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Plugin for NetworkOWL Intuition-pv sensor now available

It looks like twisted is no longer installed by default on Python 2.5 in Mavericks (or maybe a major revision to twisted changed the module hierarchy). You can either use the direct Python network methods or attempt to distribute your own twisted module with the plugin.

Nothing we would do between 5 and 6 would make any difference.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Dec 04, 2013 2:04 pm
NickSmith offline
Posts: 32
Joined: Oct 28, 2012
Location: UK

Re: Plugin for NetworkOWL Intuition-pv sensor now available

Thanks for the quick response Jay. Have you got any plans to move the version of Python used by Indigo onto a later version at some point? I only ask as from what I can tell Twisted does still seem to be part of the 2.7.5 distribution that ships as standard with OS X 10.9 and it would be a shame to lose such a useful standard library.

For example, using the Indigo Python interpreter I see the error message being shown in the Indigo logs when the NetworkOwl plugin starts:

Code: Select all
IndigoPluginHost -i
Python 2.5.6 (r256:Unversioned directory, Aug 25 2013, 00:03:43)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]
Connected to Indigo Server 5.1.10 (localhost:1176)
>>> from twisted.internet.protocol import DatagramProtocol
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ImportError: No module named twisted.internet.protocol


Running the same thing on the same server but this time using the standard version of Python that comes with 10.9, the Twisted module loads correctly:

Code: Select all
python
Python 2.7.5 (default, Aug 25 2013, 00:04:04)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from twisted.internet.protocol import DatagramProtocol
>>>


Thanks

Regards

Nick

Posted on
Wed Dec 04, 2013 3:33 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Plugin for NetworkOWL Intuition-pv sensor now available

The problem we have is that we support Mac OS X 10.5 and later. Python 2.5 is the only common version of Python installed on all of those versions. Otherwise we'd need to distribute our own Python installation which would require a lot more testing. At some point we may be forced to do that but until it becomes a requirement we'll likely leave it alone.

Not sure if twisted is pure Python or not but if it is you can just bundle it with the plugin.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Dec 04, 2013 4:29 pm
NickSmith offline
Posts: 32
Joined: Oct 28, 2012
Location: UK

Re: Plugin for NetworkOWL Intuition-pv sensor now available

OK, understood: thanks Jay. I'll probably attempt to rewrite the code to use native Python rather than relying on Twisted as it's not doing anything especially exotic.

Regards

Nick

Posted on
Thu Dec 05, 2013 1:36 am
hugues0509 offline
Posts: 6
Joined: May 17, 2013

Re: Plugin for NetworkOWL Intuition-pv sensor now available

Hy,
I must confess that I don't understand all what you say but thank you for the quick response.
Hugues

Posted on
Fri Dec 27, 2013 9:07 am
NickSmith offline
Posts: 32
Joined: Oct 28, 2012
Location: UK

Re: Plugin for NetworkOWL Intuition-pv sensor now available

Hi - ok, have rewritten the plugin to use native Python network libraries, rather than relying on Twisted so that it works properly on OS X 10.9 Mavericks. The latest version (1.3) is available at http://nickandmeryl.com/software/networkowl/. This version also introduces read-only support for the new Intuition-h heating and hot water controls (http://www.theowl.com/products/intuitionh.php): at some point I intend to extend the plugin to be able to control the thermostats as well as reading the current values.

Regards

Nick

Posted on
Fri Dec 27, 2013 9:14 am
hugues0509 offline
Posts: 6
Joined: May 17, 2013

Re: Plugin for NetworkOWL Intuition-pv sensor now available

Great !!
I 'll update it tonight.
Thank you for the work.

Who is online

Users browsing this forum: No registered users and 8 guests