ah, ok. I misunderstood what you were looking for.
I use my btmon.py configuration to map from the physical Device/ChannelId of the GEM/ECM-1240, such as 01099999_ch1_w
, into a set of logical names for the various time-series.
These names all have a common prefix (mqtt_base_topic
) of “house
” and all live in a btmon.py configuration file section that looks like the example below.
Other parts of this btmon.py configuration are used to push my Solar data to PVO and, at one point, I was pushing to SEG.
Anyhoo, when this is run the topic names are mapped before the data is published. Without a map, the default behavior is it construct the topic-name using the mqtt_base_topic
, the Brultech DeviceId and the ChannelId.
Incoming value that might otherwise default to:
house/01099999_volts
house/01099999_ch1_w
when mapped, it’ll come out with topic names more like:
house/volts/volts
house/power/bath
This will (hopefully) let me sub-out the source with another if I need to change out a device down the line.
Overall, that part of the btmon.py config looks like:
[mqtt]
mqtt_out = true
mqtt_upload_period = 30
mqtt_host = yourMQTTHostHere
mqtt_base_topic=house
mqtt_user = yourAccountHere
mqtt_passwd = yourPasswdHere
mqtt_map = 01099999_volts,volts/volts,01099999_ch1_w,power/bath,01099999_ch2_w,power/upstairs_hall,01099999_ch3_w,power/hood,01099999_ch4_w,powe
r/furnace,01099999_ch5_w,power/master_bath,01099999_ch7_w,power/dryer,01099999_ch8_w,power/mains,01099999_ch9_w,power/disposal,01099999_ch10_w,p
ower/dishwasher,01099999_ch11_w,power/living,01099999_ch12_w,power/family,01099999_ch13_w,power/garage,01099999_ch14_w,power/solar,01099999_ch15
_w,power/unused15,01099999_ch16_w,power/unused16,01099999_ch17_w,power/kitchen_lights,01099999_ch18_w,power/sunpower,01099999_ch19_w,power/garag
e_lights,01099999_ch20_w,power/stairs,01099999_ch21_w,power/bedroom23,01099999_ch22_w,power/master,01099999_ch23_w,power/laundry,01099999_ch24_w
,power/microwave,01099999_ch25_w,power/kitchen_island,01099999_ch26_w,power/wine_fridge,01099999_ch27_w,power/main_fridge,01099999_ch28_w,power/
kitchen_outlets,01099999_ch29_w,power/unused29,01099999_ch1_wh,energy_total/bath,01099999_ch2_wh,energy_total/upstairs_hall,01099999_ch3_wh,...
My “mqtt_map
” section is a lot longer, so I’ve clipped it so it’ll display well.