Advertisement
Guest User

question

a guest
Oct 26th, 2020
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. 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.
  2.  
  3. Oo thank you, I didn't know about this way to save data.
  4.  
  5. So is it possible to 'add' values to the whole object of 'data', 'register'...? If yes, how?
  6. Or I have to do this by selecting each OBIS code and then reading the value?
  7. I saw you add in another topic code to read each obis code like this:
  8. in ReadAll()
  9. it = GXDLMSRegister("1.1.1.8.1.255")
  10. # Read scaler and unit.
  11. self.read(it, 3)
  12. # Read value.
  13. self.read(it, 2)
  14. print( it.value)
  15. but running this I'm facing an error like this "TypeError: can only concatenate str (not "int") to str"
  16.  
  17. 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.
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement