sky201503 / openhab

Automatically exported from code.google.com/p/openhab
GNU General Public License v3.0
0 stars 0 forks source link

Implement support for AVM Home Automation devices #296

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
AVM has introduced new smart home devices that can be remotely controlled 
through a Fritz!Box router.
An HTTP-based API is available for integration with other systems.

These devices are:
FRITZ!DECT 200 (see 
http://www.avm.de/de/Presse/Informationen/2013/2013_01_10_2.php3)
FRITZ!Powerline 546E 
(http://www.avm.de/de/Presse/Informationen/2013/2013_02_15.php3)

Both can be integrated as a Switch item in openHAB. Additionally, they provide 
information about the current power and a counter for the consumption.

Original issue reported on code.google.com by kai.openhab on 12 May 2013 at 12:06

GoogleCodeExporter commented 8 years ago
We are currently implementing a binding using the HTTP API in our student 
project group at TU Dortmund University. Switching is already working, the 
metering might still take some time.

Original comment by smarthom...@gmail.com on 11 Jul 2013 at 8:16

GoogleCodeExporter commented 8 years ago
Very cool! Is there already any code that you could share as I would like to 
test it with my own AVM AHA devices?

Original comment by kai.openhab on 11 Jul 2013 at 8:26

GoogleCodeExporter commented 8 years ago
We have not set up a repository yet, but I will let you know when something is 
up for testing.

Original comment by smarthom...@gmail.com on 11 Jul 2013 at 8:37

GoogleCodeExporter commented 8 years ago
Hi,

+1 very cool!

On the occasion of another binding being implemented we really encourage you to 
integrate/provide the source as early as possible. This will save a lot of time 
when it's coming to the review. You could use your server clone as (master) 
repository.

If there are any questions regarding openHAB in 
general/Architecture/Bindings/etc please do not hesitate to contact us.

Regards,

Thomas E.-E.

Original comment by teichsta on 11 Jul 2013 at 9:02

GoogleCodeExporter commented 8 years ago
We have created a clone repository on Google Code under this new name. The 
binding is called fritzaha and is available at
http://code.google.com/r/pgshtudo-openhab/
including documentation on how to configure the binding.

Original comment by pgsh.tudo on 12 Jul 2013 at 9:45

GoogleCodeExporter commented 8 years ago
brilliant, thanks a lot!

Original comment by teichsta on 12 Jul 2013 at 9:58

GoogleCodeExporter commented 8 years ago
Thanks, here are my first review comments (a few more to come):

General:
- Remove Maven nature from project (dependencies should be resolved through PDE)
- Please add individual persons as @author tags in the JavaDoc of the classes, 
not the research group.

FritzahaBindingProvider:
- getDeviceConfig() seems to be unused (and I cannot see the reason for it) -> 
should be removed

FritzahaGenericBindingProvider:
- organize imports (many unused imports in there)
- class should also implement BindingConfigReader interface

FritzahaBinding:
- organize imports (many unused imports in there)
- update JavaDoc of class (currently it contains a default text)
- remove (commented) field and method isProperlyConfigured
- remove comment around constructor and activate and deactivate method
- in internalReceiveCommand() if(command instanceof OnOffType) you could add an 
else branch with at least some debug logging to say that an unsupported command 
was received
- remove all commented content of internalReceiveUpdate
- implement the method providesBindingFor
- l. 290: remove activeService.activate()
- l. 305: connection should be removed from HostConfig (a connection simply 
does not belong into a configuration - rather the other way round...)

Original comment by kai.openhab on 26 Aug 2013 at 6:21

GoogleCodeExporter commented 8 years ago
And here is the further feedback:

General:
- add proper exception handling everywhere where there is still an 
e.printStackTrace() in a catch block

FritzahaWebInterface:
- "0000000000000000" should be replaced by a constant - but shouldn't it in 
general replaced by null?
- getURL(String path, String args) duplicates code. It should call 
getURL(String path) and apend the args to it

FritzahaQueryscriptUpdateNumberCallback:
- l.118: Don't use double here. only set the scale factor in the switch as an 
int (100/1000/10000) and then calculate the result as a BigDecimal in new 
DecimalType().

FritzahaWebserviceUpdateNumberCallback
- l.85: same as above

Original comment by kai.openhab on 27 Aug 2013 at 9:12

GoogleCodeExporter commented 8 years ago
Pushed with changeset 
https://code.google.com/p/openhab/source/detail?r=a292b3dd0edf57b43ac70964e2cf79
fbb3aeb5cf
Big thanks to Christian for this contribution!

Original comment by kai.openhab on 30 Aug 2013 at 1:18