Skip to content
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

tibber: raw meter data #1

Closed
disaster123 opened this issue Aug 27, 2023 · 9 comments
Closed

tibber: raw meter data #1

disaster123 opened this issue Aug 27, 2023 · 9 comments

Comments

@disaster123
Copy link

disaster123 commented Aug 27, 2023

Do you know what kind of meter data i need? my meter uses binary SML - does it really needs the binary data for tibber send?

@jsphuebner
Copy link
Owner

Yes I think in that case you send the raw binary data
I hope it's in the same MQTT topic as the ASCII data

@disaster123
Copy link
Author

i'm going to send it as hex... and see what happens - currently your tibbersend does not work for me - no idea why - it seems the connection to tibber mqtt does not work... but strangely the on_connect callback gets never called...

@disaster123
Copy link
Author

OK got the connection running but your script fails at:

localclient.subscribe(client.subscribe(config['meter']['rawtopic']))
DEBUG:__main__:Sending CONNECT (u0, p0, wr0, wq0, wf0, c1, k60) client_id=b'c4dee2d135a80'
DEBUG:__main__:Sending SUBSCRIBE (d0, m1) [(b'/sml2mqtt/stromzaehler/rawobis', 0)]
Traceback (most recent call last):
  File "tibbersend.py", line 89, in <module>
    localclient.subscribe(client.subscribe(config['meter']['rawtopic']))
  File "/usr/lib/python3/dist-packages/paho/mqtt/client.py", line 1504, in subscribe
    raise ValueError("No topic specified, or incorrect topic type.")
ValueError: No topic specified, or incorrect topic type.

i'm not sure what this should do - i tried:

localclient.subscribe(config['meter']['rawtopic'])

which results in continious publish of the obis data - but still no metering shown in tibber app

@disaster123
Copy link
Author

mhm no idea what kind of data or encoding tibber uses for the binary obis / sml. The http://tibber-host.fritz.box/data.json?node_id=1 shows me the binary data and i hoped they use that as well for mqtt - but i can't get it to run - tibber app does not react on your tibbersend script...

@disaster123
Copy link
Author

mhm those binary sml obis messages are endless strings and have markers in it where the next msg starts... but i've no idea what kind of msg tibber uses here and if it encodes those messages in some kind... like base64, hex, ... i tried severeal ones but none worked...

@disaster123
Copy link
Author

contains the rawtopic in your case the same data as in http://tibber-bridge/data.json?node_id=1 ? Or is it parsed in some kind?

@disaster123
Copy link
Author

OK got it working - you need to parse the binary data to the same obis format you mentioned and you have

@jsphuebner
Copy link
Owner

Sorry, I committed buggy source code there.
I reckon they send binary SML to some other topic then, maybe "sml_stream" instead of "obis_stream"
Glad it works now.

@mdkeil
Copy link

mdkeil commented Oct 31, 2023

@disaster123

#2 (comment)

for the binary sml-stream MQTT topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants