Ixtalo / SmlMqttProcessor

Process Smart Message Language (SML) messages of power smart meters (using an IR sensor and libsml) and send them as MQTT messages.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for two USB IR Dongels

m-reuter opened this issue · comments

Hi @Ixtalo ,
thanks for your great work. I wonder if this can work also with two IR adapters that are attached via USB (tty) ? Currently I am using vzlogger -> MQTT but have a few issues (it looses connection regularly and has a lot of build dependencies that I don't need).
Would like to read information from the two devices at the same time and pass to different MQTT sub-topics.
Thanks

Yes, two readers works by simply starting two processes independently.

The important factor is that each reader has its own serial device, e.g. ttyAMA0 and ttyAMA1.

  1. ./sml_server_time/sml_server_time /dev/ttyAMA0 | python smltextmqttprocessor.py --config config.sensor1.ini -
  2. ./sml_server_time/sml_server_time /dev/ttyAMA1 | python smltextmqttprocessor.py --config config.sensor2.ini -

config.sensor1.ini

...
topic_prefix=tele/smartmeter/sensor1
...

config.sensor2.ini:

...
topic_prefix=tele/smartmeter/sensor2
...

Seems solved.