I have some sensors that transmit their data by wifi. I’d like this data to feed an mqtt server. I have the ability to change the data formats accordingly
Having looked at code and doc I think this config would work.
[interfacers]
[[MQTT]]
Type = EmonHubMqttInterfacer
[[[init_settings]]]
mqtt_host = 127.0.0.1
mqtt_port = 1883
mqtt_user = emonpi
mqtt_passwd = emonpimqtt2023
[[[runtimesettings]]]
timestamped = True
subchannels = ToEmonCMS,
#pubchannels = emon/CHANNEL1, #data not going anywhere except mosquitto
[[mysocketlistener]]
Type = EmonHubSocketInterfacer
[[[init_settings]]]
port_nb = 8083
apikey = abcdef01abcdef01abcdef01abcdef01
url = 192.168.178.199
timestamped = True
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
[nodes]
[[27]]
nodename = WiFiPulseCountASHP
[[[rx]]]
names = Energy #pulses already converted to kWh
units = kWh
datacode = h
scale = 1
[[28]]
nodename = WiFiTempRoom
[[[rx]]]
names = Temperature
units = C
datacode = h
scale = 1
[[29]]
nodename = WifiTempOutside
[[[rx]]]
names = Temperature
units = C
datacode = h
scale = 1
Apart from whether this is a legal config I am thinking how to adjust / change the sensors to be compatible with this interfacer.
I think they can all transmit to the same IP and will be distinguished by their IDs
The data would be like this:
27 2023-03-03T16:00:05 abcdef01abcdef01abcdef01abcdef01 41233333
(the last item is 4-byte rep of 10.2}
Thx for any input on this.