Is Smart Recovery data available via ecobee API? - ecobee-api

Is the following data available via the ecobee API?
Whether Smart Recovery is enabled/disabled on the thermostat
When Smart Recovery is active just before a schedule transition
I'm not seeing it in the Settings, Runtime or ExtendedRuntime objects.

Related

Monitor Windows Events (e.g. MSSQLServer) in Azure?

I searched for about one week for the oppurtunity to monitor different windows events, for example the SQL-event(or service) in AzureRM virtual machines.
I tried it with different LogAnalytics queries, Runbooks, Powershell scripts to connect to the vm, etc. But everything I tried doesn't work.
Do you have any suggestions?
The solution should inform me, when a windows service stopped.
Best regards!
Azure Monitor, which now includes Log Analytics and Application Insights, provides sophisticated tools for collecting and analyzing telemetry that allow you to maximize the performance and availability of your cloud and on-premises resources and applications. It helps you understand how your applications are performing and proactively identifies issues affecting them and the resources they depend on.
Activity log alerts are the alerts that get activated when a new activity log event occurs that matches the conditions specified in the alert. You can follow the following document to set an activity log alert: https://learn.microsoft.com/en-us/azure/monitoring-and-diagnostics/alert-activity-log?toc=/azure/azure-monitor/toc.json

DeviceIOControl API not found in UWP C++ application

I want to Convert my existing app code which interact with Kernel mode driver(WDM driver). For IOCTL i’m using DeviceIoControl APIs.
For porting my app to UWP i’m using this link : https://learn.microsoft.com/en-us/cpp/porting/how-to-use-existing-cpp-code-in-a-universal-windows-platform-app?view=vs-2017 .
After applying changes in project properties as mentioned in link, i’m getting error as DeviceIoControl identifier not found. That’s issue i’m facing. Is there any sample app/API available instead of DeviceIoControl?
Actually, we added DeviceIoControl to the allow list in RS5. You need to get a HANDLE to the device first, and that will require two changes
Call CreateFileFromApp instead of CreateFile
The device being opened needs to grant access to app container. If
you own the driver and it is a custom device interface, you can use
a custom cap.
If you are accessing an in box defined device interface, you can’t get a direct HANDLE to the device. If your MSR access driver is a pnp driver you can use the guidance above.
You can't use DeviceIOControl from UWP apps. You can see the list of supported Win32 and COM APIs and this is not one of them. UWP apps have a more restricted security model to make it harder to use as a malware vector, so you can't interact with arbitrary kernel mode drivers.
There is a specific scenario where you can enable a custom capability and use Windows.Devices.Custom APIs. See CustomCapability sample. This is intended for hardware support aps generally. See Hardware Support App (HSA): Steps for Driver Developers.
As mentioned by #Xavier Xie, CreateFileFromApp and CreateFile2FromApp are available in later Win10 releases to get brokered device handles from app container. This is probably the easiest approach if you already have a lot of Win32 code that you want to port.
Device access also has UWP version in Windows.Devices.Custom. This also brokers the device handle but encapsulates it into a CustomDevice object which you can use to do IO control to your device.
Note: in both cases, the device handle gets brokered (ie. created in the runtime broker in medium IL, and marshaled into the app container) if the app its self doesn't have permissions to directly open the device. What this means is that the device interface will still need to be ACL'ed or otherwise granted access such that the app can open it.
The most current best way to grant access to an app to access your device is through a custom capability. The Device Access Broker will check the interface's DEVPKEY_DeviceInterface_UnrestrictedAppCapabilities key for the app's PFN. In the legacy flow, Device Access will check DEVPKEY_DeviceContainer_PrivilegedPackageFamilyNames.

Thunderbird: How to access the calendar?

I'm planning to develop a tool (running on the Windows PC) which allows comparing and merging calendar events between different calendars. My mobile device and my Lightning calendar should be supported.
The idea is to write an App for my mobile device connecting to the tool via TCP or UDP so the tool is able to modify the mobile device's calendar by sending commands to the App.
Unfortunately I'm not aware on how I can access the Thunderbird Lightning calendar with my tool.
Question 1: (Possibility 1)
Is it possible to access the Thunderbird (Lightning) calendar read/write from another application (e.g. by directly accessing the SQLite archive) in a safe way?
"In a safe way" means: No risk that the calendar format changes in the next Lightning release and writing events will destroy it!
Question 2: (Possibility 2)
Is there a possibility to access the Lightning calendar data from another Thunderbird plug-in?
(I was searching about this in Google for 2 hours and found nothing!)
Is it possible to create a "permanent" TCP connection from a Thunderbird plug-in (running some operations in the background)?
I would advise against option 1, but if you must then you can check the version table to see if the storage version has changed. This doesn't happen very often. As for accessing calendar data, you can reach the calendar manager and events as follows:
Components.utils.import("resource://calendar/modules/calUtils.jsm");
let calmgr = cal.getCalendarManager();
let calendars = calmgr.getCalendars({});
let mycal = calendars[0]; // pick one
The calendar in mycal will follow the calICalendar interface, which you can read about here. The most important methods are addItem, modifyItem, deleteItem, getItem and getItems.
As for creating a permanent connection from within Thunderbird, it is probably best to use web sockets, which you should be able to use from any DOM window. It might make sense to create your own e.g. with an iframe.

Google Proximity API, how to unregister a beacon and reuse somewhere else?

Google provides a method to register a beacon to their register using Proximity APIs.
the call used for this is
POST https://proximitybeacon.googleapis.com/v1beta1/beacons:register in
https://developers.google.com/beacons/proximity/reference/rest/v1beta1/beacons/register
However, there is no documentation provided to 'unregister'
question:
Is there any API?
Is it just enough to un-authorize?
Scenario:
Using a test account, the beacon device is already registered and authorized.
Production requires another account to be owning it. Guess, this requires unregister / un-authorize
which is correct?
Unfortunately, at this time, there is no way to re-use a beaconID in the Google Proximity Beacon API. While decommissioning a beaconID will indeed cause it to be permanently "shut down" — nobody will be able to modify it or see attachments from it — you will not be able to re-register that device's beaconID again.
The correct way is to use the hardware manufacturer's provisioning app to give the beacon a new beaconID and then register that.
I'm not quite sure when it was introduced, but there's now a delete method in the beacon resource, as documented here: https://developers.google.com/beacons/proximity/reference/rest/v1beta1/beacons/delete
This seems to drive a need to update to the FAQ here: https://developers.google.com/beacons/proximity/projects-and-ownership
about accidental registration to the wrong project.
I believe the proper way to "unregister" a beacon is to decommission it:
https://developers.google.com/beacons/proximity/reference/rest/v1beta1/beacons/decommission
This is what Joe Birch said about decommissioning a beacon in his overview of the Proximity API (a great read, BTW):
Decommissioning a beacon marks it as having no further use, causing it to be completely disregarded. Setting this state is irreversible, so should only be done if it is certain to not be used again.
There is a way explained in the Google Beacons Proximity API to "unregister" the beacon:
Unregister a beacon
Once a beacon has been registered, it cannot be deleted from the registry. There are two options for taking a beacon offline:
Call beacons.deactivate to temporarily remove a beacon from service. Once deactivated, the API will not return information nor attachment data for the beacon. Call beacons.activate to return the beacon to service.
Call beacons.decommission to permanently remove a beacon ID from service. Once a beacon has been decommissioned, you will no longer be able to use the ID it was previously registered with. You can provision the beacon with a new ID, and re-register the beacon with that ID.
But for what it explains it can only be deactivated temporarily with the first option, and with the second you might be able to unregister it if you change its ID.

How to handle basic, advanced, add on, and pro feature in Saas based software?

We are working on new requirement where we need to enable features based on contract with the client. It`s a Saas based software and support multi tenancy. The software by default have basic features enabled.
Basic features
Customer management
Basic billing/invoicing
Notification via email
Payments
Advance feature
Notification over SMS
Workflow
Etc
All the client serviced by same software (Obviously same deployment ) but data will be stored on different database schema.
How to handle basic, advanced, add on, and pro feature in this case?
We are using spring and hibernate.
AFAIK, you should be handling these internally in your application so that the features like notification, workflow are marked as application features and for each tenant, there will be a mapping between the tenant id and the feature so that the tenant has access only to the features that he is subscribed to.
So, when a tenant or his user logs in to the system, we identify the features and the contents that he can access and then show them to the user. This is called as a tenant licensing system.
Also, whenever a feature is consumed, your code should be recording the tenant that consumed that feature and by how much and when and there can be cost associated with units of usage measurements.
For more detailed discussion, please refer here
Though these are all explained in C#, there should be no hinderance in the conceptual understanding.

Resources