-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data corrupted between MQTT and Jee Interfacers #80
Comments
Howdy folks, Thanks Derek for helping me solve the last part of the puzzle here. First, lets clarify how devices in the OEM infrastructure format packets they send and expect to receive. With that knowledge, the patch above isn't quite correct (in short it needs to start at data[0] which is the DEST address as intended - which Derek mentions is an extra byte, it's not... that's how OEM packets are formatted) and then needs to append 0s to the end of the payload which will be the serial string. @delboy711 - for your application you need to ensure you account for the extra 'first' byte which is the DEST address as described above. Correct code that works for emonHub 2021 is below
You will also need to make a one line change to EmonHubMqttInterfacer.py (line 263 - append .decode to payload = msg.payload)
Hope this helps someone, it certainly got my emonGLCD and other toys that rely on emonHub for RF sending working again. @glynhudson I'll submit a patch soon |
This is a blast from the past! Thanks for getting to the bottom of this one Alan. |
Fixed in main codebase, pull request submitted : |
I am sending transmit data via MQTT to a remote node. The data is a single value sent to Node 24.
The Jee interfacer passes the message apparently OK, but it gets transmitted to the wrong node ID, and the message is sent as 3 bytes instead of 2.
Log sequence is
MQTT Nodeid: 24 values: 1526
MQTT 9 Sent to channel' : ToRFM12
RFM2Pi 9 sent TX packet: 24,246,5,s
acknowledged command: > 24,246,5,0s
confirmed sent packet size: -> 3 b
The packet arrives at Node 5
The stanza in emonhub.conf for the node is
[[24]]
nodename = solar_EVSE
firmware =solar_EVSE
hardware = solar_EVSE
[[[tx]]]
names = dacsetpoint
units = C
scales = 1
datacode = h
I can get it working by patching EmonHubJeeInterfacer.py send() function
` def send (self, cargo):
`
The log sequence then looks like
MQTT Nodeid: 24 values: 1526
MQTT 23 Sent to channel' : ToRFM12
RFM2Pi 23 sent TX packet: 246,5,24s
RFM2Pi acknowledged command: > 246,5,24s
RFM2Pi confirmed sent packet size: -> 2 b
The node receives that OK
It is not clear to me if it is the MQTT Interfacer malforming the command, or the Jee Interfacer misreading it. If the latter, then here is the fix:-)
Thanks
Derek
The text was updated successfully, but these errors were encountered: