Installed the Modbus plugin and created a Modbus RTU master: I installed the Modbus plugin in Nymea and created a Modbus RTU master. The master shows âconnectedâ in the interface.
Added an input register: I tried adding an input register for the SenseAir S8 to Nymea, using multiple slave addresses and register addresses that I found in the documentation (https://www.driesen-kern.de/downloads/ba-senseair-s8-modbus.pdf). For example, I tried using slave address 2 and register address 68, as well as slave address 0 and register address 44. However, the input register remains in the âThing is not connectedâ state.
Do you have any ideas on how to fix this issue and successfully connect the SenseAir S8 to the Nymea system using Modbus?
Iâm not sure if I understood correctly what you did in steps 2 and 3, but let me try to sum up what I believe the steps to get this working should be:
Set up a modbus RTU master in Main Menu â System Settings â Modbus RTU. Use a baud rate of 9600, 8 Bits, No parity bit and 1 stop bit as per documentation in 2.1. Byte format. If it shows connected it means that it could at least open the Serial Port properly. Unfortunately Modbus RTU doesnât have any mechanism in place to verify if the serial port settings are correct and communication is working properly without actually giving a slave ID and register to read.
So the next step would be to install the nymea-plugin-modbuscommander. I believe thatâs what you mean when you say you installed the modbus plugin. If not, install that one.
Then go to Main Menu â Configure things and click the + to add a new thing. Select the Modbus RTU client to connect to the bus created by the Modbus RTU master youâve created in step 1.
Add another thing, this time a Input register. Use slave address 254 and register address 3, at least thatâs how I understand the documentation. Iâve obtained those values from page 13 in the section CO2 read sequence.
Right⊠States are not logged by default to spare some data in the log db. nymea:core does support configuring this per state but the app does not implement that setting at this point.
However, what Iâd suggest you to do would be to install nymea-plugin-genericsensors and add a generic co2 sensor thing. Then create a script (in magic) that maps the value from the modbus register to the sensor value. Something like this:
Item {
ThingState {
id: modbusRegister
thingId: "...." // the input register thing id, use autocompletion in the script editor
stateName: "value"
}
ThingState {
thingId: "..." // the generic co2 sensor thing id
stateName: "input"
value: modbusRegister.value / 2000 // the input of the generic co2 sensor thing expects input of 0 - 1, within a range of 0-2000ppm. Adjust this if you change the max in the thing settings.
}
}
Itâs in the experimental repository now.
Installing that would allow removing all the stuff you did (except the RTU master which is still needed) and just add one thing and everything should work as expected
Please be so kind and set up an experimental installation and give this a test so we can include it in the next release.
I installed the plugin from the experimental repo. But when searching for it in âconfigure thingsâ it does not show up in the list. Also a reboot didnât solve this.
The plugin API version changed in experimental. Youâd need to install the entire nymea stack from experimental as the older stable nymead canât load the newer plugins yet.