Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Now I was looking for similar problems on the forum, I found that adding time.sleep(2) before self.media.close() in close() method might helps. I check it on few runs and it seems to work fine now I have got DisconnectedRequest in the console but then the program ends and I can type another command in the console.
- Oo thank you, I didn't know about this way to save data.
- So is it possible to 'add' values to the whole object of 'data', 'register'...? If yes, how?
- Or I have to do this by selecting each OBIS code and then reading the value?
- I saw you add in another topic code to read each obis code like this:
- in ReadAll()
- it = GXDLMSRegister("1.1.1.8.1.255")
- # Read scaler and unit.
- self.read(it, 3)
- # Read value.
- self.read(it, 2)
- print( it.value)
- but running this I'm facing an error like this "TypeError: can only concatenate str (not "int") to str"
- Reading only one value as you show works for me fine, but I rather want to read more value in the program and has it as an output.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement