sburke781 / hubitat Goto Github PK
View Code? Open in Web Editor NEWHubitat apps and device drivers
Hubitat apps and device drivers
As a user of the PC Virtual Motion Sensor I want the logs kept in check, keeping them as small as is necessary to support the motion sensor.
As an owner of a Mitsubishi Air Conditioner I want to be able to control my Air Conditioner from my Hubitat hub so I can control my air conditioner within various Hubitat apps and rules.
Include calls to:
@mikkomattip reported an issue with the display of the thermostat mode in a dashboard showing as off:
In x period of time on dashboard thermostat goes offline.
All I have to do is set mode to something and in a second it shows the correct mode and temperature.
As an owner of a Mitsubishi Electric Air Conditioner in the US I would like to control my air conditioner without the need to use IFTTT so that I don't need to pay a monthly subscription for IFTTT.
As a user of MEL A/C's in the United States I want to have temperature readings available in Fahrenheit so I can work with the same units as other local devices and services.
Develop a Hubitat driver to read Logitech G-Hub linked device battery readings from LGS Tray Battery - GHUB by Andy Vorld (https://github.com/andyvorld/LGSTrayBattery_GHUB), making the battery readings available as a battery sensor device in Hubitat.
As someone who is interested in the electricity used by my house, I want to know when my air conditioner is using electricity, in particular when the compressor is running, so that I can plot this against other power usage information for my household.
Can't set correct temps in F
Current States
CanCool : true
CanDry : true
CanHeat : true
HasAutomaticFanSpeed : false
MaxTempAuto : 32
MaxTempCool : 32
MaxTempDry : 32
MaxTempHeat : 32
MinTempAuto : 32
MinTempCool : 32
MinTempDry : 32
MinTempHeat : 32
NumberOfFanSpeeds : 5
coolingSetpoint : 72.0
heatingSetpoint : 87.8
lastCommandUTC : 2022-11-24 15:39:32.979Z
lastRunningMode : heat
speed : auto
supportedThermostatFanModes : ["Off", "1", "2", "3", "4", "5", "On"]
supportedThermostatModes : ["heat", "cool", "dry", "fan", "off"]
temperature : 77.9
thermostatFanMode : auto
thermostatMode : heat
thermostatOperatingState : heating
thermostatSetpoint : 87.8
Looks like min max fields are interfering:
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:02.023 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)setTemperature: Temperature adjusted to 32.0 for Salon AC
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:02.015 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)setTemperature_KumoCloud: Unit Command submitted
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:02.008 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)unitCommand: Initial data returned from unitCommand: [true, null, [[9934P008M100125F, 2253895757941193]]], response received 2022-11-24 15:44:01.999Z
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:01.566 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)unitCommand_KumoCloud: Body of command = ["314bb30643c955d11e1e39909bcebe70",{"9934P008M100125F":{"spHeat":0.0}}]
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:01.550 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)setTemperature_KumoCloud: Body JSON = {"spHeat":0.0}
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:01.540 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)setTemperature: Set Temperature Provided = 32.0, converted to 0 for KumoCloud
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:01.522 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)adjustHeatingSetpoint: Current heatingSetpoint 32.0, Current ThermostatSetpoint = 32.0, New heatingSetpoint = 32.0
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:01.514 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)adjustSetTemperature: Heating mode detected, adjusting heating set point
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:01.507 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)adjustSetTemperature: Current mode is heat
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:01.498 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)adjustSetTemperature: Changing Set Temperature from 87.8 to 32.0
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:01.491 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)adjustSetTemperature: Temperature passed in was 32 which was parsed as 32.0, current set temperature is 87.8
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:01.483 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)setTemperature: Setting Temperature to 32.0 for Salon AC
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:01.476 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)setTemperature: givenSetTemp = 32, currentThermSetTempValue = 87.8
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:01.455 AM[info](https://hubitat/logs?tab=past&deviceId=780#)Heating Set Point adjusted to 32.0 for Salon AC
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:01.447 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)adjustHeatingSetpoint: Current heatingSetpoint 87.8, Current ThermostatSetpoint = 87.8, New heatingSetpoint = 32.0
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:01.439 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)setHeatingSetpoint: Corrected Temp = 32
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:01.433 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)setHeatingSetpoint: Temperature selected = 60, corrected to maximum heating set point 32
[dev:780](https://hubitat/logs?tab=past&deviceId=780#)2022-11-24 10:44:01.425 AM[debug](https://hubitat/logs?tab=past&deviceId=780#)setHeatingSetpoint: Setting Heating Set Point to 60, current minimum 32, current maximum 32
also noticed this little tidbit:
[dev:780]2022-11-24 10:37:17.748 AM[error]retrieveUnitSettings_KumoCloud : Unable to query Mitsubishi Electric KumoCloud: java.lang.NullPointerException: Cannot get property 'min_setpoint' on null object
Expand the Unified Thermostat Drivers to include local control of air conditioning units, removing the reliance on the cloud services.
As a developer and user of the MEL drivers I want to make using of the Package Manager utility so that the drivers are more easily installed and updated by end-users.
Notes: Package Manager was developed by @dman2306 on the Hubitat Community Forum, see this post
Development:
Testing:
Deployment:
From @Jasper on HE forum:
"parent.getAuthCode returns null right after creation"
He also mentioned that in the setup notes the instruction to refresh handles this. It would be nice to handle this more elegantly. Need to analyse this in a little more detail to flesh out exactly what is happening.
Handling when the Logitech device is turned off or not connected to the PC, which results in 'NaN' being returned, currently producing a warning message in the logs each time a poll is performed. Will update the driver to not attempt to convert this to a decimal and will not call the battery sensor device to update the battery level.
As part of preparing Hubitat drivers for inclusion in Package Manager, split existing drivers into separate folders so that the code is more organised
Add a Preference Setting to allows user to enable or disable the sending of unit commands to change the state of their air conditioner. Can be useful during testing or for those users who only need or want to see the status of their A/C unit and don't want users to adjust settings.
As a developer of HE drivers for Mitsubishi Electric Air Conditioners, I would like to incorporate the integration with the MELView system with other MEL platforms like MELCloud in Europe and Kumo Cloud in the US.
As a user of the MELCloud drivers I want to know how to install the drivers and setup my Air Conditioner in Hubitat so I can control my A/C using my HE hub.
Documentation:
Expand documentation covered in the ReadMe.md file, including:
Completing notes relating to general setup of new A/C devices
Explanation of preferences relating to scheduling of status updates
Documenting setting for adjusting Fan Mode representation to be text or numbers
Explaining how to use logging settings to increase or decrease levels of logging being captured
As a user of a Mitsubishi Electric Air Conditioner on the Kumo Cloud platform, I want to be able to see and make use of basic status information about my air conditioner so I can review its current state and make use of details in various rules.
Read other basic status info such as
As an owner of a ducted Mitsubishi Air Conditioner I would like the ability to turn different zones in my house on and off through my HE hub so that I can achieve desired comfort levels and efficiency using my preferred automation system.
In addition to the periodic check for user input, develop a method to detect when a PC is about to be shut down and to then send an inactive status to the Hubitat hub.
See https://community.hubitat.com/t/release-pc-motion-sensor/60211/13?u=sburke781
Reported By: @Mikkomattip on Hubitat community forum post and by @zimba during testing
Description: When I change the temperature the physical device goes off
Notes:
https://github.com/freddiemc88/Control-MELCloudDevice/blob/master/Set-MELCloudDevice.psm1
https://github.com/o0Zz/ha-melcloud/blob/master/custom_components/melcloud/climate.py
I suspect this not only affects requests to change the temperature, but also mode and fan mode, as seen when testing with @zimba
Update setTemperature command to pass in power, mode, fan mode and set temperature
As reported by @mikkomattip here, most Fan Modes are not displaying correctly on a Fan dashboard tile, apart from Auto.
As an owner of a Mitsubishi Electric Air Conditioner I want to integrate my system into Hubitat, requiring the ability to authenticate with the Kumo service, so that I can issue commands securely.
Introduce a looping function in the PC Motion Sensor to take the place of the schedule in Task Scheduler. This will require:
Owners of wall-mounted Mitsubishi Air Conditioners can adjust the direction and swing settings of horizontal and vertical louvres through physical controllers or related apps, if the unit includes these features. This enhancement to the Mitsubishi A/C drivers aims to detect that these features are available on the linked units, identify the current settings for the unit and allow users on the HE system to adjust these settings through their HE hub.
Also include in this the request from tjc4561 regarding Kumo Vent position.
As a user of a HE hub I want to format dates on dashboards the way that makes sense to the users of my HE hub so that dates displayed can be easily and quickly interpreted and understood.
@Mikkomattip experienced issues in switching languages on the MELCloud app and in the driver. Will need to go back through some of the posts on the Community and get more details on the sequence of events, but hopefully we can get to the bottom of this. Most recent post is linked below.
@mikkomattip reported in a private message in November 2020 that the language in the MELCloud Android App was being changed from Finnish to Swedish. Jasper Van Leeuwen has since submitted a pull request with an update to the authentication method in the parent driver, identifying that the language passed in the API call is what adjusts the language. Jasper changed this to pass in English, but I would like to make this more flexible and want to look at options to either not pass it in, detect it in some way automatically, or allow a user to configure it.
Remove the Authentication Token and Authentication Access Token attributes and move them to be State Variables in the SensorPush Gateway Driver so they are not accessible to users in places like Dashboard tiles, etc.
Identified By: @mikkomattip on Hubitat Community Forum post
Description: When I change the mode (I have only tried from heat to cool), it changes the temperature to 10 celsius on MelCloud app and I believe that is the exact temperature.
Notes: The suspicion is that this is related to issue #10 (changing the set temperature turning the A/C unit off), in that it is expected more details need to be passed to the MelCloud API as part of each command. Another possibility is a conflict in attribute and method parameter names of "temperature".
For consistency with the above changes, also:
Users of the Mitsubishi A/C drivers want to replicate the pre-sets feature from the MELCloud app / service in Europe, where various settings on their Air Conditioner are saved under an identifiable name so they can easily transition their A/C unit to those settings at the press of a button in the MELCloud app. There can be multiple pre-sets defined.
This enhancement aims to replicate the MELCloud feature in two ways:
Future enhancements in this area may include:
@mikkomattip reported a delay in the display / change to the temperature when installing the new Unified Thermostat drivers, whereas the fan speed and mode changed straight away when viewed on a dashboard tile.
Notes to self.... :-)
Further analysis is needed, but the suspicion is that the temperature may not be "adjusted" straight away and rely on the regular status updates....
When creating a child A/C device, a user currently needs to Save Preferences in order for Automatic Polling to be enabled. It would be preferable to remove this need for user interaction, setting up the automatic polling job automatically when the child device is created.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.