Marv2190 / venus.dbus-MqttToGridMeter

A service for Venus OS, reading smart meter data from a Fronius system and making the values available on dbus.
MIT License
22 stars 9 forks source link

Script Error Invalid Syntax #3

Closed 0NDevil closed 1 year ago

0NDevil commented 1 year ago

Hi, i installed the script but not working :(

root@raspberrypi2:/data/mqtttogrid# python /data/mqtttogrid/MQTTtoGridMeter.py Traceback (most recent call last): File "/data/mqtttogrid/MQTTtoGridMeter.py", line 33, in from vedbus import VeDbusService File "/data/mqtttogrid/vedbus.py", line 8 <!DOCTYPE html> ^ SyntaxError: invalid syntax

ok. my fault copy of "ve_utils.py" and "vedbus.py" was faulty.

Now the script run`s but i get no value in mqttMeter

Here is mqtt Messsage what i get with mqtt FX from the Tasmota SmartMeter: {"Time":"2022-12-24T14:29:58","SML":{"Power_cur":545.00,"Total_HT_in":2967.81,"Total_NT_in":2082.40,"Total_in":5050.21}}

i have the syntax "SML" in it (need it for Soyosource Controller) -is this a problem? My SmartMeter don`t show values for "total_out"

INFO:root:House Consumption: 0 ERROR:root:Programm MQTTtoMeter ist abgestuerzt. (on message Funkion) Traceback (most recent call last): File "/data/mqtttogrid/MQTTtoGridMeter.py", line 91, in on_message powercurr = float(jsonpayload["Zaehler"]["Power_curr"]) KeyError: 'Zaehler' 'Zaehler' Im MQTTtoMeter Programm ist etwas beim auslesen der Nachrichten schief gegangen

I hope someone could help me. (gerne auch auf Deutsch)

0NDevil commented 1 year ago

ok solved, i figured it out. Because the SML Object in my mqtt message / jsonpayload i have to edit the key ["Zaehler"] to ["SML"]

Now i have to find out how to modify tasmota to send every 2 or 3 second with my version tele period only 10sec.

Marv2190 commented 3 months ago

Just and little late add, in the Script use ",16", then it will send everytime new Data arrived.