Skip to content

apulai/dsmrjav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

Goal

The goal of this repo is to allow easy testing of various fixes, for dsmr_parser/clients/protocol.py

When this file is used by an integration in HomeAssistant and the user is trying to parse an EON Hungary telegram the code raises an exception and dies. In fact EON Hungary is sending non-ascii charaters in it's telegram (0xff chars).

There are 4 different test fixes in this test repo:

  • use a try and a except block and in the except part encode and decode telegram with latin1 instead of ascii
  • use a try and pass block
  • use decode("ascii","ignore)
  • use decode("ascii","backslashreplace")

How to use

Start HomeAsssitant's web userinterface. Open AdvTerminal and SSH console on the web interface.

Then jump into the homeassistant container and clone this repo to /tmp. They copy on of the fixes to /usr/local/lib/python3.12/site-packages/dsmr_parser/clients/.

docker ps
# You might need to disable protected mode
docker exec -it homeassistant /bin/bash  (csak egyszer)
cd /tmp
git clone https://github.com/apulai/dsmrjav (csak egyszer)
cd  /usr/local/lib/python3.13/site-packages/dsmr_parser/clients/
cp protocol.py protocol.py.orig
--
ls (könyvtár tartalam)
cd (váltás könyvtárak között)
cp (másolás)
  
cd  /usr/local/lib/python3.13/site-packages/dsmr_parser/clients/

cp /tmp/dsmrjav/clients/protocol.jav_pass.py protocol.py
or
cp /tmp/dsmrjav/clients/protocol.jav_w2latin1.py protocol.py
or
cp /tmp/dsmrjav/clients/protocol.jav_wbsr.py protocol.py
or
cp /tmp/dsmrjav/clients/protocol.jav_ignore.py protocol.py`

Happy testing

About

dsmr parser test modifications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages