So everything looks pretty standard to me. What are you having problems with? Most of your work is going to be in masking bits to get the specified values you are interested in.
--
You received this message because you are subscribed to the Google Groups "pymodbus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pymodbus+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Very interested in this... But not sure how to get connection... Is ac-116 using modbus over ethernet or just a cat5 socket wired for rs485? Anyone know the pinouts?
I'm thinking of using a pi to interface... As lcd is powered from unit, any ideas if the raspberry pi could also be powered?
Cheers, Steve
Thanks for the document and pointer to a board to accept voltage and power the pi. It's the hardware side I'm most unfamiliar with. Telecoms software is my day job so currently learning the hardware.
Just to ensure I'm thinking the same... Rj45 plug on cat5e cable into the ac-116. Either port works with the lcd screen so I'm assuming that also uses modbus. The you split the rj45 into power pair for the strom2 board and where are you connecting the data io pairs?
Thanks,
Steve
Steve
#!/usr/bin/env python
import minimalmodbus
instrument = minimalmodbus.Instrument('/dev/ttyAMA0', 1) # port name, slave address (in decimal)
print "Start comtest\n";
## Read temperature (PV = ProcessValue) ##
temperature = instrument.read_register(?????, 1) # Registernumber, number of decimals
print "Get tempeture\n";
print "Value: " + temperature + "\n";
print "End comtest";
/*
* Wireless channels (Elements)
*/
var resp = executeCommandLine("/usr/share/openhab/configurations/scripts/ahc9000Func.py 1 2", 10000)
if(resp != null)
{
var String[] respParts = resp.split(",")
//logInfo("AHC9000", "Stue " + respParts.get(0))
Air_Temp_Livingroom.postUpdate(new DecimalType(respParts.get(0)))
Heating_Bat_Livingroom.postUpdate(new DecimalType(respParts.get(1)).intValue as Number)
}
/*
* Mode and setpoints (Packed data)
*/
resp = executeCommandLine("/usr/share/openhab/configurations/scripts/ahc9000Func.py 4 2", 10000)
if(resp != null)
{
var String[] respParts = resp.split(",")
Heating_Man_Livingroom.postUpdate(new DecimalType(respParts.get(0)))
//Heating_Hol_Livingroom.postUpdate(new DecimalType(respParts.get(1)))
//Heating_Stb_Livingroom.postUpdate(new DecimalType(respParts.get(2)))
Heating_Des_Livingroom.postUpdate(new DecimalType(respParts.get(3)))
/*if (respParts.get(4) == "True")
Heating_Sch_Livingroom.postUpdate(ON)
else
Heating_Sch_Livingroom.postUpdate(OFF)*/
//Heating_Mode_Livingroom.postUpdate(respParts.get(5))
}
/*
* Heating strings mode (Channels)
*/
resp = executeCommandLine("/usr/share/openhab/configurations/scripts/ahc9000Func.py 2 2", 10000)
if(resp != null)
{
var String[] respParts = resp.split(",")
if (respParts.get(0) == "True")
Heating_Flow_Livingroom.postUpdate(ON)
else
Heating_Flow_Livingroom.postUpdate(OFF)
}
/*
* Pump/heater relays (Relay)
*/
var String resp = executeCommandLine("/usr/share/openhab/configurations/scripts/ahc9000Func.py 3 0", 10000)
if(resp != null)
{
var String[] respParts = resp.split(",")
if (respParts.get(0) == "07")
Heating_Pump.postUpdate(ON)
else
Heating_Pump.postUpdate(OFF)
}