Setting registers in Epever controller with python
                
                    bobself                
                
                    Registered Users Posts: 1 ✭                
            
                        
            I have a Epever 40 amp charge controller and using python + minimalmodbus to communicate to it on the rs485 bus. I can read
all of the 100+ registers OK. I can set the 'battery type' to 'user'. I'm trying a test to set the boost reconnect voltage.
This is what I'm doing but, I'm getting an exception:
decimals = 0
val = instrument.read_register(0x900, decimals)          # 0x9000 is the battery type register
assert val == 0      # 0 means that battery type is 'user'
# try to set the boost reconnect voltage
decimals = 2
val = instrument.read_register(0x9009, decimals)         # returns 13.2 volts
instrument.debug = True
instrument.write_register(0x9009, 13.3, decimals)        # set to 13.3 volts
debug output:
MinimalModbus debug mode. Will write to instrument (expecting 8 bytes back): '\x01\x10\x90\t\x00\x01\x02\x052´E' (01 10 90 09 00 01 02 05 32 B4 45)
MinimalModbus debug mode. Clearing serial buffers for port /dev/ttyUSB0
MinimalModbus debug mode. Sleeping 0.80 ms before sending. Minimum silent period: 1.75 ms, time since read: 0.95 ms.
MinimalModbus debug mode. Response from instrument: '\x01\x90\x04MÃ' (01 90 04 4D C3) (5 bytes), roundtrip time: 500.7 ms. Timeout for reading: 500.0 ms.
exception:
   SlaveReportedException('Slave reported device failure')
Does anyone know what might be wrong?
thanks
Categories
- All Categories
 - 232 Forum & Website
 - 140 Solar Forum News and Announcements
 - 1.4K Solar News, Reviews, & Product Announcements
 - 199 Solar Information links & sources, event announcements
 - 899 Solar Product Reviews & Opinions
 - 256 Solar Skeptics, Hype, & Scams Corner
 - 22.5K Solar Electric Power, Wind Power & Balance of System
 - 3.5K General Solar Power Topics
 - 6.7K Solar Beginners Corner
 - 1K PV Installers Forum - NEC, Wiring, Installation
 - 2.1K Advanced Solar Electric Technical Forum
 - 5.6K Off Grid Solar & Battery Systems
 - 428 Caravan, Recreational Vehicle, and Marine Power Systems
 - 1.1K Grid Tie and Grid Interactive Systems
 - 656 Solar Water Pumping
 - 816 Wind Power Generation
 - 624 Energy Use & Conservation
 - 620 Discussion Forums/Café
 - 313 In the Weeds--Member's Choice
 - 75 Construction
 - 124 New Battery Technologies
 - 108 Old Battery Tech Discussions
 - 3.8K Solar News - Automatic Feed
 - 3.8K Solar Energy News RSS Feed