Open hartmood opened 4 years ago
Have you managed to build the JAR?
Change the properties file "UVOC.properties" to your environment and place it next to the jar.
Then launch the JAR from a command line like "java -jar uVOC.jar"
Unfortunately I am more a user / adaptor. So building a jar file is the first challenge. At least I have managed to have this running. https://www.hackster.io/damancuso/indoor-air-quality-monitor-b181e9 And Zigbee2mqtt / openHAB works great here. So Basics are done.
A very basic Installation guideline would help a lot to use your code.
Building is done via MAVEN.
I've added the V1.5 JARs to the bin directory.
Thanks a lot - I finally managed to compile a jar with dependencies with maven ("maven package") - how can I add the ttyACM0: on my raspberry to the Com Port?
Not tested, but I assume you should change this line in the properties file to:
UVOC.ComPort=/dev/ttyACM0
UVOC.ComPort=ttyACM0
works. You can use AUTO to detect the port.
Nevertheless I struggle to have it posted to openHAB as I am not really familiar with the mqtt syntax.
Thing topic AirQuality "AirQuality" @ "Dachgeschoss" { Channels: Type number : temperature "temperature" [ stateTopic = "dl2sba.de/sensorData/%d/%d/AirQuality/MQTT.sensor.temp.id=0" ] } Thing topic EG_WZ_THS "Wohnzimmer THS" @ "Wohnzimmer" { Channels: Type number : temperature "temperature" [ stateTopic = "zigbee2mqtt/EG_WZ_THS/temperature" ] Type number : humidity "humidity" [ stateTopic = "zigbee2mqtt/EG_WZ_THS/humidity" ] Type number : pressure "pressure" [ stateTopic = "zigbee2mqtt/EG_WZ_THS/pressure" ] Type number : voltage "voltage" [ stateTopic = "zigbee2mqtt/EG_WZ_THS/voltage" ] Type number : battery "battery" [ stateTopic = "zigbee2mqtt/EG_WZ_THS/battery" ] Type number : linkquality "linkquality" [ stateTopic = "zigbee2mqtt/EG_WZ_THS/linkquality" ] }
I have added a working zigbee2mqtt example - Dietmar, any idea? Another big thank you by the way.
AUTO - only a good idea if you have only one serial port ;-)
Sri, I do not know the openHAB syntax.
You can write you own "Publisher" use the sample class "SensorDataPublisher" as a template.
True, at least it helped to find the right port. And it is starting so far.
Runner.sleep=10
Runner.endWithLF=true
UVOC.ComPort=ttyACM0
UVOC.json=j
UVOC.datarate=4
MQTT.Password=openhabian
MQTT.Server=tcp\://192.168.179.100\:1883
MQTT.User=openhabian
MQTT.qos=1
MQTT.Topic=dl2sba.de/sensorData/%d/%d
MQTT.nodeId=9800
MQTT.sensor.temp.id=0
MQTT.sensor.humidity.id=1
MQTT.sensor.pressure.id=3
MQTT.sensor.gasResistance.id=4
MQTT.sensor.IAQ.id=5
MQTT.sensor.iaqAccuracy.id=6
i would expect to see some traffic with subscribing to /dl2sba.de/sensorData/9800/ or dl2sba.de/sensorData/9800/
But I receive no traffic.
You must subscribe to a specific sensor topic, i.e. "/dl2sba.de/sensorData/9800/0" for the temperature or to "/dl2sba.de/sensorData/9800/+" for all topics below 9800 ...
Thanks. It works now. The only thing I wonder why there is a delta between the IAQ I receive with your code compared to the value I have in my dashboard. IAQ: dl2sba: 58.5 IAQ dashbaord. 35
AAAAAAAAAA 11:31:05.694 [main] DEBUG UVOCReader processLine - response [{"temperature": 19.53, "pressure": 1023.12, "humidity": 40.31, "g
asResistance": 679079, "IAQ": 58.5, "iaqAccuracy": 1}]
All other values seem to be correct.
I use this python script to write to influxdb and use grafana for the dashboard. https://www.hackster.io/damancuso/indoor-air-quality-monitor-b181e9
Sorry, my fault. Port has changed.
Can you please give more information on how to install for the "not so savvy"?