Nyheder:

Følg NBE Production A/S på
Facebook, se hvad vi laver :-)

Hovedmenu

integration med hass.io

Startet af zune, Apr 15, 2020, 02:03

0 Brugere og 1 Gæst læser dette emne.

zune

Det kunne være super fedt hvis styringen kunne ekponere "sensore" og "switches" ud mod eks, en mqtt eller noget i den dur således at man kunne trække dem ind i hass.io eller endnu bedre lavede en rigtig integration med systemet :D
110 kvm 2 etager.

10kw v13 BS20
100L ældre Metro combi VVB.
6-8 ton forbrug
http://www.stokercloud.dk/dev/30221.html

motoz

Bio Comfort 30kW, compressor cleaning, lambda. Termax 25cr boiler. Matene vertical pellet conveyor. PellMon open source pellet logger: https://github.com/motoz/PellMon

John Doe

Citat fra: motoz Dato Maj 13, 2020, 17:24
It can...

Motoz could you be helpful in telling us how to? And is it possible without pellmon?

motoz

Sorry about that... No, the controller can't do it directly. It speaks two protocols (as far as I know of), the homegrown UDP based (server) and http (client, for stokercloud). The only ready made solution to bridge from the UDP protocol to MQTT that I know of is pellmon + pellmonmqtt, but there could be others. This combination gives you access to all measurement values and all settings. The openhab binding + openhab + somethingmqtt might work also, I don't know. There has been very little interest in pellmonmqtt so I never made an installer for it. It's just one python script though, so there isn't much to install. You have to make it start on boot however.
Bio Comfort 30kW, compressor cleaning, lambda. Termax 25cr boiler. Matene vertical pellet conveyor. PellMon open source pellet logger: https://github.com/motoz/PellMon

John Doe

Citat fra: motoz Dato Okt 22, 2020, 16:54
Sorry about that... No, the controller can't do it directly. It speaks two protocols (as far as I know of), the homegrown UDP based (server) and http (client, for stokercloud). The only ready made solution to bridge from the UDP protocol to MQTT that I know of is pellmon + pellmonmqtt, but there could be others. This combination gives you access to all measurement values and all settings. The openhab binding + openhab + somethingmqtt might work also, I don't know. There has been very little interest in pellmonmqtt so I never made an installer for it. It's just one python script though, so there isn't much to install. You have to make it start on boot however.

But Pellmon is to be installed on another RPi? I suppose that you can't run it alongside with Home Assistant.

martinnygaard

I am very interesten in getting a HA integration for a NBE v13 board.

This guy made a integration for OpenHAB, but not sure how easy it will be converting it for HA.
http://www.stokerforum.dk/index.php?topic=9949.0

I really hope it's possible!

motoz

#6
I don't see why you couldn't run PellMon and PellmonMQTT together with Home Assistant on the same rpi. Do you think of some specific reason?
Bio Comfort 30kW, compressor cleaning, lambda. Termax 25cr boiler. Matene vertical pellet conveyor. PellMon open source pellet logger: https://github.com/motoz/PellMon

motoz

Here is another OpenHAB binding, open source this time https://github.com/Freezerz/openhab-addons/tree/pelletburnermonitor

But if you want to code up a Home Assistant integration then the NBECom pellmon plugin is probably a better starting point since both are coded in the same language.
Bio Comfort 30kW, compressor cleaning, lambda. Termax 25cr boiler. Matene vertical pellet conveyor. PellMon open source pellet logger: https://github.com/motoz/PellMon

John Doe

Citat fra: motoz Dato Okt 23, 2020, 09:06
I don't see why you couldn't run PellMon and PellmonMQTT together with Home Assistant on the same rpi. Do you think of some specific reason?

The Raspberry Pi is installed with the Home Assistant OS, and is not accessible in any other way than through HA. How would you install another program, without mentioning a broker?

motoz

Citat
The Raspberry Pi is installed with the Home Assistant OS,
I see. Of course if you start with an OS purpose build to run only one application then it's going to be hard/impossible to do anything else. Home assistant however is (just like pellmon) nothing more than a bunch of python scripts, so nothing prevents you from starting with a general purpose OS instead and install everything that you need on the same computer. Including the broker, of course. If you want to keep the HA OS, then an extra raspberry zero for the broker and pellmon isn't exactly expensive.
Bio Comfort 30kW, compressor cleaning, lambda. Termax 25cr boiler. Matene vertical pellet conveyor. PellMon open source pellet logger: https://github.com/motoz/PellMon

John Doe

Citat fra: motoz Dato Okt 25, 2020, 12:18
Citat
The Raspberry Pi is installed with the Home Assistant OS,
I see. Of course if you start with an OS purpose build to run only one application then it's going to be hard/impossible to do anything else. Home assistant however is (just like pellmon) nothing more than a bunch of python scripts, so nothing prevents you from starting with a general purpose OS instead and install everything that you need on the same computer. Including the broker, of course. If you want to keep the HA OS, then an extra raspberry zero for the broker and pellmon isn't exactly expensive.

Well, I guess not...  :D

Jre

Citat fra: John Doe Dato Okt 25, 2020, 07:37
Citat fra: motoz Dato Okt 23, 2020, 09:06
I don't see why you couldn't run PellMon and PellmonMQTT together with Home Assistant on the same rpi. Do you think of some specific reason?

The Raspberry Pi is installed with the Home Assistant OS, and is not accessible in any other way than through HA. How would you install another program, without mentioning a broker?

That is not entirely true.  It is true that the HassOS is build for running HA, but it is still a Linux distro that is just made inaccessible for the user (e.g., ssh to the host os is disabled), as stuff should be running in containers, which makes the OS installation independent and easy to upgrade without breaking any add-ons.

I haven't spent any time reading up on integrations, but a quick glance suggests that they are just python3 code.  So unless Pellmon uses anything else than python for fetching and/or setting values in the controller then it should be fairly straight forward to wrap it and expose directly.

Another alternative could be to just wrap the pellmon software in a container and expose it as an add-on, however that would not integrate the values directly to HA.  Then you would need the pellmon-mqtt, and then connect that to your HA's mqtt broker, i guess?

Jre

In fact this link would suggest that it is actually a requirement to use a third party library for the actual device coms, when creating an integration in HA: https://developers.home-assistant.io/docs/creating_platform_index#interfacing-with-devices
It just needs to be available at PyPi, which doesn't seem to be the case right now (but could easily be done).

Ah any listed requirements is just passed along to pip so a git+https:// urls is possible, thus no PyPi is strictly needed: https://developers.home-assistant.io/docs/creating_integration_manifest#custom-requirements-during-development--testing

It even seems possible to implement either pulling or pushing of new values to HA: https://developers.home-assistant.io/docs/core/entity/#updating-the-entity
If the values very only published by mqtt, you could even auto discover them: https://developers.home-assistant.io/docs/creating_integration_manifest#mqtt
However I guess it would be cleaner to expose entities directly, and then use the HA mqtt broker/node-red to export any values if you really need them externally, as you most likely just want the values inside HA and no where else?


John Doe

@Jre it would be very nice to have the values exposed to HA as entities, even if they're not editable. But I'm not a programmer. At all. I would'nt have the slightest idea on how to do it!

motoz

The PellMon plugin for V7/13 burners  is called NBEcom, it uses the NBEprotocol python module for communicating with the burner. It's a pure python module, but like the rest of PellMon it's python 2, not python3: https://github.com/motoz/PellMon/tree/master/src/Pellmonsrv/plugins/nbecom/nbeprotocol

It should be straightforward to port this python3 and make something for HA out of it. Doing it this way you will not get access to everything else that PellMon provides besides access to the basicburner settings, but nothing prevents running several clients with the burner controller at the same time so pellmon can very well exist side by side with an HA integration and the official android app. I will of course try to support any effort made to make an HA integration out of the NBEprotocol, but myself I don't really understand the point... Maybe someone could change my mind... :-)

Bio Comfort 30kW, compressor cleaning, lambda. Termax 25cr boiler. Matene vertical pellet conveyor. PellMon open source pellet logger: https://github.com/motoz/PellMon