Topic-icon Raspi4PHC

Mehr
07 Apr 2017 11:19 #76 von simonjo
simonjo antwortete auf Raspi4PHC
The -remmode just selects how to communicate with the STM, in case of 1 (xmlrpc) we use an xml encoded protocol, in case of 0 we use a binary encoded protocol.

You can get status info from modules in both remmode 0 or 1, but a user has to start the request via xWRC to the STM.


With the STM notification mechanism, you first tell the STM for which modules you want to be informed of changes, then when changes take place (i.e. press input button) the STM will send a message to an external party (i.e. the PEHA visualisation) to report this.

This mode requires the receiving party to ack each notification and also handle periodic keep alive messages. I have done some testing on the older STMv1/v2 but it was not stable.

For now I am occupied till the end of april with some renovation activities @home, but after that I want to continue with my MQTT gateway for the PHC module bus. That gateway will replace the STM and allows sending commands to modules via MQTT, at the same time it will forward all events from modules (like pressing inputs) over MQTT to a broker. This can be combined with OpenHab or the similar to integrate and cover additional logic.

Jo

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
07 Apr 2017 11:42 #77 von Ricotchet
Ricotchet antwortete auf Raspi4PHC

The -remmode just selects how to communicate with the STM, in case of 1 (xmlrpc) we use an xml encoded protocol, in case of 0 we use a binary encoded protocol.

You can get status info from modules in both remmode 0 or 1, but a user has to start the request via xWRC to the STM.


With the STM notification mechanism, you first tell the STM for which modules you want to be informed of changes, then when changes take place (i.e. press input button) the STM will send a message to an external party (i.e. the PEHA visualisation) to report this.

This mode requires the receiving party to ack each notification and also handle periodic keep alive messages. I have done some testing on the older STMv1/v2 but it was not stable.

For now I am occupied till the end of april with some renovation activities @home, but after that I want to continue with my MQTT gateway for the PHC module bus. That gateway will replace the STM and allows sending commands to modules via MQTT, at the same time it will forward all events from modules (like pressing inputs) over MQTT to a broker. This can be combined with OpenHab or the similar to integrate and cover additional logic.

Jo


thx for the fast answer

The MQTT gateway is a great news you will make many people happy.
Will there be a a way to use both an STM and MQTTgateway/openhab or will it replace the STM?
from my view it will be nice to have a redundancy.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
31 Mai 2017 21:54 #78 von simonjo
simonjo antwortete auf Raspi4PHC
Hi there,

In the meantime I have a working prototype of the MQTT gateway.

The main problem so far was finding a reliable RS485 convertor, for now I am able to use a (cheap) USB-2-RS485 stick and the (expensive) Moxa NPort5150 in RS485 mode. Although I am not yet convinced of the cheap USB stick (need to order some more to check if all of them work ok).

In attached picture you will see 3 OpenHc output modules and 1 UEM input module together with a 24V power supply on the top.

On the right side you see a Raspi with the USB-2-RS485 stick that runs the MQTT gateway. In fact this application is called xstmd, and can be programmed from the PEHA v3.x.y system software where it will report itself as version 3.3.3. For now the internal logic is not yet working as I need to figure out ALL internal commands. But I use it to decode all module commands to learn from, trial and error...

On the left side you see a Raspi that runs the OpenHab 1.8.0, this can be on the same Raspi offcourse, but I had it lying around from another project @work.

The MQTT broker is running on my central NAS (Synology DS212j).


At this moment I am playing with OpenHab as control logic to replace the STM fully. But unlike the grapical PEHA v3 software you need to configure everything by hand which is a lot of work.

What is working is an input button event that triggers a rule which controls an output. The output feedback keeps the OpenHab UI up to date. Now need to work on commands in OpenHab to trigger the rules.
Anhänge:
Folgende Benutzer bedankten sich: Ricotchet

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
31 Mai 2017 22:58 #79 von Ricotchet
Ricotchet antwortete auf Raspi4PHC
Great News keep going,
If you need some people for testing im your guy.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Powered by Kunena Forum