gluap / pyduofern

GNU General Public License v2.0
40 stars 11 forks source link

Adding "Duofern Umweltsensor 9475" und "Duofern Connect Aktor 9477" #16

Open tccflash opened 4 years ago

tccflash commented 4 years ago

Hi,

is there a possibility to add the Duofern Umweltsensor 9475 and the Duofern Connect Aktor 9477 to your plugin. Would be great to make automations directly in Hass/HA with the weather informations. Would be great to, I can close my Markise if it starts raining or its to much windy.

In the duofern.json I can see that the Umweltsensor and the Connect aktor are connected yet. Maybe there are only the configuration lost and it is easily for you!?

gluap commented 4 years ago

Hi, Unfortunately it is not just the configuration - The fact that they are showing up in the config shows that the code comes far enough to detect them. If you look at the code you will also find that it seems that there is code for the device: https://github.com/gluap/pyduofern/blob/fd734d39d9a93b7af2f44a42cff24720d784c97e/pyduofern/duofern.py#L608, so there's a chance that pyduofern may detect them. As far as I can thell though these lines have never been tested by anyone yet - I don't have them so I had to try and port them blindly from the FHEM Perl implementation. Furthermore homeassistant support would require to write several custom sensors (for Rain, Wind, Temperature, unsure what else comes out of the station).

Where are you experiencing the issue, are you trying to use the homeassistant custom component or the python module itsself?

If you are using the python interface could you send me a dump of your dufernstick.duofern_parser.modules dict? It would allow to judge whether there is meaningful data received from the weatherstation.

Cheers, Paul

tccflash commented 4 years ago

I trying to use the homeassistant custom component. I am very fresh in the homeassistant/Hass universe. I am coming from Fhem... But if I cant get the Umweltsensor in Hass, I have to use fhem for the future and made an MQTT Bridge for this... Its not much comfortable, but it works.

In the Hass Modul there is no parser modul right?

greating...

gluap commented 4 years ago

The "parser" module is used by the hass module but there is no easy way to get its contents.

But since you are using mqtt already I suggest you may want to watch progress on #13. That feature request is about adding a native MQTT bridge with homeassistant autoconfiguration for known devices. Writing the custom components is quite some overhead and only benefits homeassistant whereas an mqtt bridge would benefit arbitrary automation systems with mqtt capabilities and is actually way easier to implement. Once it is implemented one thing it will do is expose the full content of the data grasped from the parser - so it might already solve your problem.

Depending on how versed you are with git and pip you can already experiment with the bridge from the feature/mqtt branch, but it is in a very early stage.

Cheers, Paul

tccflash commented 4 years ago

Hi The mqtt Autodiscovery feature sounds great and I think it can work for me. I will follow issue #13. If it is released a easy to install update, I will make a test run... 👍

Greatings from Germany and Thx for this great script!