I am getting a 'utf-8' codec can't decode byte - unexpected end of data error

Hi guys
restarted my emonpi (after over 3 months uptime) and noticed that one of my interfacer was throwing an error.

For context I am using a vedirect to usb interface for emonhub (written for the victron Battery Monitor (BMV 700)

The exact error I am getting from emonhun.log is
2020-07-26 03:59:03,559 ERROR VEDirectBMV 'utf-8' codec can't decode byte 0xda in position 0: unexpected end of data

My the emonhun interfacer and node configurations are

[[VEDirectBMV]]
    Type = EmonHubVEDirectInterfacer
    [[[init_settings]]]
        com_port = /dev/BMV0
        com_baud = 19200
        toextract = SOC,CE,TTG,V,I,Relay,Alarm,H1,H2,H3,H4,H5,H6,H7,H8,H9,H10,H11,H12,H17,H18,P,AR  
        poll_interval = 10 
    [[[runtimesettings]]]
        nodeoffset = 21 #make sure this matches with nodename below
        pubchannels = ToEmonCMS,
        subchannels = ToBMV,
        basetopic = emonhub/



[[21]]
    nodename = emonDC
#    firmware =V1_6_emonTxV3_4_DiscreteSampling
#    hardware = emonTx_(NodeID_DIP_Switch1:ON)
    [[[rx]]]
       names = SOC,CE,TTG,V,I,Relay,Alarm,H1,H2,H3,H4,H5,H6,H7,H8,H9,H10,H11,H12,H17,H18,P,AR
       datacode = 0
       scales = 0.1,1,1,0.001,1,1,1,0.001,1,0.001,1,1,0.001,0.001,0.001,1,1,1,0.001,0.001,1,1
       units =p,Ah,s,V,A,S,S 

when I run a screen to interface with the victron Bmv device directly, I get the following out put from the device (this is the output from the victron monitor directly:

PID 0x203
V 25159
I -9938
P -250
CE -23060
SOC 959
TTG 997
Alarm OFF
Relay ON
AR 0
BMV 700
FW 0310
Checksum z
H1 -233715
H2 -23531
H3 -105550
H4 74
H5 0
H6 -74944579
H7 12799
H8 32326
H9 50658
H10 930
H11 437
H12 1
H17 186278
H18 220913
Checksum

can anyone help what could be the issue? everyone worked fine before the restart and I have been using this configuration since December last year. It is what powers this dashboard Emoncms - dashboard view

I am using the EmonSD17Oct2019 image of emonpi on a rasberrypi 3B+

While Iā€™m afraid I cannot offer any useful help in resolving your issue, this does look related to some recent discussions around recent changes to OEM emonhub.

A forum search of ā€œcodec canā€™t decodeā€ currently turns up 2 other threads.

and thereā€™s this on github

Thanks for the pointers. I would follow the lead. I see that I fix has been released. I might not need to reinstall actually

1 Like

Eventually what solved this for me was to reflash the emonpi image to oct172019 and disable update. This issue was most likely a regression caused by some recent updates. since the older release was stable for me and the emonpi is in a private network behind a firewallā€¦ the principle of if it is not broken donā€™t fix it was used and everything is working fine now.

thumbsup