Protobuf encoder returns empty buffer payload (3)

I see there are two other topics on this issue but I'm still having trouble getting my message to encode.
As suggested by the first topic I tried nesting the payload inside another payload. Either way I still get an empty buffer.

[{"id":"42390cb95143b779","type":"encode","z":"d03c03b6d2f91f47","name":"Encode Config","protofile":"7c162e491502f623","protoType":"ProtoConfig","x":1060,"y":700,"wires":[["570252569051c5e8"]]},{"id":"77852e69f064eb7d","type":"inject","z":"d03c03b6d2f91f47","name":"","props":[{"p":"payload.request_device_info","v":"true","vt":"bool"},{"p":"payload.current_time","v":"","vt":"date"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":850,"y":700,"wires":[["42390cb95143b779","9697fbfc2a43d17d"]]},{"id":"570252569051c5e8","type":"debug","z":"d03c03b6d2f91f47","name":"debug 38","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1280,"y":700,"wires":[]},{"id":"9697fbfc2a43d17d","type":"debug","z":"d03c03b6d2f91f47","name":"debug 39","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1040,"y":760,"wires":[]},{"id":"7c162e491502f623","type":"protobuf-file","protopath":"/home/pi/Proto/proto_config.proto","watchFile":false,"keepCase":false}]

Proto file:
proto_config.proto

Can anyone point me in the right direction?
This is the proto file complied for python
proto_config_pb2.py
And the python code I'm trying to replicate is:

    def setTimestamp(self):
        # Serializing device config.
        device_config = proto_config_pb2.ProtoConfig()
        # Set request_device_info to true
        device_config.request_device_info = True
        # Sending current time to the sensor in order to synchronise its internal clock
        device_config.current_time = self.time
        return device_config.SerializeToString()

I think I got this working after enabling the "Keep snake_case (underscores)" :face_with_raised_eyebrow:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.