Completely rewritten using MQTT. MQTT is a great Technology - the new solution is much simpler then the previous - No need for complex JavaObjects / Inline Java / httpjobs as subscribe and publish messages handles the flow of data.
It also enables to build UI clients, e.g. for B4J and B4A with almost the same code.
The TinkerForge MQTT topics published, are converted and displayed on the TinkerForge LCD20x4 display and published to the Domoticz Server.
WeatherCubeOne2 in Action
For more information:
- Detailed description
- Project source code (well documented with hints on how to install MQTT and use with B4J, Lazarus or any other MQTT clients)
Download B4J Source Code
- Display Date & Time, Air Pressure, Temperature and Humidity on a TinkerForge LCD 20x4 display and on a Domoticz Client Browser.
- Display Trend (Arrow Up / Down) via Custom Characters
- The LCD 20x4 Display buttons function as 1 = Backlight On; 2 = Backlight Off; 3 = Show WeatherCubeOne Version; 4 = Shutdown the WeatherCubeOne.
- To obtain information send from the TinkerForge Bricklets subscribe to the Topics: weathercubeone/airpressure, weathercubeone/timestamp, weathercubeone/temperature or weathercubeone/humidity.
- To trigger an action on the WeatherCubeOne, following topics can be published: weathercubeone/backlighton, weathercubeone/backlightoff, weathercubeone/clear, weathercubeone/copyright, weathercubeone/close, weathercubeone/shutdown.
- Enables clients like B4J UI (example included), B4A (not ready), Lazarus UI (example included)
- But also any other MQTT client (Windows, Android, Apple) or own developments
- Improved Raspberry Pi memory usage
- Example Google Line Charts Temperature, Airpressure, Humidity updated via B4J server using MQTT
- Using TinkerForge Brick MQTT Proxy, B4X MQTT Client Library, Domoticz MQTT
It is also possible to subscribe or publish to the TinkerForge Master Brick or Bricklets or Domoticz topics. The payload has to be parsed with JSON. See the examples B4J & Lazarus MQTT client. To learn more, see the references listed below.
Google Line Charts [B4J Server]
Raspberry Pi 2 Model B v1.1, TinkerForge Master Brick (connected to the Raspberry Pi), Bricklets Temperature, Barometer, Humidity and LCD20x4
TinkerForge Brick MQTT Proxy, B4X jMQTT Client Library, Domoticz MQTT, Domoticz Home Automation Server, Software B4J Application WeatherCubeOne2 & WeatherCubeOneGoogleChart
- NEW:Add sensor Luminance.
- 20160628: Added Google Line Chart example using B4J server; B4J Ui Client improved; Raspberry Pi autostart improved (using cron jobs with scripts instead /etc/rc.local).
- 20160101: First draft published.